@inkeep/open-knowledge 0.24.0-beta.6 → 0.24.0-beta.8
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/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/constants-DYwiVBpF.mjs +2 -0
- package/dist/{dist-B4UWLjxL.mjs → dist-DcBjg7v1.mjs} +1 -1
- package/dist/{dist-CPWuFcMi.mjs → dist-DntDG79T.mjs} +6 -6
- package/dist/{gh-detect-DR8F3B_q.mjs → gh-detect-B4gJX6Zo.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-CZ_nELEP.mjs → init-D3lDaCdS.mjs} +4 -4
- package/dist/init-NTxFesmd.mjs +1 -0
- package/dist/loader-4FZg108x.mjs +1 -0
- package/dist/{loader-DzDqBeq5.mjs → loader-Li7cUieM.mjs} +2 -2
- package/dist/{preview-B-Wfn8l6.mjs → preview-DHXIkTl1.mjs} +2 -2
- package/dist/preview-OhPowgjY.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DEiciTSd.js → ActivityModeContent-B64TMVp3.js} +2 -2
- package/dist/public/assets/{ConsentDialogBody-BLdl7bD4.js → ConsentDialogBody-DOBtAIqx.js} +1 -1
- package/dist/public/assets/{DocumentContext-C-wDVnFV.js → DocumentContext-BlziVobJ.js} +20 -20
- package/dist/public/assets/{GraphPanel-B7rLBrzx.js → GraphPanel-BOzNAXNR.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-gE2PmAzV.js → ManagedArtifactProperties-CYtk8Bqt.js} +1 -1
- package/dist/public/assets/{PropertyPanel-DeDmWUyq.js → PropertyPanel-DUcQoy8A.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-B1Ey0zo3.js → SettingsDialogBody-CehseGeW.js} +2 -2
- package/dist/public/assets/{SkillEditorActions-CMgQx71p.js → SkillEditorActions-SkSo8rGK.js} +1 -1
- package/dist/public/assets/{SourceEditor-Baen8H9p.js → SourceEditor-Cd7sWXXb.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DBiCU03J.js → TerminalPanel-C7GMKqtO.js} +5 -5
- package/dist/public/assets/{_baseFor-D54ddCgV.js → _baseFor-BdRc24ye.js} +1 -1
- package/dist/public/assets/{arc-CX8VzsKv.js → arc-BXOQr9sa.js} +1 -1
- package/dist/public/assets/architecture-YZFGNWBL-BJ8obmp9.js +1 -0
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-COjsIxjs.js → architectureDiagram-Q4EWVU46-CAr0uulM.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-DGJUDn9H.js → blockDiagram-DXYQGD6D-BYOlkUWt.js} +1 -1
- package/dist/public/assets/{c4Diagram-AHTNJAMY-CRV9SgJm.js → c4Diagram-AHTNJAMY-DkEx1qz7.js} +1 -1
- package/dist/public/assets/{calendar-BOfR9Wel.js → calendar-BeE_jjq6.js} +1 -1
- package/dist/public/assets/channel-CxQamJ0l.js +1 -0
- package/dist/public/assets/{chunk-2KRD3SAO-BADJbdsA.js → chunk-2KRD3SAO-D2DjUFaZ.js} +1 -1
- package/dist/public/assets/{chunk-336JU56O-QSmC96Rs.js → chunk-336JU56O-QhK--V8_.js} +2 -2
- package/dist/public/assets/chunk-426QAEUC-B26VGV3k.js +1 -0
- package/dist/public/assets/{chunk-4BX2VUAB-CHAo1-t1.js → chunk-4BX2VUAB-BBac1hvY.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-_pOPhRB4.js → chunk-4TB4RGXK-lxCQIdxu.js} +1 -1
- package/dist/public/assets/chunk-55IACEB6-DcXoATYF.js +1 -0
- package/dist/public/assets/{chunk-5FUZZQ4R-D6HYk55Z.js → chunk-5FUZZQ4R-CCcKUfaC.js} +1 -1
- package/dist/public/assets/{chunk-5PVQY5BW-DIn4cbvq.js → chunk-5PVQY5BW-CfzGIIMQ.js} +1 -1
- package/dist/public/assets/{chunk-67CJDMHE-C14F5sRw.js → chunk-67CJDMHE-CoCng_Yx.js} +1 -1
- package/dist/public/assets/{chunk-7N4EOEYR-Dw-Bq2eG.js → chunk-7N4EOEYR-D48AE8ry.js} +1 -1
- package/dist/public/assets/{chunk-AA7GKIK3-C8uhEWlv.js → chunk-AA7GKIK3-Bd86vz18.js} +1 -1
- package/dist/public/assets/{chunk-BSJP7CBP-BW2v_2o9.js → chunk-BSJP7CBP-A609rNf0.js} +1 -1
- package/dist/public/assets/{chunk-CIAEETIT-BRhCdt9D.js → chunk-CIAEETIT-BHgTMk7X.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-UzWuBV_O.js → chunk-EDXVE4YY-YecRV9dI.js} +1 -1
- package/dist/public/assets/{chunk-ENJZ2VHE-CJjgYRyL.js → chunk-ENJZ2VHE-c4WaVxtk.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-BpjuUpyo.js → chunk-FMBD7UC4-DCtEx_G1.js} +1 -1
- package/dist/public/assets/{chunk-FOC6F5B3-UKBey2zk.js → chunk-FOC6F5B3-C2AAsQu5.js} +1 -1
- package/dist/public/assets/{chunk-ICPOFSXX-DY9nFxrX.js → chunk-ICPOFSXX-CftHrrY2.js} +1 -1
- package/dist/public/assets/{chunk-K5T4RW27-CpMfAm3b.js → chunk-K5T4RW27-B9KmYG05.js} +1 -1
- package/dist/public/assets/{chunk-KGLVRYIC-rrqQGbOL.js → chunk-KGLVRYIC-D8pwR97r.js} +1 -1
- package/dist/public/assets/{chunk-LIHQZDEY-yFR0cKbH.js → chunk-LIHQZDEY-DZ-tw06m.js} +1 -1
- package/dist/public/assets/{chunk-ORNJ4GCN-BtPodknv.js → chunk-ORNJ4GCN-Z1vFtWE_.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-CnSRtGDg.js → chunk-OYMX7WX6-BFBDZA6g.js} +1 -1
- package/dist/public/assets/chunk-QZHKN3VN-n_LvQn_A.js +1 -0
- package/dist/public/assets/{chunk-U2HBQHQK-DdsCe4K6.js → chunk-U2HBQHQK-SrN05XGk.js} +1 -1
- package/dist/public/assets/{chunk-X2U36JSP-DHnVr_BK.js → chunk-X2U36JSP-BGXL8B6X.js} +1 -1
- package/dist/public/assets/{chunk-XPW4576I-BwkqUpw2.js → chunk-XPW4576I-c40lI9bz.js} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-BJ-fc2Rg.js → chunk-YZCP3GAM-vhP5bjDK.js} +1 -1
- package/dist/public/assets/{chunk-ZZ45TVLE-BCp9ngvG.js → chunk-ZZ45TVLE-BQhO4ko8.js} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-B6v0dNtf.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-8p8EVfHS.js +1 -0
- package/dist/public/assets/clone-BgLDPfzN.js +1 -0
- package/dist/public/assets/{config-validation-events-QwSBoIEm.js → config-validation-events-VKG3DgLl.js} +4 -4
- package/dist/public/assets/{cose-bilkent-S5V4N54A-fa7N9UIg.js → cose-bilkent-S5V4N54A-DLAlQ7cr.js} +1 -1
- package/dist/public/assets/{dagre-COqttKg6.js → dagre-BZchHpC5.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-D-MCTUUw.js → dagre-KV5264BT-CfKzqtdQ.js} +1 -1
- package/dist/public/assets/{diagram-5BDNPKRD-DQc8ouPM.js → diagram-5BDNPKRD-DwexIECp.js} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-kua0kYmN.js → diagram-G4DWMVQ6-COh3Z9VA.js} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-UabkDa4C.js → diagram-MMDJMWI5-DgU0Oq8X.js} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-BHqAOmX9.js → diagram-TYMM5635-WAxbluNj.js} +1 -1
- package/dist/public/assets/{dist-Bvyh5TDV.js → dist-7FuH8GMo.js} +1 -1
- package/dist/public/assets/{dist-CZ8juU19.js → dist-BC_IrM4F.js} +1 -1
- package/dist/public/assets/{dist-B-_AIBU7.js → dist-BPuPEdb6.js} +1 -1
- package/dist/public/assets/{dist-Cmfs-Ydn.js → dist-Bjtzzcz_.js} +51 -51
- package/dist/public/assets/{dist-BfNYKL0c2.js → dist-Bz14RHFY.js} +1 -1
- package/dist/public/assets/{dist-H4xHjwbu.js → dist-CEE3i3A0.js} +1 -1
- package/dist/public/assets/{dist-5njPzycn.js → dist-CikH4tpl.js} +1 -1
- package/dist/public/assets/{dist-BGwzEJ7I.js → dist-Det3ErjQ.js} +1 -1
- package/dist/public/assets/dist-HZjJQtoL2.js +1 -0
- package/dist/public/assets/{dist-FGpiMDYQ.js → dist-m9JR0snv.js} +1 -1
- package/dist/public/assets/{dist-CtqWzamV2.js → dist-pXD8nsnR.js} +1 -1
- package/dist/public/assets/{documents-events-BZ-NuT20.js → documents-events-B7iSYQul.js} +1 -1
- package/dist/public/assets/{erDiagram-SMLLAGMA-BJ6mJb4X.js → erDiagram-SMLLAGMA-DklQoopT.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-k_pkZ3zh.js → file-tree-adapter-CxLAzSjb.js} +1 -1
- package/dist/public/assets/{flatten-_XsqzTi6.js → flatten-TtWU5i3V.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-CqNbEdTQ.js → flowDiagram-DWJPFMVM-DGx4vFD2.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-C0OJIv4u.js → ganttDiagram-T4ZO3ILL-CXbzel3t.js} +1 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-DejY_JNY.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BIvRakNL.js → gitGraphDiagram-UUTBAWPF-CrUE86w0.js} +1 -1
- package/dist/public/assets/{graphlib-Ndup9edl.js → graphlib-DDlNZh2M.js} +1 -1
- package/dist/public/assets/index-BUc1PHZE.js +2004 -0
- package/dist/public/assets/info-OMHHGYJF-9xiK2noM.js +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-BZDO7AiE.js → infoDiagram-42DDH7IO-D1AIW9Gs.js} +1 -1
- package/dist/public/assets/{isEmpty-aix63sna.js → isEmpty-DnmseQjK.js} +1 -1
- package/dist/public/assets/isSymbol-C5HN6O5S.js +1 -0
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-1ASGrOot.js → ishikawaDiagram-UXIWVN3A-DvnqrddQ.js} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-kiFyWa4j.js → journeyDiagram-VCZTEJTY-C11zoBxw.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-DK89HltM.js → kanban-definition-6JOO6SKY-f2UJfIU3.js} +1 -1
- package/dist/public/assets/{keyboard-shortcuts-DdtsPkF4.js → keyboard-shortcuts-BanMswAs.js} +1 -1
- package/dist/public/assets/{line-BntNoGZG.js → line-B2wHuvNM.js} +1 -1
- package/dist/public/assets/{linear-N_t9yEQX.js → linear-B3Scki2z.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Bt_9ZpQF.js → mermaid-parser.core-D7whD4cl.js} +2 -2
- package/dist/public/assets/{mermaid.core-CMx0_yN5.js → mermaid.core-BWYus9rU.js} +3 -3
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-CmIKuiAN.js → mindmap-definition-QFDTVHPH-CR9IgpV7.js} +1 -1
- package/dist/public/assets/{navigation-targets-DosY_GDn.js → navigation-targets-BBvp-Gxt.js} +1 -1
- package/dist/public/assets/{now-BcKw8pEx.js → now-jv_Sei15.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-HL4UJ8d1.js → open-managed-artifact-tab-BbQDONrv.js} +1 -1
- package/dist/public/assets/{ordinal-BAx3IfMd.js → ordinal-BRkB4leE.js} +1 -1
- package/dist/public/assets/packet-4T2RLAQJ-YinPAYtq.js +1 -0
- package/dist/public/assets/pie-ZZUOXDRM-k77NcUcY.js +1 -0
- package/dist/public/assets/{pieDiagram-DEJITSTG-DACrQaif.js → pieDiagram-DEJITSTG-CnAZNYeq.js} +1 -1
- package/dist/public/assets/prop-types-DXyNHDSH.js +1 -0
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-DoxwJYr7.js → quadrantDiagram-34T5L4WZ-Bqtrcr8D.js} +1 -1
- package/dist/public/assets/radar-PYXPWWZC-Q5ezA6us.js +1 -0
- package/dist/public/assets/{reduce-UKQOnjSn.js → reduce-CpEDzY8w.js} +1 -1
- package/dist/public/assets/{requirementDiagram-MS252O5E-0wPfI6QY.js → requirementDiagram-MS252O5E-BkvuaXG4.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-LAE0chGZ.js → sankeyDiagram-XADWPNL6-DGDsUSOp.js} +1 -1
- package/dist/public/assets/{selection-context-ud0S7IiG.js → selection-context-3bzSsUeV.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-Chc9csZX.js → sequenceDiagram-FGHM5R23-iuzPRWKE.js} +1 -1
- package/dist/public/assets/{skill-actions-DMtg_juC.js → skill-actions-8oZwtKvr.js} +1 -1
- package/dist/public/assets/{skills-api-C9-REwRl.js → skills-api-C8yxC-Y8.js} +1 -1
- package/dist/public/assets/{src-BdihqH02.js → src-DA6t3wJi.js} +1 -1
- package/dist/public/assets/startup-marks-DX3HfdcU.js +1 -0
- package/dist/public/assets/{stateDiagram-FHFEXIEX-QcyLuGMN.js → stateDiagram-FHFEXIEX-DSWHCLx5.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BtqbzLrh.js +1 -0
- package/dist/public/assets/{target-navigation-intent-CdbY7hfn.js → target-navigation-intent-nE1R65kM.js} +1 -1
- package/dist/public/assets/{telemetry-impl-BvXatK9v.js → telemetry-impl-BxLbJWUi.js} +2 -2
- package/dist/public/assets/telemetry-startup-mmkCxwyh.js +1 -0
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-Cu9O4nWX.js → timeline-definition-GMOUNBTQ-CfC-S2A3.js} +1 -1
- package/dist/public/assets/treeView-SZITEDCU-AyOVdphu.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-F1M1iZu-.js +1 -0
- package/dist/public/assets/{typing-burst-detector-D1mkuIxr.js → typing-burst-detector-CiXPtnXN.js} +3 -3
- package/dist/public/assets/{vennDiagram-DHZGUBPP-eH5Exbd9.js → vennDiagram-DHZGUBPP-DMf7SEn4.js} +1 -1
- package/dist/public/assets/wardley-RL74JXVD-DmCS8ltQ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-DW41OqxK.js → wardleyDiagram-NUSXRM2D-D0Euwoae.js} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-BT6ib8xM.js → xychartDiagram-5P7HB3ND-BIV5DX58.js} +1 -1
- package/dist/public/index.html +30 -29
- package/dist/{repair-launch-json-CbcG9uNW.mjs → repair-launch-json-B3T8K42c.mjs} +2 -2
- package/dist/{repair-mcp-configs-CZUV_jeZ.mjs → repair-mcp-configs-LJD1vSll.mjs} +2 -2
- package/dist/{repair-skills-D1PQNact.mjs → repair-skills-BKmGWSNm.mjs} +2 -2
- package/dist/repair-skills-C_iNRKzb.mjs +1 -0
- package/dist/server-lock-8Lv6A-Xa-Cxe-7wxJ.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-DiysUpvV.mjs → server-lock-CN2YHwpP-DwE4XXIS.mjs} +28 -28
- package/dist/{src-CWhVS7Hy.mjs → src-B-XsMCw3.mjs} +2 -2
- package/dist/{start-CwS12j1b.mjs → start-CaGVtS1q.mjs} +2 -2
- package/dist/start-DJ6iUe0O.mjs +1 -0
- package/dist/{write-project-skill-CkUa0amf.mjs → write-project-skill-9bkdbAY0.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-BLhahSKo.mjs +0 -2
- package/dist/init-DtY7Wnrh.mjs +0 -1
- package/dist/loader-2rz27wbd.mjs +0 -1
- package/dist/preview-LkqS-SVl.mjs +0 -1
- package/dist/public/assets/architecture-YZFGNWBL-LCAJUs2E.js +0 -1
- package/dist/public/assets/channel-D5KDsooX.js +0 -1
- package/dist/public/assets/chunk-426QAEUC-DLJUx4YH.js +0 -1
- package/dist/public/assets/chunk-55IACEB6--4MoDq_6.js +0 -1
- package/dist/public/assets/chunk-QZHKN3VN-CmNIolyF.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-CcsZam4p.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-DETyEa0B.js +0 -1
- package/dist/public/assets/clone-BbgQKnGZ.js +0 -1
- package/dist/public/assets/dist-GsKSyQg-.js +0 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-B7OVJvX8.js +0 -1
- package/dist/public/assets/index-R2qGh526.js +0 -2004
- package/dist/public/assets/info-OMHHGYJF-1noYtGam.js +0 -1
- package/dist/public/assets/isSymbol-DNCAG2i9.js +0 -1
- package/dist/public/assets/packet-4T2RLAQJ-D3fc6s9_.js +0 -1
- package/dist/public/assets/pie-ZZUOXDRM-DaAgDyo7.js +0 -1
- package/dist/public/assets/prop-types-BpxMt5L_.js +0 -1
- package/dist/public/assets/radar-PYXPWWZC-DspSpQh4.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CwmZULOI.js +0 -1
- package/dist/public/assets/treeView-SZITEDCU-fP9uY0On.js +0 -1
- package/dist/public/assets/treemap-W4RFUUIX-BXJeI_YU.js +0 -1
- package/dist/public/assets/wardley-RL74JXVD-EnPRi_dh.js +0 -1
- package/dist/repair-skills-C9v77qTm.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-DCBoMd9v.mjs +0 -1
- package/dist/start-DdUrp1l4.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-D4MHJpV0.js → ActivityPanelDiffView-BO8reo7p.js} +0 -0
- /package/dist/public/assets/{McpConsentDialogBody-CIYpdlED.js → McpConsentDialogBody-BmNZ4WyJ.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-MOMtgHYZ.js → __vite-browser-external-DvGgCmb2.js} +0 -0
- /package/dist/public/assets/{array-CBLp81Ex.js → array-DfQsubZQ.js} +0 -0
- /package/dist/public/assets/{clike-B_I7LHuO.js → clike-Xzxb8Sz1.js} +0 -0
- /package/dist/public/assets/{colors-DzdyOq8I.js → colors-C23yJeS9.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-SCoi-wuq.js → cytoscape.esm-M6FYTizt.js} +0 -0
- /package/dist/public/assets/{defaultLocale-BrXSu2JC.js → defaultLocale-BRK3HZbx.js} +0 -0
- /package/dist/public/assets/{diff-Crh7dhXT.js → diff-Cm_P-pnl.js} +0 -0
- /package/dist/public/assets/{dist-oXbGii4W.js → dist-BS8GtzO9.js} +0 -0
- /package/dist/public/assets/{dist-ctJT8lVd.js → dist-CjXkcarO.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-OmIq2tUW.js → file-tree-rename-validation-B9K2lxjE.js} +0 -0
- /package/dist/public/assets/{format-CFMm5Ng-.js → format-C-cvY9tz.js} +0 -0
- /package/dist/public/assets/{go-Z3wE98-I.js → go-C95e_bXR.js} +0 -0
- /package/dist/public/assets/{init-BgBNAjap.js → init-CLIhTc-7.js} +0 -0
- /package/dist/public/assets/{isObjectLike-BdoalOjb.js → isObjectLike-B6rhnmNR.js} +0 -0
- /package/dist/public/assets/{lua-Cqdgy56L.js → lua-B7j7H7NW.js} +0 -0
- /package/dist/public/assets/{min-NHChNRX9.js → min-DX8PS56Y.js} +0 -0
- /package/dist/public/assets/{path-p9xFZuMn.js → path-C86-B4H2.js} +0 -0
- /package/dist/public/assets/{pdf-BIhr1Krc.js → pdf-DMjKf--X.js} +0 -0
- /package/dist/public/assets/{pdf.worker-BO0LPxWN.js → pdf.worker-CNyNLvYe.js} +0 -0
- /package/dist/public/assets/{perl-CE2S8U7m.js → perl-Cyvq88MC.js} +0 -0
- /package/dist/public/assets/{properties-BbIafFRL.js → properties-DtD2wIuP.js} +0 -0
- /package/dist/public/assets/{r-DxZPApDG.js → r-B7LmzBuW.js} +0 -0
- /package/dist/public/assets/{rough.esm-5Tjchx1D.js → rough.esm-BVW8jYRk.js} +0 -0
- /package/dist/public/assets/{ruby-BgDu4VVp.js → ruby-uptP8xi-.js} +0 -0
- /package/dist/public/assets/{shell-C7sKG-gh.js → shell-ClHxB-gB.js} +0 -0
- /package/dist/public/assets/{sql-Bm8-ThVq.js → sql-DQPLTNW_.js} +0 -0
- /package/dist/public/assets/{src-CldOY_w0.js → src-D_6tSLtQ.js} +0 -0
- /package/dist/public/assets/{stex-C863jojy.js → stex-C5SatQxm.js} +0 -0
- /package/dist/public/assets/{swift-BMkXMkx2.js → swift-CLNexkWh.js} +0 -0
- /package/dist/public/assets/{textarea-D3MecMx5.js → textarea-BVfCks43.js} +0 -0
- /package/dist/public/assets/{toml-Bt_dL0dK.js → toml-DoE1CXtR.js} +0 -0
|
@@ -297,53 +297,53 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
297
297
|
`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
|
|
298
298
|
`),[i,a]=ste(r);if(i.length===0)return;let o=LO(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
|
|
299
299
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(lte,this.editor.getAttributes(RO)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=GS({find:zO,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=GS({find:zO,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(RO)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),ute=/^\s*(\[([( |x])?\])\s$/,dte=uC.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,tx(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>aC(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=nx(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[GS({find:ute,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),fte=uC.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,tx(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
300
|
-
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=iC(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=iC(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});ES.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(wO.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(TO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(FO.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(BO.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(dte.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(fte.configure(this.options.taskList)),e}});var VO=` `,HO=`\xA0`,pte=uC.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,tx(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===VO||n[0].text===VO||n[0].raw===HO||n[0].text===HO)&&r.length===1&&r[0].type===`text`&&(r[0].text===VO||r[0].text===HO)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?VO:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mte=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,hte=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,UO=_S.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,tx(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[HS({find:mte,type:this.type})]},addPasteRules(){return[fC({find:hte,type:this.type})]}}),gte=UO,_te=uC.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),vte=_S.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,tx(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function yte(e={}){return new _m({view(t){return new bte(t,e)}})}var bte=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=jp(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},WO=class e extends I{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):I.near(r)}content(){return F.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new xte(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Ste(e)||!Cte(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!R.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};WO.prototype.visible=!1,WO.findFrom=WO.findGapCursorFrom,I.jsonID(`gapcursor`,WO);var xte=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return WO.valid(t)?new WO(t):I.near(t)}};function GO(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Ste(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||GO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Cte(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||GO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function wte(){return new _m({props:{decorations:Ote,createSelectionBetween(e,t,n){return t.pos==n.pos&&WO.valid(n)?new WO(n):null},handleClick:Ete,handleKeyDown:Tte,handleDOMEvents:{beforeinput:Dte}}})}var Tte=Sy({ArrowLeft:KO(`horiz`,-1),ArrowRight:KO(`horiz`,1),ArrowUp:KO(`vert`,-1),ArrowDown:KO(`vert`,1)});function KO(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof L){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=WO.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new WO(c))),!0):!1}}function Ete(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!WO.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&R.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new WO(r))),!0)}function Dte(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof WO))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=P.empty;for(let e=r.length-1;e>=0;e--)i=P.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new F(i,0,0));return a.setSelection(L.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Ote(e){if(!(e.selection instanceof WO))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,Ov.create(e.doc,[Tv.widget(e.selection.head,t,{key:`gapcursor`})])}var qO=200,JO=function(){};JO.prototype.append=function(e){return e.length?(e=JO.from(e),!this.length&&e||e.length<qO&&this.leafAppend(e)||this.length<qO&&e.leafPrepend(this)||this.appendInner(e)):this},JO.prototype.prepend=function(e){return e.length?JO.from(e).append(this):this},JO.prototype.appendInner=function(e){return new kte(this,e)},JO.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?JO.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},JO.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},JO.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},JO.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},JO.from=function(e){return e instanceof JO?e:e&&e.length?new YO(e):JO.empty};var YO=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=qO)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=qO)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(JO);JO.empty=new YO([]);var kte=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(JO),Ate=500,XO=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new ZO(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new ZO(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new ZO(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>Mte&&(s=jte(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Yf;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new ZO(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new ZO(i,o,l))}else r.push(new ZO(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new ZO(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>Ate&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new ZO(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(JO.from(i.reverse()),a)}};XO.empty=new XO(JO.empty,0);function jte(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var ZO=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},QO=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},Mte=20;function Nte(e,t,n,r){let i=n.getMeta(ik),a;if(i)return i.historyState;n.getMeta(Ite)&&(e=new QO(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(ik))return o.getMeta(ik).redo?new QO(e.done.addTransform(n,void 0,r,rk(t)),e.undone,$O(n.mapping.maps),e.prevTime,e.prevComposition):new QO(e.done,e.undone.addTransform(n,void 0,r,rk(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Pte(n,e.prevRanges)),s=o?ek(e.prevRanges,n.mapping):$O(n.mapping.maps);return new QO(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,rk(t)),XO.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new QO(e.done.rebased(n,a),e.undone.rebased(n,a),ek(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new QO(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),ek(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Pte(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function $O(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function ek(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function Fte(e,t,n){let r=rk(t),i=ik.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new QO(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(ik,{redo:n,historyState:c})}var tk=!1,nk=null;function rk(e){let t=e.plugins;if(nk!=t){tk=!1,nk=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){tk=!0;break}}return tk}var ik=new bm(`history`),Ite=new bm(`closeHistory`);function ak(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new _m({key:ik,state:{init(){return new QO(XO.empty,XO.empty,null,0,-1)},apply(t,n,r){return Nte(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?sk:n==`historyRedo`?ck:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function ok(e,t){return(n,r)=>{let i=ik.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=Fte(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var sk=ok(!1,!0),ck=ok(!0,!0);ES.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new _m({key:new bm(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var Lte=ES.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[yte(this.options)]}});ES.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new _m({key:new bm(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return Ov.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(Tv.node(t,t+e.nodeSize,{class:this.options.className}))}),Ov.create(e,a)}}})]}});var Rte=ES.create({name:`gapCursor`,addProseMirrorPlugins(){return[wte()]},extendNodeSchema(e){return{allowGapCursor:Yb(z(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),lk=`placeholder`;function zte(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var Bte=ES.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:lk,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${zte(this.options.dataAttribute)}`:`data-${lk}`;return[new _m({key:new bm(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&jx(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=Tv.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),Ov.create(t,a)}}})]}});ES.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new _m({key:new bm(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Mx(n.selection)||e.view.dragging?null:Ov.create(n.doc,[Tv.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function uk({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Vte=ES.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new bm(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new _m({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!uk({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!uk({node:r,types:n})}}})]}}),Hte=ES.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>sk(e,t),redo:()=>({state:e,dispatch:t})=>ck(e,t)}},addProseMirrorPlugins(){return[ak(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Ute=ES.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(CC.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(uO.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(wO.configure(this.options.bulletList)),this.options.code!==!1&&e.push(mO.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(gC.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(gO.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(Lte.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(Rte.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(jC.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(NC.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Hte.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(_O.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(kC.configure(this.options.italic)),this.options.listItem!==!1&&e.push(TO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(FO.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(ZT.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(BO.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(pte.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(UO.configure(this.options.strike)),this.options.text!==!1&&e.push(_te.configure(this.options.text)),this.options.underline!==!1&&e.push(vte.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(Vte.configure(this.options?.trailingNode)),e}});function Wte(){}var dk=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};dk.prototype.normal={},dk.prototype.property={},dk.prototype.space=void 0;function fk(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new dk(n,r,t)}function pk(e){return e.toLowerCase()}var mk=class{constructor(e,t){this.attribute=t,this.property=e}};mk.prototype.attribute=``,mk.prototype.booleanish=!1,mk.prototype.boolean=!1,mk.prototype.commaOrSpaceSeparated=!1,mk.prototype.commaSeparated=!1,mk.prototype.defined=!1,mk.prototype.mustUseProperty=!1,mk.prototype.number=!1,mk.prototype.overloadedBoolean=!1,mk.prototype.property=``,mk.prototype.spaceSeparated=!1,mk.prototype.space=void 0;var hk=t({boolean:()=>V,booleanish:()=>gk,commaOrSpaceSeparated:()=>bk,commaSeparated:()=>yk,number:()=>H,overloadedBoolean:()=>_k,spaceSeparated:()=>vk}),Gte=0,V=xk(),gk=xk(),_k=xk(),H=xk(),vk=xk(),yk=xk(),bk=xk();function xk(){return 2**++Gte}var Sk=Object.keys(hk),Ck=class extends mk{constructor(e,t,n,r){let i=-1;if(super(e,t),wk(this,`space`,r),typeof n==`number`)for(;++i<Sk.length;){let e=Sk[i];wk(this,Sk[i],(n&hk[e])===hk[e])}}};Ck.prototype.defined=!0;function wk(e,t,n){n&&(e[t]=n)}function Tk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ck(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pk(r)]=r,n[pk(a.attribute)]=r}return new dk(t,n,e.space)}var Ek=Tk({properties:{ariaActiveDescendant:null,ariaAtomic:gk,ariaAutoComplete:null,ariaBusy:gk,ariaChecked:gk,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:vk,ariaCurrent:null,ariaDescribedBy:vk,ariaDetails:null,ariaDisabled:gk,ariaDropEffect:vk,ariaErrorMessage:null,ariaExpanded:gk,ariaFlowTo:vk,ariaGrabbed:gk,ariaHasPopup:null,ariaHidden:gk,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vk,ariaLevel:H,ariaLive:null,ariaModal:gk,ariaMultiLine:gk,ariaMultiSelectable:gk,ariaOrientation:null,ariaOwns:vk,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:gk,ariaReadOnly:gk,ariaRelevant:null,ariaRequired:gk,ariaRoleDescription:vk,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:gk,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Dk(e,t){return t in e?e[t]:t}function Ok(e,t){return Dk(e,t.toLowerCase())}var Kte=Tk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:yk,acceptCharset:vk,accessKey:vk,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:vk,autoFocus:V,autoPlay:V,blocking:vk,capture:null,charSet:null,checked:V,cite:null,className:vk,cols:H,colSpan:null,content:null,contentEditable:gk,controls:V,controlsList:vk,coords:H|yk,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:_k,draggable:gk,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:vk,height:H,hidden:_k,high:H,href:null,hrefLang:null,htmlFor:vk,httpEquiv:vk,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:vk,itemRef:vk,itemScope:V,itemType:vk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:H,pattern:null,ping:vk,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:vk,required:V,reversed:V,rows:H,rowSpan:H,sandbox:vk,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:gk,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:gk,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vk,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:gk,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:Ok}),qte=Tk({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:bk,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:vk,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yk,g2:yk,glyphName:yk,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:bk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bk,rev:bk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bk,requiredFeatures:bk,requiredFonts:bk,requiredFormats:bk,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:bk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bk,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Dk}),kk=Tk({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ak=Tk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ok}),jk=Tk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Jte=/[A-Z]/g,Mk=/-[a-z]/g,Yte=/^data[-\w.:]+$/i;function Nk(e,t){let n=pk(t),r=t,i=mk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Yte.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Mk,Zte);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Mk.test(e)){let n=e.replace(Jte,Xte);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ck}return new i(r,t)}function Xte(e){return`-`+e.toLowerCase()}function Zte(e){return e.charAt(1).toUpperCase()}var Pk=fk([Ek,Kte,kk,Ak,jk],`html`),Fk=fk([Ek,qte,kk,Ak,jk],`svg`);function Ik(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Lk(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Rk=/[#.]/g;function zk(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Rk.lastIndex=i;let e=Rk.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Bk(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Vk(e){return e.join(` `).trim()}function Hk(e,t,n){let r=n?Jk(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=zk(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Uk(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Wk(e,o.properties,t,n)}for(let e of a)Gk(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Uk(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Wk(e,t,n,r){let i=Nk(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Bk(r):i.commaSeparated?Ik(r):i.commaOrSpaceSeparated?Bk(Ik(r).join(` `)):Kk(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?qk(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Kk(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gk(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Gk(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Gk(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Kk(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||pk(n)===pk(t)))return!0}return n}function qk(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Jk(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Yk=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Xk=Hk(Pk,`div`),Zk=Hk(Fk,`g`,Yk);function Qk(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=$k(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=$k(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function $k(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
301
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var eA={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},tA={}.hasOwnProperty,nA=Object.prototype;function rA(e,t){let n=t||{};return iA({file:n.file||void 0,location:!1,schema:n.space===`svg`?Fk:Pk,verbose:n.verbose||!1},e)}function iA(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},sA(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:aA(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Qk(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},sA(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},sA(e,r,n),n}default:return n=oA(e,t),n}}function aA(e,t){let n=-1,r=[];for(;++n<t.length;){let i=iA(e,t[n]);r.push(i)}return r}function oA(e,t){let n=e.schema;e.schema=t.namespaceURI===eA.svg?Fk:Pk;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;tA.call(nA,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Zk:Xk)(t.tagName,i,aA(e,t.childNodes));if(sA(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&lA(r.startTag),o=r&&r.endTag&&lA(r.endTag),s=iA(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function sA(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=cA(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function cA(e,t,n){let r=lA(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)tA.call(n.attrs,i)&&(r[Nk(e.schema,i).property]=lA(n.attrs[i]));n.startTag;let a=lA(n.startTag),o=n.endTag?lA(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function lA(e){let t=uA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=uA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function uA(e){return e.line&&e.column?e:void 0}var dA=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),U;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(U||={});var fA={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function pA(e){return e>=55296&&e<=57343}function mA(e){return e>=56320&&e<=57343}function hA(e,t){return(e-55296)*1024+9216+t}function gA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _A(e){return e>=64976&&e<=65007||dA.has(e)}var W;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(W||={});var vA=65536,yA=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=vA,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(mA(t))return this.pos++,this._addGap(),hA(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(W.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let n=this.html.charCodeAt(t);return n===U.CARRIAGE_RETURN?U.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let e=this.html.charCodeAt(this.pos);return e===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):e===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,pA(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===U.LINE_FEED||e===U.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){gA(e)?this._err(W.controlCharacterInInputStream):_A(e)&&this._err(W.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},bA;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(bA||={});function xA(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var SA=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),CA=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function wA(e){return e>=55296&&e<=57343||e>1114111?65533:CA.get(e)??e}var TA;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(TA||={});var EA=32,DA;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(DA||={});function OA(e){return e>=TA.ZERO&&e<=TA.NINE}function kA(e){return e>=TA.UPPER_A&&e<=TA.UPPER_F||e>=TA.LOWER_A&&e<=TA.LOWER_F}function AA(e){return e>=TA.UPPER_A&&e<=TA.UPPER_Z||e>=TA.LOWER_A&&e<=TA.LOWER_Z||OA(e)}function jA(e){return e===TA.EQUALS||AA(e)}var MA;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(MA||={});var NA;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(NA||={});var PA=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=MA.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=NA.Strict}startEntity(e){this.decodeMode=e,this.state=MA.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case MA.EntityStart:return e.charCodeAt(t)===TA.NUM?(this.state=MA.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=MA.NamedEntity,this.stateNamedEntity(e,t));case MA.NumericStart:return this.stateNumericStart(e,t);case MA.NumericDecimal:return this.stateNumericDecimal(e,t);case MA.NumericHex:return this.stateNumericHex(e,t);case MA.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|EA)===TA.LOWER_X?(this.state=MA.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=MA.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(OA(r)||kA(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(OA(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===TA.SEMI)this.consumed+=1;else if(this.decodeMode===NA.Strict)return 0;return this.emitCodePoint(wA(this.result),this.consumed),this.errors&&(e!==TA.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&DA.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=FA(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===NA.Attribute&&(i===0||jA(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&DA.VALUE_LENGTH)>>14,i!==0){if(a===TA.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==NA.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&DA.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~DA.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case MA.NamedEntity:return this.result!==0&&(this.decodeMode!==NA.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case MA.NumericDecimal:return this.emitNumericEntity(0,2);case MA.NumericHex:return this.emitNumericEntity(0,3);case MA.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case MA.EntityStart:return 0}}};function FA(e,t,n,r){let i=(t&DA.BRANCH_LENGTH)>>7,a=t&DA.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var G;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(G||={});var IA;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(IA||={});var LA;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(LA||={});var K;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(K||={});var q;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(q||={});var RA=new Map([[K.A,q.A],[K.ADDRESS,q.ADDRESS],[K.ANNOTATION_XML,q.ANNOTATION_XML],[K.APPLET,q.APPLET],[K.AREA,q.AREA],[K.ARTICLE,q.ARTICLE],[K.ASIDE,q.ASIDE],[K.B,q.B],[K.BASE,q.BASE],[K.BASEFONT,q.BASEFONT],[K.BGSOUND,q.BGSOUND],[K.BIG,q.BIG],[K.BLOCKQUOTE,q.BLOCKQUOTE],[K.BODY,q.BODY],[K.BR,q.BR],[K.BUTTON,q.BUTTON],[K.CAPTION,q.CAPTION],[K.CENTER,q.CENTER],[K.CODE,q.CODE],[K.COL,q.COL],[K.COLGROUP,q.COLGROUP],[K.DD,q.DD],[K.DESC,q.DESC],[K.DETAILS,q.DETAILS],[K.DIALOG,q.DIALOG],[K.DIR,q.DIR],[K.DIV,q.DIV],[K.DL,q.DL],[K.DT,q.DT],[K.EM,q.EM],[K.EMBED,q.EMBED],[K.FIELDSET,q.FIELDSET],[K.FIGCAPTION,q.FIGCAPTION],[K.FIGURE,q.FIGURE],[K.FONT,q.FONT],[K.FOOTER,q.FOOTER],[K.FOREIGN_OBJECT,q.FOREIGN_OBJECT],[K.FORM,q.FORM],[K.FRAME,q.FRAME],[K.FRAMESET,q.FRAMESET],[K.H1,q.H1],[K.H2,q.H2],[K.H3,q.H3],[K.H4,q.H4],[K.H5,q.H5],[K.H6,q.H6],[K.HEAD,q.HEAD],[K.HEADER,q.HEADER],[K.HGROUP,q.HGROUP],[K.HR,q.HR],[K.HTML,q.HTML],[K.I,q.I],[K.IMG,q.IMG],[K.IMAGE,q.IMAGE],[K.INPUT,q.INPUT],[K.IFRAME,q.IFRAME],[K.KEYGEN,q.KEYGEN],[K.LABEL,q.LABEL],[K.LI,q.LI],[K.LINK,q.LINK],[K.LISTING,q.LISTING],[K.MAIN,q.MAIN],[K.MALIGNMARK,q.MALIGNMARK],[K.MARQUEE,q.MARQUEE],[K.MATH,q.MATH],[K.MENU,q.MENU],[K.META,q.META],[K.MGLYPH,q.MGLYPH],[K.MI,q.MI],[K.MO,q.MO],[K.MN,q.MN],[K.MS,q.MS],[K.MTEXT,q.MTEXT],[K.NAV,q.NAV],[K.NOBR,q.NOBR],[K.NOFRAMES,q.NOFRAMES],[K.NOEMBED,q.NOEMBED],[K.NOSCRIPT,q.NOSCRIPT],[K.OBJECT,q.OBJECT],[K.OL,q.OL],[K.OPTGROUP,q.OPTGROUP],[K.OPTION,q.OPTION],[K.P,q.P],[K.PARAM,q.PARAM],[K.PLAINTEXT,q.PLAINTEXT],[K.PRE,q.PRE],[K.RB,q.RB],[K.RP,q.RP],[K.RT,q.RT],[K.RTC,q.RTC],[K.RUBY,q.RUBY],[K.S,q.S],[K.SCRIPT,q.SCRIPT],[K.SEARCH,q.SEARCH],[K.SECTION,q.SECTION],[K.SELECT,q.SELECT],[K.SOURCE,q.SOURCE],[K.SMALL,q.SMALL],[K.SPAN,q.SPAN],[K.STRIKE,q.STRIKE],[K.STRONG,q.STRONG],[K.STYLE,q.STYLE],[K.SUB,q.SUB],[K.SUMMARY,q.SUMMARY],[K.SUP,q.SUP],[K.TABLE,q.TABLE],[K.TBODY,q.TBODY],[K.TEMPLATE,q.TEMPLATE],[K.TEXTAREA,q.TEXTAREA],[K.TFOOT,q.TFOOT],[K.TD,q.TD],[K.TH,q.TH],[K.THEAD,q.THEAD],[K.TITLE,q.TITLE],[K.TR,q.TR],[K.TRACK,q.TRACK],[K.TT,q.TT],[K.U,q.U],[K.UL,q.UL],[K.SVG,q.SVG],[K.VAR,q.VAR],[K.WBR,q.WBR],[K.XMP,q.XMP]]);function zA(e){return RA.get(e)??q.UNKNOWN}var J=q,BA={[G.HTML]:new Set([J.ADDRESS,J.APPLET,J.AREA,J.ARTICLE,J.ASIDE,J.BASE,J.BASEFONT,J.BGSOUND,J.BLOCKQUOTE,J.BODY,J.BR,J.BUTTON,J.CAPTION,J.CENTER,J.COL,J.COLGROUP,J.DD,J.DETAILS,J.DIR,J.DIV,J.DL,J.DT,J.EMBED,J.FIELDSET,J.FIGCAPTION,J.FIGURE,J.FOOTER,J.FORM,J.FRAME,J.FRAMESET,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HEADER,J.HGROUP,J.HR,J.HTML,J.IFRAME,J.IMG,J.INPUT,J.LI,J.LINK,J.LISTING,J.MAIN,J.MARQUEE,J.MENU,J.META,J.NAV,J.NOEMBED,J.NOFRAMES,J.NOSCRIPT,J.OBJECT,J.OL,J.P,J.PARAM,J.PLAINTEXT,J.PRE,J.SCRIPT,J.SECTION,J.SELECT,J.SOURCE,J.STYLE,J.SUMMARY,J.TABLE,J.TBODY,J.TD,J.TEMPLATE,J.TEXTAREA,J.TFOOT,J.TH,J.THEAD,J.TITLE,J.TR,J.TRACK,J.UL,J.WBR,J.XMP]),[G.MATHML]:new Set([J.MI,J.MO,J.MN,J.MS,J.MTEXT,J.ANNOTATION_XML]),[G.SVG]:new Set([J.TITLE,J.FOREIGN_OBJECT,J.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},VA=new Set([J.H1,J.H2,J.H3,J.H4,J.H5,J.H6]);new Set([K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT]);var Y;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Y||={});var HA={DATA:Y.DATA,RCDATA:Y.RCDATA,RAWTEXT:Y.RAWTEXT,SCRIPT_DATA:Y.SCRIPT_DATA,PLAINTEXT:Y.PLAINTEXT,CDATA_SECTION:Y.CDATA_SECTION};function UA(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function WA(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function GA(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function KA(e){return GA(e)||WA(e)}function qA(e){return KA(e)||UA(e)}function JA(e){return e+32}function YA(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function XA(e){return YA(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function ZA(e){return e===U.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:pA(e)?W.surrogateCharacterReference:_A(e)?W.noncharacterCharacterReference:gA(e)||e===U.CARRIAGE_RETURN?W.controlCharacterReference:null}var QA=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Y.DATA,this.returnState=Y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new yA(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new PA(SA,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=ZA(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:bA.START_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:bA.END_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:bA.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:bA.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(xA(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(W.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=zA(e.tagName),e.type===bA.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(W.endTagWithAttributes),e.selfClosing&&this._err(W.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case bA.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case bA.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case bA.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:bA.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=YA(e)?bA.WHITESPACE_CHARACTER:e===U.NULL?bA.NULL_CHARACTER:bA.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(bA.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?NA.Attribute:NA.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Y.DATA:this._stateData(e);break;case Y.RCDATA:this._stateRcdata(e);break;case Y.RAWTEXT:this._stateRawtext(e);break;case Y.SCRIPT_DATA:this._stateScriptData(e);break;case Y.PLAINTEXT:this._statePlaintext(e);break;case Y.TAG_OPEN:this._stateTagOpen(e);break;case Y.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Y.TAG_NAME:this._stateTagName(e);break;case Y.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Y.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Y.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Y.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Y.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Y.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Y.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Y.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Y.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Y.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Y.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Y.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Y.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Y.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Y.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Y.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Y.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Y.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Y.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Y.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Y.BOGUS_COMMENT:this._stateBogusComment(e);break;case Y.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Y.COMMENT_START:this._stateCommentStart(e);break;case Y.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Y.COMMENT:this._stateComment(e);break;case Y.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Y.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Y.COMMENT_END:this._stateCommentEnd(e);break;case Y.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Y.DOCTYPE:this._stateDoctype(e);break;case Y.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Y.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Y.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Y.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Y.CDATA_SECTION:this._stateCdataSection(e);break;case Y.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Y.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Y.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Y.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.TAG_OPEN;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitCodePoint(e);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case U.AMPERSAND:this._startCharacterReference();break;case U.LESS_THAN_SIGN:this.state=Y.RCDATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.RAWTEXT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(KA(e))this._createStartTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.EXCLAMATION_MARK:this.state=Y.MARKUP_DECLARATION_OPEN;break;case U.SOLIDUS:this.state=Y.END_TAG_OPEN;break;case U.QUESTION_MARK:this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e);break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Y.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(KA(e))this._createEndTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.GREATER_THAN_SIGN:this._err(W.missingEndTagName),this.state=Y.DATA;break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.tagName+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(WA(e)?JA(e):e)}}_stateRcdataLessThanSign(e){e===U.SOLIDUS?this.state=Y.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){KA(e)?(this.state=Y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Y.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Y.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===U.SOLIDUS?this.state=Y.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){KA(e)?(this.state=Y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case U.SOLIDUS:this.state=Y.SCRIPT_DATA_END_TAG_OPEN;break;case U.EXCLAMATION_MARK:this.state=Y.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){KA(e)?(this.state=Y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===U.SOLIDUS?this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:KA(e)?(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){KA(e)?(this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(fA.SCRIPT,!1)&&XA(this.preprocessor.peek(fA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<fA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===U.SOLIDUS?(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(fA.SCRIPT,!1)&&XA(this.preprocessor.peek(fA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<fA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Y.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this._leaveAttrName(),this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._leaveAttrName(),this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(WA(e)?JA(e):e)}}_stateAfterAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.EQUALS_SIGN:this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:this.state=Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case U.APOSTROPHE:this.state=Y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingAttributeValue),this.state=Y.DATA,this.emitCurrentTagToken();break;default:this.state=Y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case U.APOSTROPHE:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.AMPERSAND:this._startCharacterReference();break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this._leaveAttrValue(),this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.missingWhitespaceBetweenAttributes),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case U.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Y.DATA,this.emitCurrentTagToken();break}case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.unexpectedSolidusInTag),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(fA.DASH_DASH,!0)?(this._createCommentToken(fA.DASH_DASH.length+1),this.state=Y.COMMENT_START):this._consumeSequenceIfMatch(fA.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fA.DOCTYPE.length+1),this.state=Y.DOCTYPE):this._consumeSequenceIfMatch(fA.CDATA_START,!0)?this.inForeignNode?this.state=Y.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(fA.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_START_DASH;break;case U.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.GREATER_THAN_SIGN:this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END_DASH;break;case U.LESS_THAN_SIGN:t.data+=`<`,this.state=Y.COMMENT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case U.EXCLAMATION_MARK:t.data+=`!`,this.state=Y.COMMENT_LESS_THAN_SIGN_BANG;break;case U.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Y.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Y.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==U.GREATER_THAN_SIGN&&e!==U.EOF&&this._err(W.nestedComment),this.state=Y.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EXCLAMATION_MARK:this.state=Y.COMMENT_END_BANG;break;case U.HYPHEN_MINUS:t.data+=`-`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:t.data+=`--!`,this.state=Y.COMMENT_END_DASH;break;case U.GREATER_THAN_SIGN:this._err(W.incorrectlyClosedComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Y.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(WA(e))this._createDoctypeToken(String.fromCharCode(JA(e))),this.state=Y.DOCTYPE_NAME;else switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:this._err(W.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Y.DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Y.DATA;break}case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Y.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.AFTER_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.NULL:this._err(W.unexpectedNullCharacter),t.name+=`�`;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(WA(e)?JA(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(fA.PUBLIC,!1)?this.state=Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fA.SYSTEM,!1)?this.state=Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.NULL:this._err(W.unexpectedNullCharacter);break;case U.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case U.RIGHT_SQUARE_BRACKET:this.state=Y.CDATA_SECTION_BRACKET;break;case U.EOF:this._err(W.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===U.RIGHT_SQUARE_BRACKET?this.state=Y.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA;break;case U.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&qA(this.preprocessor.peek(1))?Y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){qA(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===U.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},$A=new Set([q.DD,q.DT,q.LI,q.OPTGROUP,q.OPTION,q.P,q.RB,q.RP,q.RT,q.RTC]),ej=new Set([...$A,q.CAPTION,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]),tj=new Set([q.APPLET,q.CAPTION,q.HTML,q.MARQUEE,q.OBJECT,q.TABLE,q.TD,q.TEMPLATE,q.TH]),nj=new Set([...tj,q.OL,q.UL]),rj=new Set([...tj,q.BUTTON]),ij=new Set([q.ANNOTATION_XML,q.MI,q.MN,q.MO,q.MS,q.MTEXT]),aj=new Set([q.DESC,q.FOREIGN_OBJECT,q.TITLE]),oj=new Set([q.TR,q.TEMPLATE,q.HTML]),sj=new Set([q.TBODY,q.TFOOT,q.THEAD,q.TEMPLATE,q.HTML]),cj=new Set([q.TABLE,q.TEMPLATE,q.HTML]),lj=new Set([q.TD,q.TH]),uj=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=q.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===q.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==G.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(VA,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(lj,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(cj,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sj,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(oj,G.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===q.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===q.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case G.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case G.SVG:if(aj.has(r))return!1;break;case G.MATHML:if(ij.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,tj)}hasInListItemScope(e){return this.hasInDynamicScope(e,nj)}hasInButtonScope(e){return this.hasInDynamicScope(e,rj)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case G.HTML:if(VA.has(t))return!0;if(tj.has(t))return!1;break;case G.SVG:if(aj.has(t))return!1;break;case G.MATHML:if(ij.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===G.HTML)switch(this.tagIDs[e]){case q.TBODY:case q.THEAD:case q.TFOOT:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.OPTION:case q.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$A.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ej.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ej.has(this.currentTagId);)this.pop()}},dj=3,fj;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(fj||={});var pj={type:fj.Marker},mj=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===fj.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<dj)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<dj)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=dj&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(pj)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:fj.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:fj.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(pj);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===fj.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===fj.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===fj.Element&&t.element===e)}},hj={createDocument(){return{nodeName:`#document`,mode:LA.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};hj.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(hj.isTextNode(n)){n.value+=t;return}}hj.appendChild(e,hj.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&hj.isTextNode(r)?r.value+=t:hj.insertBefore(e,hj.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},gj=`html`,_j=`about:legacy-compat`,vj=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,yj=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),bj=[...yj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],xj=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Sj=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Cj=[...Sj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function wj(e,t){return t.some(t=>e.startsWith(t))}function Tj(e){return e.name===gj&&e.publicId===null&&(e.systemId===null||e.systemId===_j)}function Ej(e){if(e.name!==gj)return LA.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===vj)return LA.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xj.has(n))return LA.QUIRKS;let e=t===null?bj:yj;if(wj(n,e))return LA.QUIRKS;if(e=t===null?Sj:Cj,wj(n,e))return LA.LIMITED_QUIRKS}return LA.NO_QUIRKS}var Dj={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Oj=`definitionurl`,kj=`definitionURL`,Aj=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),jj=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:G.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:G.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:G.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:G.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:G.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:G.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:G.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:G.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:G.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:G.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:G.XMLNS}]]),Mj=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Nj=new Set([q.B,q.BIG,q.BLOCKQUOTE,q.BODY,q.BR,q.CENTER,q.CODE,q.DD,q.DIV,q.DL,q.DT,q.EM,q.EMBED,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HR,q.I,q.IMG,q.LI,q.LISTING,q.MENU,q.META,q.NOBR,q.OL,q.P,q.PRE,q.RUBY,q.S,q.SMALL,q.SPAN,q.STRONG,q.STRIKE,q.SUB,q.SUP,q.TABLE,q.TT,q.U,q.UL,q.VAR]);function Pj(e){let t=e.tagID;return t===q.FONT&&e.attrs.some(({name:e})=>e===IA.COLOR||e===IA.SIZE||e===IA.FACE)||Nj.has(t)}function Fj(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Oj){e.attrs[t].name=kj;break}}function Ij(e){for(let t=0;t<e.attrs.length;t++){let n=Aj.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Lj(e){for(let t=0;t<e.attrs.length;t++){let n=jj.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Rj(e){let t=Mj.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zA(e.tagName))}function zj(e,t){return t===G.MATHML&&(e===q.MI||e===q.MO||e===q.MN||e===q.MS||e===q.MTEXT)}function Bj(e,t,n){if(t===G.MATHML&&e===q.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===IA.ENCODING){let t=n[e].value.toLowerCase();return t===Dj.TEXT_HTML||t===Dj.APPLICATION_XML}}return t===G.SVG&&(e===q.FOREIGN_OBJECT||e===q.DESC||e===q.TITLE)}function Vj(e,t,n,r){return(!r||r===G.HTML)&&Bj(e,t,n)||(!r||r===G.MATHML)&&zj(e,t)}var Hj=`hidden`,Uj=8,Wj=3,X;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(X||={});var Gj={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Kj=new Set([q.TABLE,q.TBODY,q.TFOOT,q.THEAD,q.TR]),qj={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:hj,onParseError:null},Jj=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=X.INITIAL,this.originalInsertionMode=X.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...qj,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new QA(this.options,this),this.activeFormattingElements=new mj(this.treeAdapter),this.fragmentContextID=n?zA(this.treeAdapter.getTagName(n)):q.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new uj(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...qj,...t};e??=n.treeAdapter.createElement(K.TEMPLATE,G.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,G.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===q.TEMPLATE&&i.tmplInsertionModeStack.unshift(X.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Gj,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===G.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,G.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=X.TEXT}switchToPlaintextParsing(){this.insertionMode=X.TEXT,this.originalInsertionMode=X.IN_BODY,this.tokenizer.state=HA.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===K.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case q.TITLE:case q.TEXTAREA:this.tokenizer.state=HA.RCDATA;break;case q.STYLE:case q.XMP:case q.IFRAME:case q.NOEMBED:case q.NOFRAMES:case q.NOSCRIPT:this.tokenizer.state=HA.RAWTEXT;break;case q.SCRIPT:this.tokenizer.state=HA.SCRIPT_DATA;break;case q.PLAINTEXT:this.tokenizer.state=HA.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,G.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,G.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(K.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,q.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===bA.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===q.SVG&&this.treeAdapter.getTagName(t)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===G.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===q.MGLYPH||e.tagID===q.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,G.HTML)}_processToken(e){switch(e.type){case bA.CHARACTER:this.onCharacter(e);break;case bA.NULL_CHARACTER:this.onNullCharacter(e);break;case bA.COMMENT:this.onComment(e);break;case bA.DOCTYPE:this.onDoctype(e);break;case bA.START_TAG:this._processStartTag(e);break;case bA.END_TAG:this.onEndTag(e);break;case bA.EOF:this.onEof(e);break;case bA.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return Vj(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===fj.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=X.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(q.P),this.openElements.popUntilTagNamePopped(q.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case q.TR:this.insertionMode=X.IN_ROW;return;case q.TBODY:case q.THEAD:case q.TFOOT:this.insertionMode=X.IN_TABLE_BODY;return;case q.CAPTION:this.insertionMode=X.IN_CAPTION;return;case q.COLGROUP:this.insertionMode=X.IN_COLUMN_GROUP;return;case q.TABLE:this.insertionMode=X.IN_TABLE;return;case q.BODY:this.insertionMode=X.IN_BODY;return;case q.FRAMESET:this.insertionMode=X.IN_FRAMESET;return;case q.SELECT:this._resetInsertionModeForSelect(e);return;case q.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case q.HTML:this.insertionMode=this.headElement?X.AFTER_HEAD:X.BEFORE_HEAD;return;case q.TD:case q.TH:if(e>0){this.insertionMode=X.IN_CELL;return}break;case q.HEAD:if(e>0){this.insertionMode=X.IN_HEAD;return}break}this.insertionMode=X.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===q.TEMPLATE)break;if(e===q.TABLE){this.insertionMode=X.IN_SELECT_IN_TABLE;return}}this.insertionMode=X.IN_SELECT}_isElementCausesFosterParenting(e){return Kj.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case q.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case q.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return BA[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fP(this,e);return}switch(this.insertionMode){case X.INITIAL:sM(this,e);break;case X.BEFORE_HTML:uM(this,e);break;case X.BEFORE_HEAD:pM(this,e);break;case X.IN_HEAD:_M(this,e);break;case X.IN_HEAD_NO_SCRIPT:bM(this,e);break;case X.AFTER_HEAD:CM(this,e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:EM(this,e);break;case X.TEXT:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:xN(this,e);break;case X.IN_TABLE_TEXT:PN(this,e);break;case X.IN_COLUMN_GROUP:VN(this,e);break;case X.AFTER_BODY:rP(this,e);break;case X.AFTER_AFTER_BODY:lP(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dP(this,e);return}switch(this.insertionMode){case X.INITIAL:sM(this,e);break;case X.BEFORE_HTML:uM(this,e);break;case X.BEFORE_HEAD:pM(this,e);break;case X.IN_HEAD:_M(this,e);break;case X.IN_HEAD_NO_SCRIPT:bM(this,e);break;case X.AFTER_HEAD:CM(this,e);break;case X.TEXT:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:xN(this,e);break;case X.IN_COLUMN_GROUP:VN(this,e);break;case X.AFTER_BODY:rP(this,e);break;case X.AFTER_AFTER_BODY:lP(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){nM(this,e);return}switch(this.insertionMode){case X.INITIAL:case X.BEFORE_HTML:case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_TEMPLATE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:nM(this,e);break;case X.IN_TABLE_TEXT:FN(this,e);break;case X.AFTER_BODY:rM(this,e);break;case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:iM(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case X.INITIAL:oM(this,e);break;case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:this._err(e,W.misplacedDoctype);break;case X.IN_TABLE_TEXT:FN(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?mP(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:sM(this,e);break;case X.BEFORE_HTML:cM(this,e);break;case X.BEFORE_HEAD:dM(this,e);break;case X.IN_HEAD:mM(this,e);break;case X.IN_HEAD_NO_SCRIPT:vM(this,e);break;case X.AFTER_HEAD:xM(this,e);break;case X.IN_BODY:aN(this,e);break;case X.IN_TABLE:AN(this,e);break;case X.IN_TABLE_TEXT:FN(this,e);break;case X.IN_CAPTION:LN(this,e);break;case X.IN_COLUMN_GROUP:zN(this,e);break;case X.IN_TABLE_BODY:HN(this,e);break;case X.IN_ROW:WN(this,e);break;case X.IN_CELL:KN(this,e);break;case X.IN_SELECT:JN(this,e);break;case X.IN_SELECT_IN_TABLE:XN(this,e);break;case X.IN_TEMPLATE:QN(this,e);break;case X.AFTER_BODY:tP(this,e);break;case X.IN_FRAMESET:iP(this,e);break;case X.AFTER_FRAMESET:oP(this,e);break;case X.AFTER_AFTER_BODY:cP(this,e);break;case X.AFTER_AFTER_FRAMESET:uP(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?hP(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:sM(this,e);break;case X.BEFORE_HTML:lM(this,e);break;case X.BEFORE_HEAD:fM(this,e);break;case X.IN_HEAD:hM(this,e);break;case X.IN_HEAD_NO_SCRIPT:yM(this,e);break;case X.AFTER_HEAD:SM(this,e);break;case X.IN_BODY:_N(this,e);break;case X.TEXT:yN(this,e);break;case X.IN_TABLE:jN(this,e);break;case X.IN_TABLE_TEXT:FN(this,e);break;case X.IN_CAPTION:RN(this,e);break;case X.IN_COLUMN_GROUP:BN(this,e);break;case X.IN_TABLE_BODY:UN(this,e);break;case X.IN_ROW:GN(this,e);break;case X.IN_CELL:qN(this,e);break;case X.IN_SELECT:YN(this,e);break;case X.IN_SELECT_IN_TABLE:ZN(this,e);break;case X.IN_TEMPLATE:$N(this,e);break;case X.AFTER_BODY:nP(this,e);break;case X.IN_FRAMESET:aP(this,e);break;case X.AFTER_FRAMESET:sP(this,e);break;case X.AFTER_AFTER_BODY:lP(this,e);break;default:}}onEof(e){switch(this.insertionMode){case X.INITIAL:sM(this,e);break;case X.BEFORE_HTML:uM(this,e);break;case X.BEFORE_HEAD:pM(this,e);break;case X.IN_HEAD:_M(this,e);break;case X.IN_HEAD_NO_SCRIPT:bM(this,e);break;case X.AFTER_HEAD:CM(this,e);break;case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:vN(this,e);break;case X.TEXT:bN(this,e);break;case X.IN_TABLE_TEXT:FN(this,e);break;case X.IN_TEMPLATE:eP(this,e);break;case X.AFTER_BODY:case X.IN_FRAMESET:case X.AFTER_FRAMESET:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:aM(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===U.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.TEXT:case X.IN_COLUMN_GROUP:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:this._insertCharacters(e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:case X.AFTER_BODY:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:TM(this,e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:xN(this,e);break;case X.IN_TABLE_TEXT:NN(this,e);break;default:}}};function Yj(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):gN(e,t),n}function Xj(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Zj(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Wj;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Qj(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Qj(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $j(e,t,n){let r=zA(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===q.TEMPLATE&&i===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function eM(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function tM(e,t){for(let n=0;n<Uj;n++){let n=Yj(e,t);if(!n)break;let r=Xj(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Zj(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&$j(e,a,i),eM(e,r,n)}}function nM(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function rM(e,t){e._appendCommentNode(t,e.openElements.items[0])}function iM(e,t){e._appendCommentNode(t,e.document)}function aM(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function oM(e,t){e._setDocumentType(t);let n=t.forceQuirks?LA.QUIRKS:Ej(t);Tj(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=X.BEFORE_HTML}function sM(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,LA.QUIRKS),e.insertionMode=X.BEFORE_HTML,e._processToken(t)}function cM(e,t){t.tagID===q.HTML?(e._insertElement(t,G.HTML),e.insertionMode=X.BEFORE_HEAD):uM(e,t)}function lM(e,t){let n=t.tagID;(n===q.HTML||n===q.HEAD||n===q.BODY||n===q.BR)&&uM(e,t)}function uM(e,t){e._insertFakeRootElement(),e.insertionMode=X.BEFORE_HEAD,e._processToken(t)}function dM(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.HEAD:e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD;break;default:pM(e,t)}}function fM(e,t){let n=t.tagID;n===q.HEAD||n===q.BODY||n===q.HTML||n===q.BR?pM(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function pM(e,t){e._insertFakeElement(K.HEAD,q.HEAD),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD,e._processToken(t)}function mM(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TITLE:e._switchToTextParsing(t,HA.RCDATA);break;case q.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,HA.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=X.IN_HEAD_NO_SCRIPT);break;case q.NOFRAMES:case q.STYLE:e._switchToTextParsing(t,HA.RAWTEXT);break;case q.SCRIPT:e._switchToTextParsing(t,HA.SCRIPT_DATA);break;case q.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=X.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(X.IN_TEMPLATE);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:_M(e,t)}}function hM(e,t){switch(t.tagID){case q.HEAD:e.openElements.pop(),e.insertionMode=X.AFTER_HEAD;break;case q.BODY:case q.BR:case q.HTML:_M(e,t);break;case q.TEMPLATE:gM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function gM(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==q.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function _M(e,t){e.openElements.pop(),e.insertionMode=X.AFTER_HEAD,e._processToken(t)}function vM(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.BASEFONT:case q.BGSOUND:case q.HEAD:case q.LINK:case q.META:case q.NOFRAMES:case q.STYLE:mM(e,t);break;case q.NOSCRIPT:e._err(t,W.nestedNoscriptInHead);break;default:bM(e,t)}}function yM(e,t){switch(t.tagID){case q.NOSCRIPT:e.openElements.pop(),e.insertionMode=X.IN_HEAD;break;case q.BR:bM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function bM(e,t){let n=t.type===bA.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=X.IN_HEAD,e._processToken(t)}function xM(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.BODY:e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_BODY;break;case q.FRAMESET:e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET;break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,q.HEAD),mM(e,t),e.openElements.remove(e.headElement);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:CM(e,t)}}function SM(e,t){switch(t.tagID){case q.BODY:case q.HTML:case q.BR:CM(e,t);break;case q.TEMPLATE:gM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function CM(e,t){e._insertFakeElement(K.BODY,q.BODY),e.insertionMode=X.IN_BODY,wM(e,t)}function wM(e,t){switch(t.type){case bA.CHARACTER:EM(e,t);break;case bA.WHITESPACE_CHARACTER:TM(e,t);break;case bA.COMMENT:nM(e,t);break;case bA.START_TAG:aN(e,t);break;case bA.END_TAG:_N(e,t);break;case bA.EOF:vN(e,t);break;default:}}function TM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function EM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function DM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function OM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function kM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET)}function AM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function jM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&VA.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function MM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function NM(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function PM(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===q.LI&&r===q.LI||(n===q.DD||n===q.DT)&&(r===q.DD||r===q.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==q.ADDRESS&&r!==q.DIV&&r!==q.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function FM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=HA.PLAINTEXT}function IM(e,t){e.openElements.hasInScope(q.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function LM(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(tM(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zM(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(q.NOBR)&&(tM(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function VM(e,t){e.treeAdapter.getDocumentMode(e.document)!==LA.QUIRKS&&e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_TABLE}function HM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UM(e){let t=xA(e,IA.TYPE);return t!=null&&t.toLowerCase()===Hj}function WM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),UM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function GM(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function KM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qM(e,t){t.tagName=K.IMG,t.tagID=q.IMG,HM(e,t)}function JM(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=HA.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=X.TEXT}function YM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,HA.RAWTEXT)}function XM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,HA.RAWTEXT)}function ZM(e,t){e._switchToTextParsing(t,HA.RAWTEXT)}function QM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===X.IN_TABLE||e.insertionMode===X.IN_CAPTION||e.insertionMode===X.IN_TABLE_BODY||e.insertionMode===X.IN_ROW||e.insertionMode===X.IN_CELL?X.IN_SELECT_IN_TABLE:X.IN_SELECT}function $M(e,t){e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function eN(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function tN(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(q.RTC),e._insertElement(t,G.HTML)}function nN(e,t){e._reconstructActiveFormattingElements(),Fj(t),Lj(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function rN(e,t){e._reconstructActiveFormattingElements(),Ij(t),Lj(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function iN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function aN(e,t){switch(t.tagID){case q.I:case q.S:case q.B:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.SMALL:case q.STRIKE:case q.STRONG:RM(e,t);break;case q.A:LM(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:jM(e,t);break;case q.P:case q.DL:case q.OL:case q.UL:case q.DIV:case q.DIR:case q.NAV:case q.MAIN:case q.MENU:case q.ASIDE:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.DETAILS:case q.ADDRESS:case q.ARTICLE:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:AM(e,t);break;case q.LI:case q.DD:case q.DT:PM(e,t);break;case q.BR:case q.IMG:case q.WBR:case q.AREA:case q.EMBED:case q.KEYGEN:HM(e,t);break;case q.HR:KM(e,t);break;case q.RB:case q.RTC:eN(e,t);break;case q.RT:case q.RP:tN(e,t);break;case q.PRE:case q.LISTING:MM(e,t);break;case q.XMP:YM(e,t);break;case q.SVG:rN(e,t);break;case q.HTML:DM(e,t);break;case q.BASE:case q.LINK:case q.META:case q.STYLE:case q.TITLE:case q.SCRIPT:case q.BGSOUND:case q.BASEFONT:case q.TEMPLATE:mM(e,t);break;case q.BODY:OM(e,t);break;case q.FORM:NM(e,t);break;case q.NOBR:zM(e,t);break;case q.MATH:nN(e,t);break;case q.TABLE:VM(e,t);break;case q.INPUT:WM(e,t);break;case q.PARAM:case q.TRACK:case q.SOURCE:GM(e,t);break;case q.IMAGE:qM(e,t);break;case q.BUTTON:IM(e,t);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:BM(e,t);break;case q.IFRAME:XM(e,t);break;case q.SELECT:QM(e,t);break;case q.OPTION:case q.OPTGROUP:$M(e,t);break;case q.NOEMBED:case q.NOFRAMES:ZM(e,t);break;case q.FRAMESET:kM(e,t);break;case q.TEXTAREA:JM(e,t);break;case q.NOSCRIPT:e.options.scriptingEnabled?ZM(e,t):iN(e,t);break;case q.PLAINTEXT:FM(e,t);break;case q.COL:case q.TH:case q.TD:case q.TR:case q.HEAD:case q.FRAME:case q.TBODY:case q.TFOOT:case q.THEAD:case q.CAPTION:case q.COLGROUP:break;default:iN(e,t)}}function oN(e,t){if(e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function sN(e,t){e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,nP(e,t))}function cN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function lN(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(q.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(q.FORM):n&&e.openElements.remove(n))}function uN(e){e.openElements.hasInButtonScope(q.P)||e._insertFakeElement(K.P,q.P),e._closePElement()}function dN(e){e.openElements.hasInListItemScope(q.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(q.LI),e.openElements.popUntilTagNamePopped(q.LI))}function fN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function pN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function hN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,q.BR),e.openElements.pop(),e.framesetOk=!1}function gN(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==q.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function _N(e,t){switch(t.tagID){case q.A:case q.B:case q.I:case q.S:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.NOBR:case q.SMALL:case q.STRIKE:case q.STRONG:tM(e,t);break;case q.P:uN(e);break;case q.DL:case q.UL:case q.OL:case q.DIR:case q.DIV:case q.NAV:case q.PRE:case q.MAIN:case q.MENU:case q.ASIDE:case q.BUTTON:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.ADDRESS:case q.ARTICLE:case q.DETAILS:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.LISTING:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:cN(e,t);break;case q.LI:dN(e);break;case q.DD:case q.DT:fN(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:pN(e);break;case q.BR:hN(e);break;case q.BODY:oN(e,t);break;case q.HTML:sN(e,t);break;case q.FORM:lN(e);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:mN(e,t);break;case q.TEMPLATE:gM(e,t);break;default:gN(e,t)}}function vN(e,t){e.tmplInsertionModeStack.length>0?eP(e,t):aM(e,t)}function yN(e,t){var n;t.tagID===q.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bN(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xN(e,t){if(e.openElements.currentTagId!==void 0&&Kj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=X.IN_TABLE_TEXT,t.type){case bA.CHARACTER:PN(e,t);break;case bA.WHITESPACE_CHARACTER:NN(e,t);break}else MN(e,t)}function SN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CAPTION}function CN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_COLUMN_GROUP}function wN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,q.COLGROUP),e.insertionMode=X.IN_COLUMN_GROUP,zN(e,t)}function TN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_TABLE_BODY}function EN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,q.TBODY),e.insertionMode=X.IN_TABLE_BODY,HN(e,t)}function DN(e,t){e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ON(e,t){UM(t)?e._appendElement(t,G.HTML):MN(e,t),t.ackSelfClosing=!0}function kN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function AN(e,t){switch(t.tagID){case q.TD:case q.TH:case q.TR:EN(e,t);break;case q.STYLE:case q.SCRIPT:case q.TEMPLATE:mM(e,t);break;case q.COL:wN(e,t);break;case q.FORM:kN(e,t);break;case q.TABLE:DN(e,t);break;case q.TBODY:case q.TFOOT:case q.THEAD:TN(e,t);break;case q.INPUT:ON(e,t);break;case q.CAPTION:SN(e,t);break;case q.COLGROUP:CN(e,t);break;default:MN(e,t)}}function jN(e,t){switch(t.tagID){case q.TABLE:e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode());break;case q.TEMPLATE:gM(e,t);break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:MN(e,t)}}function MN(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,wM(e,t),e.fosterParentingEnabled=n}function NN(e,t){e.pendingCharacterTokens.push(t)}function PN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function FN(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)MN(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var IN=new Set([q.CAPTION,q.COL,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]);function LN(e,t){let n=t.tagID;IN.has(n)?e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,AN(e,t)):aN(e,t)}function RN(e,t){let n=t.tagID;switch(n){case q.CAPTION:case q.TABLE:e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,n===q.TABLE&&jN(e,t));break;case q.BODY:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:_N(e,t)}}function zN(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.COL:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TEMPLATE:mM(e,t);break;default:VN(e,t)}}function BN(e,t){switch(t.tagID){case q.COLGROUP:e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TEMPLATE:gM(e,t);break;case q.COL:break;default:VN(e,t)}}function VN(e,t){e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE,e._processToken(t))}function HN(e,t){switch(t.tagID){case q.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_ROW;break;case q.TH:case q.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,q.TR),e.insertionMode=X.IN_ROW,WN(e,t);break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,AN(e,t));break;default:AN(e,t)}}function UN(e,t){let n=t.tagID;switch(t.tagID){case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,jN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:case q.TR:break;default:jN(e,t)}}function WN(e,t){switch(t.tagID){case q.TH:case q.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CELL,e.activeFormattingElements.insertMarker();break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,HN(e,t));break;default:AN(e,t)}}function GN(e,t){switch(t.tagID){case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY);break;case q.TABLE:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,UN(e,t));break;case q.TBODY:case q.TFOOT:case q.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(q.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,UN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:break;default:jN(e,t)}}function KN(e,t){let n=t.tagID;IN.has(n)?(e.openElements.hasInTableScope(q.TD)||e.openElements.hasInTableScope(q.TH))&&(e._closeTableCell(),WN(e,t)):aN(e,t)}function qN(e,t){let n=t.tagID;switch(n){case q.TD:case q.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_ROW);break;case q.TABLE:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),GN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:break;default:_N(e,t)}}function JN(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.OPTGROUP:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.HR:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.INPUT:case q.KEYGEN:case q.TEXTAREA:case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),t.tagID!==q.SELECT&&e._processStartTag(t));break;case q.SCRIPT:case q.TEMPLATE:mM(e,t);break;default:}}function YN(e,t){switch(t.tagID){case q.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===q.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===q.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop();break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop();break;case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode());break;case q.TEMPLATE:gM(e,t);break;default:}}function XN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e._processStartTag(t)):JN(e,t)}function ZN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e.onEndTag(t)):YN(e,t)}function QN(e,t){switch(t.tagID){case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:mM(e,t);break;case q.CAPTION:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.tmplInsertionModeStack[0]=X.IN_TABLE,e.insertionMode=X.IN_TABLE,AN(e,t);break;case q.COL:e.tmplInsertionModeStack[0]=X.IN_COLUMN_GROUP,e.insertionMode=X.IN_COLUMN_GROUP,zN(e,t);break;case q.TR:e.tmplInsertionModeStack[0]=X.IN_TABLE_BODY,e.insertionMode=X.IN_TABLE_BODY,HN(e,t);break;case q.TD:case q.TH:e.tmplInsertionModeStack[0]=X.IN_ROW,e.insertionMode=X.IN_ROW,WN(e,t);break;default:e.tmplInsertionModeStack[0]=X.IN_BODY,e.insertionMode=X.IN_BODY,aN(e,t)}}function $N(e,t){t.tagID===q.TEMPLATE&&gM(e,t)}function eP(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):aM(e,t)}function tP(e,t){t.tagID===q.HTML?aN(e,t):rP(e,t)}function nP(e,t){if(t.tagID===q.HTML){if(e.fragmentContext||(e.insertionMode=X.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===q.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else rP(e,t)}function rP(e,t){e.insertionMode=X.IN_BODY,wM(e,t)}function iP(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.FRAMESET:e._insertElement(t,G.HTML);break;case q.FRAME:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.NOFRAMES:mM(e,t);break;default:}}function aP(e,t){t.tagID===q.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==q.FRAMESET&&(e.insertionMode=X.AFTER_FRAMESET))}function oP(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.NOFRAMES:mM(e,t);break;default:}}function sP(e,t){t.tagID===q.HTML&&(e.insertionMode=X.AFTER_AFTER_FRAMESET)}function cP(e,t){t.tagID===q.HTML?aN(e,t):lP(e,t)}function lP(e,t){e.insertionMode=X.IN_BODY,wM(e,t)}function uP(e,t){switch(t.tagID){case q.HTML:aN(e,t);break;case q.NOFRAMES:mM(e,t);break;default:}}function dP(e,t){t.chars=`�`,e._insertCharacters(t)}function fP(e,t){e._insertCharacters(t),e.framesetOk=!1}function pP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mP(e,t){if(Pj(t))pP(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?Fj(t):r===G.SVG&&(Rj(t),Ij(t)),Lj(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function hP(e,t){if(t.tagID===q.P||t.tagID===q.BR){pP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR]);function gP(e,t){return Jj.parse(e,t)}function _P(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Jj.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var vP={basename:yP,dirname:bP,extname:xP,join:SP,sep:`/`};function yP(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);TP(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function bP(e){if(TP(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function xP(e){TP(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function SP(...e){let t=-1,n;for(;++t<e.length;)TP(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:CP(n)}function CP(e){TP(e);let t=e.codePointAt(0)===47,n=wP(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function wP(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function TP(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var EP={cwd:DP};function DP(){return`/`}function OP(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function kP(e){if(typeof e==`string`)e=new URL(e);else if(!OP(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return AP(e)}function AP(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var jP=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],MP=class{constructor(e){let t;t=e?OP(e)?{path:e}:typeof e==`string`||IP(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:EP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<jP.length;){let e=jP[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)jP.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?vP.basename(this.path):void 0}set basename(e){PP(e,`basename`),NP(e,`basename`),this.path=vP.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?vP.dirname(this.path):void 0}set dirname(e){FP(this.basename,`dirname`),this.path=vP.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?vP.extname(this.path):void 0}set extname(e){if(NP(e,`extname`),FP(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=vP.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){OP(e)&&(e=kP(e)),PP(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?vP.basename(this.path,this.extname):void 0}set stem(e){PP(e,`stem`),NP(e,`stem`),this.path=vP.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new pd(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function NP(e,t){if(e&&e.includes(vP.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+vP.sep+"`")}function PP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function FP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function IP(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var LP={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},RP=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,zP=/-[a-z]/g,BP=/%c(?:([-+])(\d+))?/g,VP=/%x/g,HP={2:!0,1:!1,0:null},UP={};function WP(e,t){let n=t||UP,r=n.onerror,i=e instanceof MP?e:new MP(e),a=n.fragment?_P:gP,o=String(i);return rA(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=GP(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=LP[a],o=new pd(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=HP[c],o.note=l(n.description),o.url=n.url===!1?void 0:RP+t,r(o)}function l(t){return t.replace(BP,n).replace(VP,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return qP(o.charAt(e.startOffset+i))}function r(){return JP(o.charCodeAt(e.startOffset))}}}}function GP(e){return e.replace(zP,KP)}function KP(e){return e.charAt(1).toUpperCase()}function qP(e){return e==="`"?"` ` `":e}function JP(e){return`0x`+e.toString(16).toUpperCase()}function YP(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return WP(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var XP=typeof self==`object`?self:globalThis,ZP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new XP[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new XP[a](o),i)};return r},QP=e=>ZP(new Map,e)(0),$P=``,{toString:eF}={},{keys:tF}=Object,nF=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=eF.call(e).slice(8,-1);switch(n){case`Array`:return[1,$P];case`Object`:return[2,$P];case`Date`:return[3,$P];case`RegExp`:return[4,$P];case`Map`:return[5,$P];case`Set`:return[6,$P];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},rF=([e,t])=>e===0&&(t===`function`||t===`symbol`),iF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=nF(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of tF(r))(e||!rF(nF(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(rF(nF(n))||rF(nF(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!rF(nF(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},aF=(e,{json:t,lossy:n}={})=>{let r=[];return iF(!(t||n),!!t,new Map,r)(e),r},oF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?QP(aF(e,t)):structuredClone(e):(e,t)=>QP(aF(e,t)),sF=(function(e,t,n,r,i){let a=cF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return pF(e)?a.call(i,e,n,r):!1}),cF=(function(e){if(e==null)return fF;if(typeof e==`string`)return uF(e);if(typeof e==`object`)return lF(e);if(typeof e==`function`)return dF(e);throw Error("Expected function, string, or array as `test`")});function lF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=cF(e[n]);return dF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function uF(e){return dF(t);function t(t){return t.tagName===e}}function dF(e){return t;function t(t,n,r){return!!(pF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function fF(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function pF(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var mF=cF(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),hF=/[ \t\n\f\r]/g;function gF(e){return typeof e==`object`?e.type===`text`?_F(e.value):!1:_F(e)}function _F(e){return e.replace(hF,``)===``}var vF=(function(e,t,n,r,i){let a=yF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!vF(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return TF(e)?a.call(i,e,n,r):!1}),yF=(function(e){if(e==null)return wF;if(typeof e==`function`)return CF(e);if(typeof e==`object`)return Array.isArray(e)?bF(e):xF(e);if(typeof e==`string`)return SF(e);throw Error(`Expected function, string, or object as test`)});function bF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=yF(e[n]);return CF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function xF(e){let t=e;return CF(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function SF(e){return CF(t);function t(t){return t&&t.type===e}}function CF(e){return t;function t(t,n,r){return!!(TF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function wF(){return!0}function TF(e){return typeof e==`object`&&!!e&&`type`in e}var EF=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),DF=[`button`,`input`,`select`,`textarea`],OF=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],kF={},AF=yF([`comment`,`doctype`]);function jF(e,t){MF(e,{collapse:UF((t||kF).newlines?VF:HF),whitespace:`normal`})}function MF(e,t){if(`children`in e){let n={...t};return(e.type===`root`||RF(e))&&(n.before=!0,n.after=!0),n.whitespace=WF(e,t),PF(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return NF(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:AF(e),stripAtStart:!1,remove:!1}}function NF(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&BF(n.charAt(0))&&i++,i!==a&&BF(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function PF(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=MF(i[o],{...t,after:FF(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),LF(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function FF(e,t,n){for(;++t<e.length;){let n=e[t],r=IF(n);if(r===void 0&&`children`in n&&!zF(n)&&(r=FF(n.children,-1)),typeof r==`boolean`)return r}return n}function IF(e){if(e.type===`element`){if(LF(e))return!1;if(RF(e))return!0}else if(e.type===`text`){if(!gF(e))return!1}else if(!AF(e))return!1}function LF(e){return mF(e)||sF(e,DF)}function RF(e){return sF(e,EF)}function zF(e){return!!(e.type===`element`&&e.properties.hidden)||AF(e)||sF(e,OF)}function BF(e){return e===` `||e===`
|
|
302
|
-
`}function
|
|
303
|
-
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function
|
|
304
|
-
`:dI(e)?(s=2,c=2):mI(e)&&(s=1,c=1);++a<i.length;)o=o.concat(gI(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?lI(i[a+1]):c}));return uI(e)&&oI(t,e,uI)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function vI(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){sI.lastIndex=a;let e=sI.exec(n),i=e&&`index`in e?e.index:n.length;r.push(bI(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function yI(e){return[String(e.value)]}function bI(e,t,n){let r=[],i=0,a;for(;i<e.length;){cI.lastIndex=i;let n=cI.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function xI(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function SI(e){return!!(e.properties||{}).hidden}function CI(e){return e.tagName===`td`||e.tagName===`th`}function wI(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function TI(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var EI=`language-`;function DI(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===EI){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:TI(hI(t))};return e.patch(t,o),o}function OI(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function kI(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function AI(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function jI(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...MI(e,r[i].titles),...MI(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:AI(o),children:o};return e.patch(t,n),n}}function MI(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,NI);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:AI(r),children:r}]}function NI(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function PI(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function FI(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function II(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:FI(e.all(t))};return e.patch(t,n),n}function LI(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function RI(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function zI(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function BI(e,t){let n={type:`inlineCode`,value:hI(t)};return e.patch(t,n),n}function VI(e,t){let n=[],r=[],i=t||e.properties||{},a=HI(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=hI(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function HI(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...HI(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var UI=`[x]`,WI=`[ ]`;function GI(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||UI:e.options.unchecked||WI};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=VI(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var KI={}.hasOwnProperty;function qI(e,t){let n=e.type===`element`&&KI.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var JI=new Set([`pingback`,`prefetch`,`stylesheet`]);function YI(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!JI.has(String(t[n])))return!1;return!0}var XI=cF(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),ZI=cF(`meta`);function QI(e){return!!(e.type===`text`||XI(e)||mF(e)||YI(e)||ZI(e)&&qI(e,`itemProp`))}function $I(e,t){let{rest:n,checkbox:r}=tL(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:eL(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function eL(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if(QI(r))continue;if(r.tagName===`p`||n||eL(r))return!0;n=!0}}return!1}function tL(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=tL(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function nL(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),rL),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:AI(r),children:r};return e.patch(t,a),a}function rL(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var iL={};function aL(e,t){let n=t||iL;return oL(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function oL(e,t,n){if(cL(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return sL(e.children,t,n)}return Array.isArray(e)?sL(e,t,n):``}function sL(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=oL(e[i],t,n);return r.join(``)}function cL(e){return!!(e&&typeof e==`object`)}var lL=yF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function uL(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!hL(n)||`children`in n&&uL(n.children))return!0}return!1}function dL(e){return pL(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?gF(e.value):!1})?[]:[{type:`paragraph`,children:FI(e)}]}}function fL(e){return pL(e.children,t,n);function t(t){let n=gL(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=gL(e),r=gL(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function pL(e,t,n){let r=mL(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];hL(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function mL(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&uL(r.children)?t.push(...fL(r)):t.push(r)}return t}function hL(e){let t=e.data&&e.data.hName;return t?QI({type:`element`,tagName:t,properties:{},children:[]}):lL(e)}function gL(e){return oF({...e,children:[]})}function _L(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(ZF({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||uL(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:aL(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function vL(e,t){let n=FI(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var yL=[`"`];function bL(e,t){let n=e.options.quotes||yL;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function xL(e,t){let n=e.all(t);(e.options.document||uL(n))&&(n=dL(n));let r={type:`root`,children:n};return e.patch(t,r),r}function SL(e,t){let n=VI(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function CL(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function wL(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function TL(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),EL)};return e.patch(t,n),n}function EL(){return{type:`tableCell`,children:[]}}function DL(e,t){if(e.inTable){let n={type:`text`,value:hI(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=OL(t),i=e.toSpecificContent(e.all(t),AL);r&&i.unshift(AL());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,kL)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function OL(e){let t={align:[null],headless:!0},n=0,r=0;return ZF(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return JF;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function kL(){return{type:`tableCell`,children:[]}}function AL(){return{type:`tableRow`,children:[]}}function jL(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function ML(e,t){let n={type:`text`,value:hI(t)};return e.patch(t,n),n}function NL(e,t){let n={type:`text`,value:``};return e.patch(t,n),n}var PL={comment:OI,doctype:RL,root:xL,text:jL},FL={applet:RL,area:RL,basefont:RL,bgsound:RL,caption:RL,col:RL,colgroup:RL,command:RL,content:RL,datalist:RL,dialog:RL,element:RL,embed:RL,frame:RL,frameset:RL,isindex:RL,keygen:RL,link:RL,math:RL,menu:RL,menuitem:RL,meta:RL,nextid:RL,noembed:RL,noframes:RL,optgroup:RL,option:RL,param:RL,script:RL,shadow:RL,source:RL,spacer:RL,style:RL,svg:RL,template:RL,title:RL,track:RL,abbr:IL,acronym:IL,bdi:IL,bdo:IL,big:IL,blink:IL,button:IL,canvas:IL,cite:IL,data:IL,details:IL,dfn:IL,font:IL,ins:IL,label:IL,map:IL,marquee:IL,meter:IL,nobr:IL,noscript:IL,object:IL,output:IL,progress:IL,rb:IL,rbc:IL,rp:IL,rt:IL,rtc:IL,ruby:IL,slot:IL,small:IL,span:IL,sup:IL,sub:IL,tbody:IL,tfoot:IL,thead:IL,time:IL,address:LL,article:LL,aside:LL,body:LL,center:LL,div:LL,fieldset:LL,figcaption:LL,figure:LL,form:LL,footer:LL,header:LL,hgroup:LL,html:LL,legend:LL,main:LL,multicol:LL,nav:LL,picture:LL,section:LL,a:nI,audio:_L,b:CL,base:rI,blockquote:iI,br:aI,code:BI,dir:nL,dl:jI,dt:$I,dd:$I,del:kI,em:PI,h1:II,h2:II,h3:II,h4:II,h5:II,h6:II,hr:LI,i:PI,iframe:RI,img:zI,image:zI,input:GI,kbd:BI,li:$I,listing:DI,mark:PI,ol:nL,p:vL,plaintext:DI,pre:DI,q:bL,s:kI,samp:BI,select:SL,strike:kI,strong:CL,summary:vL,table:DL,td:wL,textarea:ML,th:wL,tr:TL,tt:BI,u:PI,ul:nL,var:BI,video:_L,wbr:NL,xmp:DI};function IL(e,t){return e.all(t)}function LL(e,t){return e.toFlow(e.all(t))}function RL(){}var zL={}.hasOwnProperty;function BL(e){return{all:VL,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...FL,...e.handlers},inTable:!1,nodeHandlers:{...PL,...e.nodeHandlers},one:HL,options:e,patch:UL,qNesting:0,resolve:WL,toFlow:GL,toSpecificContent:KL}}function VL(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function HL(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(zL.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(zL.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function UL(e,t){e.position&&(t.position=tI(e))}function WL(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function GL(e){return dL(e)}function KL(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var qL={};function JL(e,t){let n=oF(e),r=t||qL,i=GF({newlines:r.newlines===!0}),a=BL(r),o;i(n),ZF(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},ZF(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var YL={document:!0};function XL(e,t){return e&&`run`in e?async function(n,r){let i=JL(n,{...YL,...t});await e.run(i,r)}:function(t){return JL(t,{...YL,...e})}}function ZL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var QL=cR(/[A-Za-z]/),$L=cR(/[\dA-Za-z]/),eR=cR(/[#-'*+\--9=?A-Z^-~]/);function tR(e){return e!==null&&(e<32||e===127)}var nR=cR(/\d/),rR=cR(/[\dA-Fa-f]/),iR=cR(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function aR(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var oR=cR(/\p{P}|\p{S}/u),sR=cR(/\s/);function cR(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function lR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function uR(e,t,n){let r=yF((n||{}).ignore||[]),i=dR(t),a=-1;for(;++a<i.length;)YF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function dR(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([fR(e[0]),pR(e[1])])}return t}function fR(e){return typeof e==`string`?new RegExp(lR(e),`g`):e}function pR(e){return typeof e==`function`?e:function(){return e}}var mR=`phrasing`,hR=[`autolink`,`link`,`image`,`label`];function gR(){return{transforms:[wR],enter:{literalAutolink:vR,literalAutolinkEmail:yR,literalAutolinkHttp:yR,literalAutolinkWww:yR},exit:{literalAutolink:CR,literalAutolinkEmail:SR,literalAutolinkHttp:bR,literalAutolinkWww:xR}}}function _R(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:mR,notInConstruct:hR},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:mR,notInConstruct:hR},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:mR,notInConstruct:hR}]}}function vR(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function yR(e){this.config.enter.autolinkProtocol.call(this,e)}function bR(e){this.config.exit.autolinkProtocol.call(this,e)}function xR(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function SR(e){this.config.exit.autolinkEmail.call(this,e)}function CR(e){this.exit(e)}function wR(e){uR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ER]],{ignore:[`link`,`linkReference`]})}function TR(e,t,n,r,i){let a=``;if(!kR(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!DR(n)))return!1;let o=OR(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ER(e,t,n,r){return!kR(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function DR(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function OR(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ZL(e,`(`),a=ZL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function kR(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||sR(n)||oR(n))&&(!t||n!==47)}function AR(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}BR.peek=zR;function jR(){this.buffer()}function MR(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function NR(){this.buffer()}function PR(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function FR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=AR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IR(e){this.exit(e)}function LR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=AR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RR(e){this.exit(e)}function zR(){return`[`}function BR(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function VR(){return{enter:{gfmFootnoteCallString:jR,gfmFootnoteCall:MR,gfmFootnoteDefinitionLabelString:NR,gfmFootnoteDefinition:PR},exit:{gfmFootnoteCallString:FR,gfmFootnoteCall:IR,gfmFootnoteDefinitionLabelString:LR,gfmFootnoteDefinition:RR}}}function HR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:BR},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
305
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?WR
|
|
306
|
-
`)}function
|
|
307
|
-
`&&
|
|
308
|
-
`}function
|
|
300
|
+
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=iC(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=iC(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});ES.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(wO.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(TO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(FO.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(BO.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(dte.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(fte.configure(this.options.taskList)),e}});var VO=` `,HO=`\xA0`,pte=uC.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,tx(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===VO||n[0].text===VO||n[0].raw===HO||n[0].text===HO)&&r.length===1&&r[0].type===`text`&&(r[0].text===VO||r[0].text===HO)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?VO:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mte=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,hte=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,UO=_S.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,tx(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[HS({find:mte,type:this.type})]},addPasteRules(){return[fC({find:hte,type:this.type})]}}),gte=UO,_te=uC.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),vte=_S.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,tx(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function yte(e={}){return new _m({view(t){return new bte(t,e)}})}var bte=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=jp(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},WO=class e extends I{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):I.near(r)}content(){return F.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new xte(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Ste(e)||!Cte(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!R.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};WO.prototype.visible=!1,WO.findFrom=WO.findGapCursorFrom,I.jsonID(`gapcursor`,WO);var xte=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return WO.valid(t)?new WO(t):I.near(t)}};function GO(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Ste(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||GO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Cte(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||GO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function wte(){return new _m({props:{decorations:Ote,createSelectionBetween(e,t,n){return t.pos==n.pos&&WO.valid(n)?new WO(n):null},handleClick:Ete,handleKeyDown:Tte,handleDOMEvents:{beforeinput:Dte}}})}var Tte=Sy({ArrowLeft:KO(`horiz`,-1),ArrowRight:KO(`horiz`,1),ArrowUp:KO(`vert`,-1),ArrowDown:KO(`vert`,1)});function KO(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof L){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=WO.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new WO(c))),!0):!1}}function Ete(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!WO.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&R.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new WO(r))),!0)}function Dte(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof WO))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=P.empty;for(let e=r.length-1;e>=0;e--)i=P.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new F(i,0,0));return a.setSelection(L.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Ote(e){if(!(e.selection instanceof WO))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,Ov.create(e.doc,[Tv.widget(e.selection.head,t,{key:`gapcursor`})])}var qO=200,JO=function(){};JO.prototype.append=function(e){return e.length?(e=JO.from(e),!this.length&&e||e.length<qO&&this.leafAppend(e)||this.length<qO&&e.leafPrepend(this)||this.appendInner(e)):this},JO.prototype.prepend=function(e){return e.length?JO.from(e).append(this):this},JO.prototype.appendInner=function(e){return new kte(this,e)},JO.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?JO.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},JO.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},JO.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},JO.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},JO.from=function(e){return e instanceof JO?e:e&&e.length?new YO(e):JO.empty};var YO=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=qO)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=qO)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(JO);JO.empty=new YO([]);var kte=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(JO),Ate=500,XO=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new ZO(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new ZO(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new ZO(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>Mte&&(s=jte(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Yf;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new ZO(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new ZO(i,o,l))}else r.push(new ZO(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new ZO(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>Ate&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new ZO(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(JO.from(i.reverse()),a)}};XO.empty=new XO(JO.empty,0);function jte(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var ZO=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},QO=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},Mte=20;function Nte(e,t,n,r){let i=n.getMeta(ik),a;if(i)return i.historyState;n.getMeta(Ite)&&(e=new QO(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(ik))return o.getMeta(ik).redo?new QO(e.done.addTransform(n,void 0,r,rk(t)),e.undone,$O(n.mapping.maps),e.prevTime,e.prevComposition):new QO(e.done,e.undone.addTransform(n,void 0,r,rk(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Pte(n,e.prevRanges)),s=o?ek(e.prevRanges,n.mapping):$O(n.mapping.maps);return new QO(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,rk(t)),XO.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new QO(e.done.rebased(n,a),e.undone.rebased(n,a),ek(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new QO(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),ek(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Pte(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function $O(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function ek(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function Fte(e,t,n){let r=rk(t),i=ik.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new QO(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(ik,{redo:n,historyState:c})}var tk=!1,nk=null;function rk(e){let t=e.plugins;if(nk!=t){tk=!1,nk=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){tk=!0;break}}return tk}var ik=new bm(`history`),Ite=new bm(`closeHistory`);function ak(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new _m({key:ik,state:{init(){return new QO(XO.empty,XO.empty,null,0,-1)},apply(t,n,r){return Nte(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?sk:n==`historyRedo`?ck:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function ok(e,t){return(n,r)=>{let i=ik.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=Fte(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var sk=ok(!1,!0),ck=ok(!0,!0);ES.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new _m({key:new bm(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var Lte=ES.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[yte(this.options)]}});ES.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new _m({key:new bm(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return Ov.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(Tv.node(t,t+e.nodeSize,{class:this.options.className}))}),Ov.create(e,a)}}})]}});var Rte=ES.create({name:`gapCursor`,addProseMirrorPlugins(){return[wte()]},extendNodeSchema(e){return{allowGapCursor:Yb(z(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),lk=`placeholder`;function zte(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var Bte=ES.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:lk,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${zte(this.options.dataAttribute)}`:`data-${lk}`;return[new _m({key:new bm(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&jx(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=Tv.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),Ov.create(t,a)}}})]}});ES.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new _m({key:new bm(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Mx(n.selection)||e.view.dragging?null:Ov.create(n.doc,[Tv.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function uk({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Vte=ES.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new bm(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new _m({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!uk({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!uk({node:r,types:n})}}})]}}),Hte=ES.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>sk(e,t),redo:()=>({state:e,dispatch:t})=>ck(e,t)}},addProseMirrorPlugins(){return[ak(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Ute=ES.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(CC.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(uO.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(wO.configure(this.options.bulletList)),this.options.code!==!1&&e.push(mO.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(gC.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(gO.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(Lte.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(Rte.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(jC.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(NC.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Hte.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(_O.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(kC.configure(this.options.italic)),this.options.listItem!==!1&&e.push(TO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(FO.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(ZT.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(BO.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(pte.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(UO.configure(this.options.strike)),this.options.text!==!1&&e.push(_te.configure(this.options.text)),this.options.underline!==!1&&e.push(vte.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(Vte.configure(this.options?.trailingNode)),e}});function Wte(){}var dk=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};dk.prototype.normal={},dk.prototype.property={},dk.prototype.space=void 0;function fk(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new dk(n,r,t)}function pk(e){return e.toLowerCase()}var mk=class{constructor(e,t){this.attribute=t,this.property=e}};mk.prototype.attribute=``,mk.prototype.booleanish=!1,mk.prototype.boolean=!1,mk.prototype.commaOrSpaceSeparated=!1,mk.prototype.commaSeparated=!1,mk.prototype.defined=!1,mk.prototype.mustUseProperty=!1,mk.prototype.number=!1,mk.prototype.overloadedBoolean=!1,mk.prototype.property=``,mk.prototype.spaceSeparated=!1,mk.prototype.space=void 0;var hk=t({boolean:()=>gk,booleanish:()=>_k,commaOrSpaceSeparated:()=>xk,commaSeparated:()=>bk,number:()=>V,overloadedBoolean:()=>vk,spaceSeparated:()=>yk}),Gte=0,gk=Sk(),_k=Sk(),vk=Sk(),V=Sk(),yk=Sk(),bk=Sk(),xk=Sk();function Sk(){return 2**++Gte}var Ck=Object.keys(hk),wk=class extends mk{constructor(e,t,n,r){let i=-1;if(super(e,t),Tk(this,`space`,r),typeof n==`number`)for(;++i<Ck.length;){let e=Ck[i];Tk(this,Ck[i],(n&hk[e])===hk[e])}}};wk.prototype.defined=!0;function Tk(e,t,n){n&&(e[t]=n)}function Ek(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new wk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pk(r)]=r,n[pk(a.attribute)]=r}return new dk(t,n,e.space)}var Dk=Ek({properties:{ariaActiveDescendant:null,ariaAtomic:_k,ariaAutoComplete:null,ariaBusy:_k,ariaChecked:_k,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:yk,ariaCurrent:null,ariaDescribedBy:yk,ariaDetails:null,ariaDisabled:_k,ariaDropEffect:yk,ariaErrorMessage:null,ariaExpanded:_k,ariaFlowTo:yk,ariaGrabbed:_k,ariaHasPopup:null,ariaHidden:_k,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yk,ariaLevel:V,ariaLive:null,ariaModal:_k,ariaMultiLine:_k,ariaMultiSelectable:_k,ariaOrientation:null,ariaOwns:yk,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:_k,ariaReadOnly:_k,ariaRelevant:null,ariaRequired:_k,ariaRoleDescription:yk,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:_k,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ok(e,t){return t in e?e[t]:t}function kk(e,t){return Ok(e,t.toLowerCase())}var Kte=Ek({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:bk,acceptCharset:yk,accessKey:yk,action:null,allow:null,allowFullScreen:gk,allowPaymentRequest:gk,allowUserMedia:gk,alt:null,as:null,async:gk,autoCapitalize:null,autoComplete:yk,autoFocus:gk,autoPlay:gk,blocking:yk,capture:null,charSet:null,checked:gk,cite:null,className:yk,cols:V,colSpan:null,content:null,contentEditable:_k,controls:gk,controlsList:yk,coords:V|bk,crossOrigin:null,data:null,dateTime:null,decoding:null,default:gk,defer:gk,dir:null,dirName:null,disabled:gk,download:vk,draggable:_k,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:gk,formTarget:null,headers:yk,height:V,hidden:vk,high:V,href:null,hrefLang:null,htmlFor:yk,httpEquiv:yk,id:null,imageSizes:null,imageSrcSet:null,inert:gk,inputMode:null,integrity:null,is:null,isMap:gk,itemId:null,itemProp:yk,itemRef:yk,itemScope:gk,itemType:yk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:gk,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:gk,muted:gk,name:null,nonce:null,noModule:gk,noValidate:gk,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:gk,optimum:V,pattern:null,ping:yk,placeholder:null,playsInline:gk,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:gk,referrerPolicy:null,rel:yk,required:gk,reversed:gk,rows:V,rowSpan:V,sandbox:yk,scope:null,scoped:gk,seamless:gk,selected:gk,shadowRootClonable:gk,shadowRootDelegatesFocus:gk,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:_k,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:gk,useMap:null,value:_k,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yk,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:gk,declare:gk,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:gk,noHref:gk,noShade:gk,noWrap:gk,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:_k,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:gk,disableRemotePlayback:gk,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:kk}),qte=Ek({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:xk,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:yk,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:gk,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bk,g2:bk,glyphName:bk,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:xk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xk,rev:xk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xk,requiredFeatures:xk,requiredFonts:xk,requiredFormats:xk,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:xk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xk,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ok}),Ak=Ek({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),jk=Ek({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:kk}),Mk=Ek({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Jte=/[A-Z]/g,Nk=/-[a-z]/g,Yte=/^data[-\w.:]+$/i;function Pk(e,t){let n=pk(t),r=t,i=mk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Yte.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Nk,Zte);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Nk.test(e)){let n=e.replace(Jte,Xte);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=wk}return new i(r,t)}function Xte(e){return`-`+e.toLowerCase()}function Zte(e){return e.charAt(1).toUpperCase()}var Fk=fk([Dk,Kte,Ak,jk,Mk],`html`),Ik=fk([Dk,qte,Ak,jk,Mk],`svg`);function Lk(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Rk(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var zk=/[#.]/g;function Bk(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){zk.lastIndex=i;let e=zk.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Vk(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hk(e){return e.join(` `).trim()}function Uk(e,t,n){let r=n?Yk(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Bk(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Wk(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Gk(e,o.properties,t,n)}for(let e of a)Kk(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Wk(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Gk(e,t,n,r){let i=Pk(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Vk(r):i.commaSeparated?Lk(r):i.commaOrSpaceSeparated?Vk(Lk(r).join(` `)):qk(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Jk(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(qk(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Kk(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Kk(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Kk(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function qk(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||pk(n)===pk(t)))return!0}return n}function Jk(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Yk(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Xk=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Zk=Uk(Fk,`div`),Qk=Uk(Ik,`g`,Xk);function $k(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=eA(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=eA(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function eA(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
301
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var tA={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},nA={}.hasOwnProperty,rA=Object.prototype;function iA(e,t){let n=t||{};return aA({file:n.file||void 0,location:!1,schema:n.space===`svg`?Ik:Fk,verbose:n.verbose||!1},e)}function aA(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},cA(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:oA(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=$k(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},cA(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},cA(e,r,n),n}default:return n=sA(e,t),n}}function oA(e,t){let n=-1,r=[];for(;++n<t.length;){let i=aA(e,t[n]);r.push(i)}return r}function sA(e,t){let n=e.schema;e.schema=t.namespaceURI===tA.svg?Ik:Fk;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;nA.call(rA,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Qk:Zk)(t.tagName,i,oA(e,t.childNodes));if(cA(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&uA(r.startTag),o=r&&r.endTag&&uA(r.endTag),s=aA(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function cA(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=lA(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function lA(e,t,n){let r=uA(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)nA.call(n.attrs,i)&&(r[Pk(e.schema,i).property]=uA(n.attrs[i]));n.startTag;let a=uA(n.startTag),o=n.endTag?uA(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function uA(e){let t=dA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=dA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function dA(e){return e.line&&e.column?e:void 0}var fA=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),H;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(H||={});var pA={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function mA(e){return e>=55296&&e<=57343}function hA(e){return e>=56320&&e<=57343}function gA(e,t){return(e-55296)*1024+9216+t}function _A(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function vA(e){return e>=64976&&e<=65007||fA.has(e)}var U;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(U||={});var yA=65536,bA=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=yA,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(hA(t))return this.pos++,this._addGap(),gA(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,H.EOF;return this._err(U.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let n=this.html.charCodeAt(t);return n===H.CARRIAGE_RETURN?H.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let e=this.html.charCodeAt(this.pos);return e===H.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,H.LINE_FEED):e===H.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,mA(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===H.LINE_FEED||e===H.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){_A(e)?this._err(U.controlCharacterInInputStream):vA(e)&&this._err(U.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},xA;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(xA||={});function SA(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var CA=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),wA=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function TA(e){return e>=55296&&e<=57343||e>1114111?65533:wA.get(e)??e}var EA;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(EA||={});var DA=32,OA;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(OA||={});function kA(e){return e>=EA.ZERO&&e<=EA.NINE}function AA(e){return e>=EA.UPPER_A&&e<=EA.UPPER_F||e>=EA.LOWER_A&&e<=EA.LOWER_F}function jA(e){return e>=EA.UPPER_A&&e<=EA.UPPER_Z||e>=EA.LOWER_A&&e<=EA.LOWER_Z||kA(e)}function MA(e){return e===EA.EQUALS||jA(e)}var NA;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(NA||={});var PA;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(PA||={});var FA=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=NA.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=PA.Strict}startEntity(e){this.decodeMode=e,this.state=NA.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case NA.EntityStart:return e.charCodeAt(t)===EA.NUM?(this.state=NA.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=NA.NamedEntity,this.stateNamedEntity(e,t));case NA.NumericStart:return this.stateNumericStart(e,t);case NA.NumericDecimal:return this.stateNumericDecimal(e,t);case NA.NumericHex:return this.stateNumericHex(e,t);case NA.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|DA)===EA.LOWER_X?(this.state=NA.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=NA.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(kA(r)||AA(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(kA(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===EA.SEMI)this.consumed+=1;else if(this.decodeMode===PA.Strict)return 0;return this.emitCodePoint(TA(this.result),this.consumed),this.errors&&(e!==EA.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&OA.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=IA(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===PA.Attribute&&(i===0||MA(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&OA.VALUE_LENGTH)>>14,i!==0){if(a===EA.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==PA.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&OA.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~OA.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case NA.NamedEntity:return this.result!==0&&(this.decodeMode!==PA.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case NA.NumericDecimal:return this.emitNumericEntity(0,2);case NA.NumericHex:return this.emitNumericEntity(0,3);case NA.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case NA.EntityStart:return 0}}};function IA(e,t,n,r){let i=(t&OA.BRANCH_LENGTH)>>7,a=t&OA.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var W;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(W||={});var LA;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(LA||={});var RA;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(RA||={});var G;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(G||={});var K;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(K||={});var zA=new Map([[G.A,K.A],[G.ADDRESS,K.ADDRESS],[G.ANNOTATION_XML,K.ANNOTATION_XML],[G.APPLET,K.APPLET],[G.AREA,K.AREA],[G.ARTICLE,K.ARTICLE],[G.ASIDE,K.ASIDE],[G.B,K.B],[G.BASE,K.BASE],[G.BASEFONT,K.BASEFONT],[G.BGSOUND,K.BGSOUND],[G.BIG,K.BIG],[G.BLOCKQUOTE,K.BLOCKQUOTE],[G.BODY,K.BODY],[G.BR,K.BR],[G.BUTTON,K.BUTTON],[G.CAPTION,K.CAPTION],[G.CENTER,K.CENTER],[G.CODE,K.CODE],[G.COL,K.COL],[G.COLGROUP,K.COLGROUP],[G.DD,K.DD],[G.DESC,K.DESC],[G.DETAILS,K.DETAILS],[G.DIALOG,K.DIALOG],[G.DIR,K.DIR],[G.DIV,K.DIV],[G.DL,K.DL],[G.DT,K.DT],[G.EM,K.EM],[G.EMBED,K.EMBED],[G.FIELDSET,K.FIELDSET],[G.FIGCAPTION,K.FIGCAPTION],[G.FIGURE,K.FIGURE],[G.FONT,K.FONT],[G.FOOTER,K.FOOTER],[G.FOREIGN_OBJECT,K.FOREIGN_OBJECT],[G.FORM,K.FORM],[G.FRAME,K.FRAME],[G.FRAMESET,K.FRAMESET],[G.H1,K.H1],[G.H2,K.H2],[G.H3,K.H3],[G.H4,K.H4],[G.H5,K.H5],[G.H6,K.H6],[G.HEAD,K.HEAD],[G.HEADER,K.HEADER],[G.HGROUP,K.HGROUP],[G.HR,K.HR],[G.HTML,K.HTML],[G.I,K.I],[G.IMG,K.IMG],[G.IMAGE,K.IMAGE],[G.INPUT,K.INPUT],[G.IFRAME,K.IFRAME],[G.KEYGEN,K.KEYGEN],[G.LABEL,K.LABEL],[G.LI,K.LI],[G.LINK,K.LINK],[G.LISTING,K.LISTING],[G.MAIN,K.MAIN],[G.MALIGNMARK,K.MALIGNMARK],[G.MARQUEE,K.MARQUEE],[G.MATH,K.MATH],[G.MENU,K.MENU],[G.META,K.META],[G.MGLYPH,K.MGLYPH],[G.MI,K.MI],[G.MO,K.MO],[G.MN,K.MN],[G.MS,K.MS],[G.MTEXT,K.MTEXT],[G.NAV,K.NAV],[G.NOBR,K.NOBR],[G.NOFRAMES,K.NOFRAMES],[G.NOEMBED,K.NOEMBED],[G.NOSCRIPT,K.NOSCRIPT],[G.OBJECT,K.OBJECT],[G.OL,K.OL],[G.OPTGROUP,K.OPTGROUP],[G.OPTION,K.OPTION],[G.P,K.P],[G.PARAM,K.PARAM],[G.PLAINTEXT,K.PLAINTEXT],[G.PRE,K.PRE],[G.RB,K.RB],[G.RP,K.RP],[G.RT,K.RT],[G.RTC,K.RTC],[G.RUBY,K.RUBY],[G.S,K.S],[G.SCRIPT,K.SCRIPT],[G.SEARCH,K.SEARCH],[G.SECTION,K.SECTION],[G.SELECT,K.SELECT],[G.SOURCE,K.SOURCE],[G.SMALL,K.SMALL],[G.SPAN,K.SPAN],[G.STRIKE,K.STRIKE],[G.STRONG,K.STRONG],[G.STYLE,K.STYLE],[G.SUB,K.SUB],[G.SUMMARY,K.SUMMARY],[G.SUP,K.SUP],[G.TABLE,K.TABLE],[G.TBODY,K.TBODY],[G.TEMPLATE,K.TEMPLATE],[G.TEXTAREA,K.TEXTAREA],[G.TFOOT,K.TFOOT],[G.TD,K.TD],[G.TH,K.TH],[G.THEAD,K.THEAD],[G.TITLE,K.TITLE],[G.TR,K.TR],[G.TRACK,K.TRACK],[G.TT,K.TT],[G.U,K.U],[G.UL,K.UL],[G.SVG,K.SVG],[G.VAR,K.VAR],[G.WBR,K.WBR],[G.XMP,K.XMP]]);function BA(e){return zA.get(e)??K.UNKNOWN}var q=K,VA={[W.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[W.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[W.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},HA=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);new Set([G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT]);var J;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(J||={});var UA={DATA:J.DATA,RCDATA:J.RCDATA,RAWTEXT:J.RAWTEXT,SCRIPT_DATA:J.SCRIPT_DATA,PLAINTEXT:J.PLAINTEXT,CDATA_SECTION:J.CDATA_SECTION};function WA(e){return e>=H.DIGIT_0&&e<=H.DIGIT_9}function GA(e){return e>=H.LATIN_CAPITAL_A&&e<=H.LATIN_CAPITAL_Z}function KA(e){return e>=H.LATIN_SMALL_A&&e<=H.LATIN_SMALL_Z}function qA(e){return KA(e)||GA(e)}function JA(e){return qA(e)||WA(e)}function YA(e){return e+32}function XA(e){return e===H.SPACE||e===H.LINE_FEED||e===H.TABULATION||e===H.FORM_FEED}function ZA(e){return XA(e)||e===H.SOLIDUS||e===H.GREATER_THAN_SIGN}function QA(e){return e===H.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:mA(e)?U.surrogateCharacterReference:vA(e)?U.noncharacterCharacterReference:_A(e)||e===H.CARRIAGE_RETURN?U.controlCharacterReference:null}var $A=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=J.DATA,this.returnState=J.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new bA(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new FA(CA,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=QA(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xA.START_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xA.END_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:xA.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:xA.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(SA(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=BA(e.tagName),e.type===xA.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(U.endTagWithAttributes),e.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case xA.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case xA.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case xA.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:xA.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=XA(e)?xA.WHITESPACE_CHARACTER:e===H.NULL?xA.NULL_CHARACTER:xA.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(xA.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=J.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?PA.Attribute:PA.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===J.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case J.DATA:this._stateData(e);break;case J.RCDATA:this._stateRcdata(e);break;case J.RAWTEXT:this._stateRawtext(e);break;case J.SCRIPT_DATA:this._stateScriptData(e);break;case J.PLAINTEXT:this._statePlaintext(e);break;case J.TAG_OPEN:this._stateTagOpen(e);break;case J.END_TAG_OPEN:this._stateEndTagOpen(e);break;case J.TAG_NAME:this._stateTagName(e);break;case J.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case J.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case J.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case J.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case J.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case J.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case J.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case J.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case J.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case J.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case J.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case J.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case J.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case J.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case J.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case J.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case J.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case J.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case J.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case J.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case J.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case J.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case J.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case J.BOGUS_COMMENT:this._stateBogusComment(e);break;case J.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case J.COMMENT_START:this._stateCommentStart(e);break;case J.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case J.COMMENT:this._stateComment(e);break;case J.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case J.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case J.COMMENT_END:this._stateCommentEnd(e);break;case J.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case J.DOCTYPE:this._stateDoctype(e);break;case J.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case J.DOCTYPE_NAME:this._stateDoctypeName(e);break;case J.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case J.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case J.CDATA_SECTION:this._stateCdataSection(e);break;case J.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case J.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case J.CHARACTER_REFERENCE:this._stateCharacterReference();break;case J.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.TAG_OPEN;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitCodePoint(e);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case H.AMPERSAND:this._startCharacterReference();break;case H.LESS_THAN_SIGN:this.state=J.RCDATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.RAWTEXT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(qA(e))this._createStartTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.EXCLAMATION_MARK:this.state=J.MARKUP_DECLARATION_OPEN;break;case H.SOLIDUS:this.state=J.END_TAG_OPEN;break;case H.QUESTION_MARK:this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e);break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=J.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(qA(e))this._createEndTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.GREATER_THAN_SIGN:this._err(U.missingEndTagName),this.state=J.DATA;break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.tagName+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(GA(e)?YA(e):e)}}_stateRcdataLessThanSign(e){e===H.SOLIDUS?this.state=J.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){qA(e)?(this.state=J.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=J.BEFORE_ATTRIBUTE_NAME,!1;case H.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=J.SELF_CLOSING_START_TAG,!1;case H.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=J.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===H.SOLIDUS?this.state=J.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){qA(e)?(this.state=J.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case H.SOLIDUS:this.state=J.SCRIPT_DATA_END_TAG_OPEN;break;case H.EXCLAMATION_MARK:this.state=J.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=J.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){qA(e)?(this.state=J.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===H.SOLIDUS?this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qA(e)?(this._emitChars(`<`),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){qA(e)?(this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(pA.SCRIPT,!1)&&ZA(this.preprocessor.peek(pA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<pA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===H.SOLIDUS?(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(pA.SCRIPT,!1)&&ZA(this.preprocessor.peek(pA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<pA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=J.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this._leaveAttrName(),this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._leaveAttrName(),this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(GA(e)?YA(e):e)}}_stateAfterAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.EQUALS_SIGN:this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:this.state=J.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case H.APOSTROPHE:this.state=J.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingAttributeValue),this.state=J.DATA,this.emitCurrentTagToken();break;default:this.state=J.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case H.APOSTROPHE:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.AMPERSAND:this._startCharacterReference();break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:case H.EQUALS_SIGN:case H.GRAVE_ACCENT:this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this._leaveAttrValue(),this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.missingWhitespaceBetweenAttributes),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case H.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=J.DATA,this.emitCurrentTagToken();break}case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.unexpectedSolidusInTag),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(pA.DASH_DASH,!0)?(this._createCommentToken(pA.DASH_DASH.length+1),this.state=J.COMMENT_START):this._consumeSequenceIfMatch(pA.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pA.DOCTYPE.length+1),this.state=J.DOCTYPE):this._consumeSequenceIfMatch(pA.CDATA_START,!0)?this.inForeignNode?this.state=J.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(pA.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=J.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_START_DASH;break;case H.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.GREATER_THAN_SIGN:this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END_DASH;break;case H.LESS_THAN_SIGN:t.data+=`<`,this.state=J.COMMENT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case H.EXCLAMATION_MARK:t.data+=`!`,this.state=J.COMMENT_LESS_THAN_SIGN_BANG;break;case H.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=J.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=J.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==H.GREATER_THAN_SIGN&&e!==H.EOF&&this._err(U.nestedComment),this.state=J.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EXCLAMATION_MARK:this.state=J.COMMENT_END_BANG;break;case H.HYPHEN_MINUS:t.data+=`-`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:t.data+=`--!`,this.state=J.COMMENT_END_DASH;break;case H.GREATER_THAN_SIGN:this._err(U.incorrectlyClosedComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=J.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(GA(e))this._createDoctypeToken(String.fromCharCode(YA(e))),this.state=J.DOCTYPE_NAME;else switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.NULL:this._err(U.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=J.DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=J.DATA;break}case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=J.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.AFTER_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.NULL:this._err(U.unexpectedNullCharacter),t.name+=`�`;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(GA(e)?YA(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(pA.PUBLIC,!1)?this.state=J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pA.SYSTEM,!1)?this.state=J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.NULL:this._err(U.unexpectedNullCharacter);break;case H.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case H.RIGHT_SQUARE_BRACKET:this.state=J.CDATA_SECTION_BRACKET;break;case H.EOF:this._err(U.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===H.RIGHT_SQUARE_BRACKET?this.state=J.CDATA_SECTION_END:(this._emitChars(`]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA;break;case H.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(H.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&JA(this.preprocessor.peek(1))?J.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){JA(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===H.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},ej=new Set([K.DD,K.DT,K.LI,K.OPTGROUP,K.OPTION,K.P,K.RB,K.RP,K.RT,K.RTC]),tj=new Set([...ej,K.CAPTION,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]),nj=new Set([K.APPLET,K.CAPTION,K.HTML,K.MARQUEE,K.OBJECT,K.TABLE,K.TD,K.TEMPLATE,K.TH]),rj=new Set([...nj,K.OL,K.UL]),ij=new Set([...nj,K.BUTTON]),aj=new Set([K.ANNOTATION_XML,K.MI,K.MN,K.MO,K.MS,K.MTEXT]),oj=new Set([K.DESC,K.FOREIGN_OBJECT,K.TITLE]),sj=new Set([K.TR,K.TEMPLATE,K.HTML]),cj=new Set([K.TBODY,K.TFOOT,K.THEAD,K.TEMPLATE,K.HTML]),lj=new Set([K.TABLE,K.TEMPLATE,K.HTML]),uj=new Set([K.TD,K.TH]),dj=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=K.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===K.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==W.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(HA,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uj,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(lj,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(cj,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(sj,W.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===K.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===K.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case W.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case W.SVG:if(oj.has(r))return!1;break;case W.MATHML:if(aj.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,nj)}hasInListItemScope(e){return this.hasInDynamicScope(e,rj)}hasInButtonScope(e){return this.hasInDynamicScope(e,ij)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case W.HTML:if(HA.has(t))return!0;if(nj.has(t))return!1;break;case W.SVG:if(oj.has(t))return!1;break;case W.MATHML:if(aj.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===W.HTML)switch(this.tagIDs[e]){case K.TBODY:case K.THEAD:case K.TFOOT:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.OPTION:case K.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ej.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&tj.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&tj.has(this.currentTagId);)this.pop()}},fj=3,pj;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(pj||={});var mj={type:pj.Marker},hj=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===pj.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<fj)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<fj)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=fj&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(mj)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:pj.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:pj.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(mj);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===pj.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===pj.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===pj.Element&&t.element===e)}},gj={createDocument(){return{nodeName:`#document`,mode:RA.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};gj.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(gj.isTextNode(n)){n.value+=t;return}}gj.appendChild(e,gj.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gj.isTextNode(r)?r.value+=t:gj.insertBefore(e,gj.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},_j=`html`,vj=`about:legacy-compat`,yj=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,bj=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),xj=[...bj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Sj=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Cj=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],wj=[...Cj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Tj(e,t){return t.some(t=>e.startsWith(t))}function Ej(e){return e.name===_j&&e.publicId===null&&(e.systemId===null||e.systemId===vj)}function Dj(e){if(e.name!==_j)return RA.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===yj)return RA.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Sj.has(n))return RA.QUIRKS;let e=t===null?xj:bj;if(Tj(n,e))return RA.QUIRKS;if(e=t===null?Cj:wj,Tj(n,e))return RA.LIMITED_QUIRKS}return RA.NO_QUIRKS}var Oj={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},kj=`definitionurl`,Aj=`definitionURL`,jj=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Mj=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:W.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:W.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:W.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:W.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:W.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:W.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:W.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:W.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:W.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:W.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:W.XMLNS}]]),Nj=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Pj=new Set([K.B,K.BIG,K.BLOCKQUOTE,K.BODY,K.BR,K.CENTER,K.CODE,K.DD,K.DIV,K.DL,K.DT,K.EM,K.EMBED,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HR,K.I,K.IMG,K.LI,K.LISTING,K.MENU,K.META,K.NOBR,K.OL,K.P,K.PRE,K.RUBY,K.S,K.SMALL,K.SPAN,K.STRONG,K.STRIKE,K.SUB,K.SUP,K.TABLE,K.TT,K.U,K.UL,K.VAR]);function Fj(e){let t=e.tagID;return t===K.FONT&&e.attrs.some(({name:e})=>e===LA.COLOR||e===LA.SIZE||e===LA.FACE)||Pj.has(t)}function Ij(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===kj){e.attrs[t].name=Aj;break}}function Lj(e){for(let t=0;t<e.attrs.length;t++){let n=jj.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Rj(e){for(let t=0;t<e.attrs.length;t++){let n=Mj.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function zj(e){let t=Nj.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=BA(e.tagName))}function Bj(e,t){return t===W.MATHML&&(e===K.MI||e===K.MO||e===K.MN||e===K.MS||e===K.MTEXT)}function Vj(e,t,n){if(t===W.MATHML&&e===K.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===LA.ENCODING){let t=n[e].value.toLowerCase();return t===Oj.TEXT_HTML||t===Oj.APPLICATION_XML}}return t===W.SVG&&(e===K.FOREIGN_OBJECT||e===K.DESC||e===K.TITLE)}function Hj(e,t,n,r){return(!r||r===W.HTML)&&Vj(e,t,n)||(!r||r===W.MATHML)&&Bj(e,t)}var Uj=`hidden`,Wj=8,Gj=3,Y;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Y||={});var Kj={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},qj=new Set([K.TABLE,K.TBODY,K.TFOOT,K.THEAD,K.TR]),Jj={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gj,onParseError:null},Yj=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Jj,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new $A(this.options,this),this.activeFormattingElements=new hj(this.treeAdapter),this.fragmentContextID=n?BA(this.treeAdapter.getTagName(n)):K.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new dj(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Jj,...t};e??=n.treeAdapter.createElement(G.TEMPLATE,W.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,W.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===K.TEMPLATE&&i.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Kj,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===W.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,W.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=UA.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===G.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case K.TITLE:case K.TEXTAREA:this.tokenizer.state=UA.RCDATA;break;case K.STYLE:case K.XMP:case K.IFRAME:case K.NOEMBED:case K.NOFRAMES:case K.NOSCRIPT:this.tokenizer.state=UA.RAWTEXT;break;case K.SCRIPT:this.tokenizer.state=UA.SCRIPT_DATA;break;case K.PLAINTEXT:this.tokenizer.state=UA.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,W.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,W.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(G.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,K.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===xA.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===K.SVG&&this.treeAdapter.getTagName(t)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===W.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===K.MGLYPH||e.tagID===K.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,W.HTML)}_processToken(e){switch(e.type){case xA.CHARACTER:this.onCharacter(e);break;case xA.NULL_CHARACTER:this.onNullCharacter(e);break;case xA.COMMENT:this.onComment(e);break;case xA.DOCTYPE:this.onDoctype(e);break;case xA.START_TAG:this._processStartTag(e);break;case xA.END_TAG:this.onEndTag(e);break;case xA.EOF:this.onEof(e);break;case xA.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return Hj(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===pj.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(K.P),this.openElements.popUntilTagNamePopped(K.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case K.TR:this.insertionMode=Y.IN_ROW;return;case K.TBODY:case K.THEAD:case K.TFOOT:this.insertionMode=Y.IN_TABLE_BODY;return;case K.CAPTION:this.insertionMode=Y.IN_CAPTION;return;case K.COLGROUP:this.insertionMode=Y.IN_COLUMN_GROUP;return;case K.TABLE:this.insertionMode=Y.IN_TABLE;return;case K.BODY:this.insertionMode=Y.IN_BODY;return;case K.FRAMESET:this.insertionMode=Y.IN_FRAMESET;return;case K.SELECT:this._resetInsertionModeForSelect(e);return;case K.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case K.HTML:this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return;case K.TD:case K.TH:if(e>0){this.insertionMode=Y.IN_CELL;return}break;case K.HEAD:if(e>0){this.insertionMode=Y.IN_HEAD;return}break}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===K.TEMPLATE)break;if(e===K.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(e){return qj.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case K.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case K.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return VA[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pP(this,e);return}switch(this.insertionMode){case Y.INITIAL:cM(this,e);break;case Y.BEFORE_HTML:dM(this,e);break;case Y.BEFORE_HEAD:mM(this,e);break;case Y.IN_HEAD:vM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:xM(this,e);break;case Y.AFTER_HEAD:wM(this,e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:DM(this,e);break;case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:SN(this,e);break;case Y.IN_TABLE_TEXT:FN(this,e);break;case Y.IN_COLUMN_GROUP:HN(this,e);break;case Y.AFTER_BODY:iP(this,e);break;case Y.AFTER_AFTER_BODY:uP(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fP(this,e);return}switch(this.insertionMode){case Y.INITIAL:cM(this,e);break;case Y.BEFORE_HTML:dM(this,e);break;case Y.BEFORE_HEAD:mM(this,e);break;case Y.IN_HEAD:vM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:xM(this,e);break;case Y.AFTER_HEAD:wM(this,e);break;case Y.TEXT:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:SN(this,e);break;case Y.IN_COLUMN_GROUP:HN(this,e);break;case Y.AFTER_BODY:iP(this,e);break;case Y.AFTER_AFTER_BODY:uP(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){rM(this,e);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:rM(this,e);break;case Y.IN_TABLE_TEXT:IN(this,e);break;case Y.AFTER_BODY:iM(this,e);break;case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:aM(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:sM(this,e);break;case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:this._err(e,U.misplacedDoctype);break;case Y.IN_TABLE_TEXT:IN(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?hP(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:cM(this,e);break;case Y.BEFORE_HTML:lM(this,e);break;case Y.BEFORE_HEAD:fM(this,e);break;case Y.IN_HEAD:hM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:yM(this,e);break;case Y.AFTER_HEAD:SM(this,e);break;case Y.IN_BODY:oN(this,e);break;case Y.IN_TABLE:jN(this,e);break;case Y.IN_TABLE_TEXT:IN(this,e);break;case Y.IN_CAPTION:RN(this,e);break;case Y.IN_COLUMN_GROUP:BN(this,e);break;case Y.IN_TABLE_BODY:UN(this,e);break;case Y.IN_ROW:GN(this,e);break;case Y.IN_CELL:qN(this,e);break;case Y.IN_SELECT:YN(this,e);break;case Y.IN_SELECT_IN_TABLE:ZN(this,e);break;case Y.IN_TEMPLATE:$N(this,e);break;case Y.AFTER_BODY:nP(this,e);break;case Y.IN_FRAMESET:aP(this,e);break;case Y.AFTER_FRAMESET:sP(this,e);break;case Y.AFTER_AFTER_BODY:lP(this,e);break;case Y.AFTER_AFTER_FRAMESET:dP(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?gP(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:cM(this,e);break;case Y.BEFORE_HTML:uM(this,e);break;case Y.BEFORE_HEAD:pM(this,e);break;case Y.IN_HEAD:gM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:bM(this,e);break;case Y.AFTER_HEAD:CM(this,e);break;case Y.IN_BODY:vN(this,e);break;case Y.TEXT:bN(this,e);break;case Y.IN_TABLE:MN(this,e);break;case Y.IN_TABLE_TEXT:IN(this,e);break;case Y.IN_CAPTION:zN(this,e);break;case Y.IN_COLUMN_GROUP:VN(this,e);break;case Y.IN_TABLE_BODY:WN(this,e);break;case Y.IN_ROW:KN(this,e);break;case Y.IN_CELL:JN(this,e);break;case Y.IN_SELECT:XN(this,e);break;case Y.IN_SELECT_IN_TABLE:QN(this,e);break;case Y.IN_TEMPLATE:eP(this,e);break;case Y.AFTER_BODY:rP(this,e);break;case Y.IN_FRAMESET:oP(this,e);break;case Y.AFTER_FRAMESET:cP(this,e);break;case Y.AFTER_AFTER_BODY:uP(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Y.INITIAL:cM(this,e);break;case Y.BEFORE_HTML:dM(this,e);break;case Y.BEFORE_HEAD:mM(this,e);break;case Y.IN_HEAD:vM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:xM(this,e);break;case Y.AFTER_HEAD:wM(this,e);break;case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:yN(this,e);break;case Y.TEXT:xN(this,e);break;case Y.IN_TABLE_TEXT:IN(this,e);break;case Y.IN_TEMPLATE:tP(this,e);break;case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:oM(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===H.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:this._insertCharacters(e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:EM(this,e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:SN(this,e);break;case Y.IN_TABLE_TEXT:PN(this,e);break;default:}}};function Xj(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):_N(e,t),n}function Zj(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Qj(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Gj;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=$j(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function $j(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function eM(e,t,n){let r=BA(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===K.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function tM(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function nM(e,t){for(let n=0;n<Wj;n++){let n=Xj(e,t);if(!n)break;let r=Zj(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Qj(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&eM(e,a,i),tM(e,r,n)}}function rM(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iM(e,t){e._appendCommentNode(t,e.openElements.items[0])}function aM(e,t){e._appendCommentNode(t,e.document)}function oM(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function sM(e,t){e._setDocumentType(t);let n=t.forceQuirks?RA.QUIRKS:Dj(t);Ej(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function cM(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,RA.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function lM(e,t){t.tagID===K.HTML?(e._insertElement(t,W.HTML),e.insertionMode=Y.BEFORE_HEAD):dM(e,t)}function uM(e,t){let n=t.tagID;(n===K.HTML||n===K.HEAD||n===K.BODY||n===K.BR)&&dM(e,t)}function dM(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function fM(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.HEAD:e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break;default:mM(e,t)}}function pM(e,t){let n=t.tagID;n===K.HEAD||n===K.BODY||n===K.HTML||n===K.BR?mM(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function mM(e,t){e._insertFakeElement(G.HEAD,K.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function hM(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TITLE:e._switchToTextParsing(t,UA.RCDATA);break;case K.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,UA.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break;case K.NOFRAMES:case K.STYLE:e._switchToTextParsing(t,UA.RAWTEXT);break;case K.SCRIPT:e._switchToTextParsing(t,UA.SCRIPT_DATA);break;case K.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:vM(e,t)}}function gM(e,t){switch(t.tagID){case K.HEAD:e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break;case K.BODY:case K.BR:case K.HTML:vM(e,t);break;case K.TEMPLATE:_M(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function _M(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==K.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function vM(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function yM(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.BASEFONT:case K.BGSOUND:case K.HEAD:case K.LINK:case K.META:case K.NOFRAMES:case K.STYLE:hM(e,t);break;case K.NOSCRIPT:e._err(t,U.nestedNoscriptInHead);break;default:xM(e,t)}}function bM(e,t){switch(t.tagID){case K.NOSCRIPT:e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break;case K.BR:xM(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function xM(e,t){let n=t.type===xA.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function SM(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.BODY:e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break;case K.FRAMESET:e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET;break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,K.HEAD),hM(e,t),e.openElements.remove(e.headElement);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:wM(e,t)}}function CM(e,t){switch(t.tagID){case K.BODY:case K.HTML:case K.BR:wM(e,t);break;case K.TEMPLATE:_M(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function wM(e,t){e._insertFakeElement(G.BODY,K.BODY),e.insertionMode=Y.IN_BODY,TM(e,t)}function TM(e,t){switch(t.type){case xA.CHARACTER:DM(e,t);break;case xA.WHITESPACE_CHARACTER:EM(e,t);break;case xA.COMMENT:rM(e,t);break;case xA.START_TAG:oN(e,t);break;case xA.END_TAG:vN(e,t);break;case xA.EOF:yN(e,t);break;default:}}function EM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function DM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function OM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function kM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function AM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET)}function jM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function MM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&HA.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function NM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function PM(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function FM(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===K.LI&&r===K.LI||(n===K.DD||n===K.DT)&&(r===K.DD||r===K.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==K.ADDRESS&&r!==K.DIV&&r!==K.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function IM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=UA.PLAINTEXT}function LM(e,t){e.openElements.hasInScope(K.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function RM(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(nM(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BM(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(K.NOBR)&&(nM(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function VM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function HM(e,t){e.treeAdapter.getDocumentMode(e.document)!==RA.QUIRKS&&e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function UM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function WM(e){let t=SA(e,LA.TYPE);return t!=null&&t.toLowerCase()===Uj}function GM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),WM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function KM(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function qM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function JM(e,t){t.tagName=G.IMG,t.tagID=K.IMG,UM(e,t)}function YM(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=UA.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function XM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,UA.RAWTEXT)}function ZM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,UA.RAWTEXT)}function QM(e,t){e._switchToTextParsing(t,UA.RAWTEXT)}function $M(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function eN(e,t){e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function tN(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function nN(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(K.RTC),e._insertElement(t,W.HTML)}function rN(e,t){e._reconstructActiveFormattingElements(),Ij(t),Rj(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function iN(e,t){e._reconstructActiveFormattingElements(),Lj(t),Rj(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function aN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function oN(e,t){switch(t.tagID){case K.I:case K.S:case K.B:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.SMALL:case K.STRIKE:case K.STRONG:zM(e,t);break;case K.A:RM(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:MM(e,t);break;case K.P:case K.DL:case K.OL:case K.UL:case K.DIV:case K.DIR:case K.NAV:case K.MAIN:case K.MENU:case K.ASIDE:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.DETAILS:case K.ADDRESS:case K.ARTICLE:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:jM(e,t);break;case K.LI:case K.DD:case K.DT:FM(e,t);break;case K.BR:case K.IMG:case K.WBR:case K.AREA:case K.EMBED:case K.KEYGEN:UM(e,t);break;case K.HR:qM(e,t);break;case K.RB:case K.RTC:tN(e,t);break;case K.RT:case K.RP:nN(e,t);break;case K.PRE:case K.LISTING:NM(e,t);break;case K.XMP:XM(e,t);break;case K.SVG:iN(e,t);break;case K.HTML:OM(e,t);break;case K.BASE:case K.LINK:case K.META:case K.STYLE:case K.TITLE:case K.SCRIPT:case K.BGSOUND:case K.BASEFONT:case K.TEMPLATE:hM(e,t);break;case K.BODY:kM(e,t);break;case K.FORM:PM(e,t);break;case K.NOBR:BM(e,t);break;case K.MATH:rN(e,t);break;case K.TABLE:HM(e,t);break;case K.INPUT:GM(e,t);break;case K.PARAM:case K.TRACK:case K.SOURCE:KM(e,t);break;case K.IMAGE:JM(e,t);break;case K.BUTTON:LM(e,t);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:VM(e,t);break;case K.IFRAME:ZM(e,t);break;case K.SELECT:$M(e,t);break;case K.OPTION:case K.OPTGROUP:eN(e,t);break;case K.NOEMBED:case K.NOFRAMES:QM(e,t);break;case K.FRAMESET:AM(e,t);break;case K.TEXTAREA:YM(e,t);break;case K.NOSCRIPT:e.options.scriptingEnabled?QM(e,t):aN(e,t);break;case K.PLAINTEXT:IM(e,t);break;case K.COL:case K.TH:case K.TD:case K.TR:case K.HEAD:case K.FRAME:case K.TBODY:case K.TFOOT:case K.THEAD:case K.CAPTION:case K.COLGROUP:break;default:aN(e,t)}}function sN(e,t){if(e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cN(e,t){e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,rP(e,t))}function lN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function uN(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(K.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(K.FORM):n&&e.openElements.remove(n))}function dN(e){e.openElements.hasInButtonScope(K.P)||e._insertFakeElement(G.P,K.P),e._closePElement()}function fN(e){e.openElements.hasInListItemScope(K.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(K.LI),e.openElements.popUntilTagNamePopped(K.LI))}function pN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function mN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function hN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function gN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,K.BR),e.openElements.pop(),e.framesetOk=!1}function _N(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==K.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function vN(e,t){switch(t.tagID){case K.A:case K.B:case K.I:case K.S:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.NOBR:case K.SMALL:case K.STRIKE:case K.STRONG:nM(e,t);break;case K.P:dN(e);break;case K.DL:case K.UL:case K.OL:case K.DIR:case K.DIV:case K.NAV:case K.PRE:case K.MAIN:case K.MENU:case K.ASIDE:case K.BUTTON:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.ADDRESS:case K.ARTICLE:case K.DETAILS:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.LISTING:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:lN(e,t);break;case K.LI:fN(e);break;case K.DD:case K.DT:pN(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:mN(e);break;case K.BR:gN(e);break;case K.BODY:sN(e,t);break;case K.HTML:cN(e,t);break;case K.FORM:uN(e);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:hN(e,t);break;case K.TEMPLATE:_M(e,t);break;default:_N(e,t)}}function yN(e,t){e.tmplInsertionModeStack.length>0?tP(e,t):oM(e,t)}function bN(e,t){var n;t.tagID===K.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function xN(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function SN(e,t){if(e.openElements.currentTagId!==void 0&&qj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case xA.CHARACTER:FN(e,t);break;case xA.WHITESPACE_CHARACTER:PN(e,t);break}else NN(e,t)}function CN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CAPTION}function wN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function TN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,K.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,BN(e,t)}function EN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_TABLE_BODY}function DN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,K.TBODY),e.insertionMode=Y.IN_TABLE_BODY,UN(e,t)}function ON(e,t){e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function kN(e,t){WM(t)?e._appendElement(t,W.HTML):NN(e,t),t.ackSelfClosing=!0}function AN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function jN(e,t){switch(t.tagID){case K.TD:case K.TH:case K.TR:DN(e,t);break;case K.STYLE:case K.SCRIPT:case K.TEMPLATE:hM(e,t);break;case K.COL:TN(e,t);break;case K.FORM:AN(e,t);break;case K.TABLE:ON(e,t);break;case K.TBODY:case K.TFOOT:case K.THEAD:EN(e,t);break;case K.INPUT:kN(e,t);break;case K.CAPTION:CN(e,t);break;case K.COLGROUP:wN(e,t);break;default:NN(e,t)}}function MN(e,t){switch(t.tagID){case K.TABLE:e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode());break;case K.TEMPLATE:_M(e,t);break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:NN(e,t)}}function NN(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,TM(e,t),e.fosterParentingEnabled=n}function PN(e,t){e.pendingCharacterTokens.push(t)}function FN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function IN(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)NN(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var LN=new Set([K.CAPTION,K.COL,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]);function RN(e,t){let n=t.tagID;LN.has(n)?e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,jN(e,t)):oN(e,t)}function zN(e,t){let n=t.tagID;switch(n){case K.CAPTION:case K.TABLE:e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===K.TABLE&&MN(e,t));break;case K.BODY:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:vN(e,t)}}function BN(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.COL:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TEMPLATE:hM(e,t);break;default:HN(e,t)}}function VN(e,t){switch(t.tagID){case K.COLGROUP:e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TEMPLATE:_M(e,t);break;case K.COL:break;default:HN(e,t)}}function HN(e,t){e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function UN(e,t){switch(t.tagID){case K.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_ROW;break;case K.TH:case K.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,K.TR),e.insertionMode=Y.IN_ROW,GN(e,t);break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,jN(e,t));break;default:jN(e,t)}}function WN(e,t){let n=t.tagID;switch(t.tagID){case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,MN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:case K.TR:break;default:MN(e,t)}}function GN(e,t){switch(t.tagID){case K.TH:case K.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,UN(e,t));break;default:jN(e,t)}}function KN(e,t){switch(t.tagID){case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break;case K.TABLE:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,WN(e,t));break;case K.TBODY:case K.TFOOT:case K.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(K.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,WN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:break;default:MN(e,t)}}function qN(e,t){let n=t.tagID;LN.has(n)?(e.openElements.hasInTableScope(K.TD)||e.openElements.hasInTableScope(K.TH))&&(e._closeTableCell(),GN(e,t)):oN(e,t)}function JN(e,t){let n=t.tagID;switch(n){case K.TD:case K.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break;case K.TABLE:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),KN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:break;default:vN(e,t)}}function YN(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.OPTGROUP:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.HR:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.INPUT:case K.KEYGEN:case K.TEXTAREA:case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),t.tagID!==K.SELECT&&e._processStartTag(t));break;case K.SCRIPT:case K.TEMPLATE:hM(e,t);break;default:}}function XN(e,t){switch(t.tagID){case K.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===K.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===K.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop();break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop();break;case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode());break;case K.TEMPLATE:_M(e,t);break;default:}}function ZN(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e._processStartTag(t)):YN(e,t)}function QN(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e.onEndTag(t)):XN(e,t)}function $N(e,t){switch(t.tagID){case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:hM(e,t);break;case K.CAPTION:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,jN(e,t);break;case K.COL:e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,BN(e,t);break;case K.TR:e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,UN(e,t);break;case K.TD:case K.TH:e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,GN(e,t);break;default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,oN(e,t)}}function eP(e,t){t.tagID===K.TEMPLATE&&_M(e,t)}function tP(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):oM(e,t)}function nP(e,t){t.tagID===K.HTML?oN(e,t):iP(e,t)}function rP(e,t){if(t.tagID===K.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===K.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else iP(e,t)}function iP(e,t){e.insertionMode=Y.IN_BODY,TM(e,t)}function aP(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.FRAMESET:e._insertElement(t,W.HTML);break;case K.FRAME:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.NOFRAMES:hM(e,t);break;default:}}function oP(e,t){t.tagID===K.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==K.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function sP(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.NOFRAMES:hM(e,t);break;default:}}function cP(e,t){t.tagID===K.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function lP(e,t){t.tagID===K.HTML?oN(e,t):uP(e,t)}function uP(e,t){e.insertionMode=Y.IN_BODY,TM(e,t)}function dP(e,t){switch(t.tagID){case K.HTML:oN(e,t);break;case K.NOFRAMES:hM(e,t);break;default:}}function fP(e,t){t.chars=`�`,e._insertCharacters(t)}function pP(e,t){e._insertCharacters(t),e.framesetOk=!1}function mP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hP(e,t){if(Fj(t))mP(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?Ij(t):r===W.SVG&&(zj(t),Lj(t)),Rj(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gP(e,t){if(t.tagID===K.P||t.tagID===K.BR){mP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR]);function _P(e,t){return Yj.parse(e,t)}function vP(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Yj.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var yP={basename:bP,dirname:xP,extname:SP,join:CP,sep:`/`};function bP(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);EP(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xP(e){if(EP(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function SP(e){EP(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function CP(...e){let t=-1,n;for(;++t<e.length;)EP(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:wP(n)}function wP(e){EP(e);let t=e.codePointAt(0)===47,n=TP(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function TP(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function EP(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var DP={cwd:OP};function OP(){return`/`}function kP(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function AP(e){if(typeof e==`string`)e=new URL(e);else if(!kP(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return jP(e)}function jP(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var MP=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],NP=class{constructor(e){let t;t=e?kP(e)?{path:e}:typeof e==`string`||LP(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:DP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<MP.length;){let e=MP[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)MP.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?yP.basename(this.path):void 0}set basename(e){FP(e,`basename`),PP(e,`basename`),this.path=yP.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?yP.dirname(this.path):void 0}set dirname(e){IP(this.basename,`dirname`),this.path=yP.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?yP.extname(this.path):void 0}set extname(e){if(PP(e,`extname`),IP(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=yP.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){kP(e)&&(e=AP(e)),FP(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?yP.basename(this.path,this.extname):void 0}set stem(e){FP(e,`stem`),PP(e,`stem`),this.path=yP.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new pd(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function PP(e,t){if(e&&e.includes(yP.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+yP.sep+"`")}function FP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function IP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function LP(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var RP={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},zP=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,BP=/-[a-z]/g,VP=/%c(?:([-+])(\d+))?/g,HP=/%x/g,UP={2:!0,1:!1,0:null},WP={};function GP(e,t){let n=t||WP,r=n.onerror,i=e instanceof NP?e:new NP(e),a=n.fragment?vP:_P,o=String(i);return iA(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=KP(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=RP[a],o=new pd(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=UP[c],o.note=l(n.description),o.url=n.url===!1?void 0:zP+t,r(o)}function l(t){return t.replace(VP,n).replace(HP,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return JP(o.charAt(e.startOffset+i))}function r(){return YP(o.charCodeAt(e.startOffset))}}}}function KP(e){return e.replace(BP,qP)}function qP(e){return e.charAt(1).toUpperCase()}function JP(e){return e==="`"?"` ` `":e}function YP(e){return`0x`+e.toString(16).toUpperCase()}function XP(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return GP(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var ZP=typeof self==`object`?self:globalThis,QP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new ZP[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new ZP[a](o),i)};return r},$P=e=>QP(new Map,e)(0),eF=``,{toString:tF}={},{keys:nF}=Object,rF=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=tF.call(e).slice(8,-1);switch(n){case`Array`:return[1,eF];case`Object`:return[2,eF];case`Date`:return[3,eF];case`RegExp`:return[4,eF];case`Map`:return[5,eF];case`Set`:return[6,eF];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},iF=([e,t])=>e===0&&(t===`function`||t===`symbol`),aF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=rF(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of nF(r))(e||!iF(rF(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(iF(rF(n))||iF(rF(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!iF(rF(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},oF=(e,{json:t,lossy:n}={})=>{let r=[];return aF(!(t||n),!!t,new Map,r)(e),r},sF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?$P(oF(e,t)):structuredClone(e):(e,t)=>$P(oF(e,t)),cF=(function(e,t,n,r,i){let a=lF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return mF(e)?a.call(i,e,n,r):!1}),lF=(function(e){if(e==null)return pF;if(typeof e==`string`)return dF(e);if(typeof e==`object`)return uF(e);if(typeof e==`function`)return fF(e);throw Error("Expected function, string, or array as `test`")});function uF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lF(e[n]);return fF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function dF(e){return fF(t);function t(t){return t.tagName===e}}function fF(e){return t;function t(t,n,r){return!!(mF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function pF(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function mF(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var hF=lF(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),gF=/[ \t\n\f\r]/g;function _F(e){return typeof e==`object`?e.type===`text`?vF(e.value):!1:vF(e)}function vF(e){return e.replace(gF,``)===``}var yF=(function(e,t,n,r,i){let a=bF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!yF(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return EF(e)?a.call(i,e,n,r):!1}),bF=(function(e){if(e==null)return TF;if(typeof e==`function`)return wF(e);if(typeof e==`object`)return Array.isArray(e)?xF(e):SF(e);if(typeof e==`string`)return CF(e);throw Error(`Expected function, string, or object as test`)});function xF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=bF(e[n]);return wF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function SF(e){let t=e;return wF(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function CF(e){return wF(t);function t(t){return t&&t.type===e}}function wF(e){return t;function t(t,n,r){return!!(EF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function TF(){return!0}function EF(e){return typeof e==`object`&&!!e&&`type`in e}var DF=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),OF=[`button`,`input`,`select`,`textarea`],kF=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],AF={},jF=bF([`comment`,`doctype`]);function MF(e,t){NF(e,{collapse:WF((t||AF).newlines?HF:UF),whitespace:`normal`})}function NF(e,t){if(`children`in e){let n={...t};return(e.type===`root`||zF(e))&&(n.before=!0,n.after=!0),n.whitespace=GF(e,t),FF(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return PF(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:jF(e),stripAtStart:!1,remove:!1}}function PF(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&VF(n.charAt(0))&&i++,i!==a&&VF(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function FF(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=NF(i[o],{...t,after:IF(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),RF(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function IF(e,t,n){for(;++t<e.length;){let n=e[t],r=LF(n);if(r===void 0&&`children`in n&&!BF(n)&&(r=IF(n.children,-1)),typeof r==`boolean`)return r}return n}function LF(e){if(e.type===`element`){if(RF(e))return!1;if(zF(e))return!0}else if(e.type===`text`){if(!_F(e))return!1}else if(!jF(e))return!1}function RF(e){return hF(e)||cF(e,OF)}function zF(e){return cF(e,DF)}function BF(e){return!!(e.type===`element`&&e.properties.hidden)||jF(e)||cF(e,kF)}function VF(e){return e===` `||e===`
|
|
302
|
+
`}function HF(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:` `}function UF(){return` `}function WF(e){return t;function t(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}function GF(e,t){if(`tagName`in e&&e.properties)switch(e.tagName){case`listing`:case`plaintext`:case`script`:case`style`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return e.properties.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return e.properties.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}return t.whitespace}function KF(e){return function(t){MF(t,e)}}function qF(e){return e}var JF=[],YF=`skip`;function XF(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=bF(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+qF(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=JF,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ZF(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ZF(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?JF:[e]}function QF(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),XF(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var $F=tI(`end`),eI=tI(`start`);function tI(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function nI(e){let t=eI(e),n=$F(e);if(t&&n)return{start:t,end:n}}function rI(e,t){let n=t.properties||{},r=e.all(t),i={type:`link`,url:e.resolve(String(n.href||``)||null),title:n.title?String(n.title):null,children:r};return e.patch(t,i),i}function iI(e,t){e.baseFound||=(e.frozenBaseUrl=String(t.properties&&t.properties.href||``)||void 0,!0)}function aI(e,t){let n={type:`blockquote`,children:e.toFlow(e.all(t))};return e.patch(t,n),n}function oI(e,t){let n={type:`break`};return e.patch(t,n),n}var sI=(function(e,t,n){let r=bF(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),cI=/\n/g,lI=/[\t ]+/g,uI=lF(`br`),dI=lF(wI),fI=lF(`p`),pI=lF(`tr`),mI=lF([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,CI,TI]),hI=lF(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function gI(e,t){let n=t||{},r=`children`in e?e.children:[],i=hI(e),a=SI(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...yI(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(..._I(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?uI(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
|
|
303
|
+
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function _I(e,t,n){return e.type===`element`?vI(e,t,n):e.type===`text`?n.whitespace===`normal`?yI(e,n):bI(e):[]}function vI(e,t,n){let r=SI(e,n),i=e.children||[],a=-1,o=[];if(mI(e))return o;let s,c;for(uI(e)||pI(e)&&sI(t,e,pI)?c=`
|
|
304
|
+
`:fI(e)?(s=2,c=2):hI(e)&&(s=1,c=1);++a<i.length;)o=o.concat(_I(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?uI(i[a+1]):c}));return dI(e)&&sI(t,e,dI)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function yI(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){cI.lastIndex=a;let e=cI.exec(n),i=e&&`index`in e?e.index:n.length;r.push(xI(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function bI(e){return[String(e.value)]}function xI(e,t,n){let r=[],i=0,a;for(;i<e.length;){lI.lastIndex=i;let n=lI.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function SI(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function CI(e){return!!(e.properties||{}).hidden}function wI(e){return e.tagName===`td`||e.tagName===`th`}function TI(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function EI(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var DI=`language-`;function OI(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===DI){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:EI(gI(t))};return e.patch(t,o),o}function kI(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function AI(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function jI(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function MI(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...NI(e,r[i].titles),...NI(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:jI(o),children:o};return e.patch(t,n),n}}function NI(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,PI);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:jI(r),children:r}]}function PI(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function FI(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function II(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function LI(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:II(e.all(t))};return e.patch(t,n),n}function RI(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function zI(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function BI(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function VI(e,t){let n={type:`inlineCode`,value:gI(t)};return e.patch(t,n),n}function HI(e,t){let n=[],r=[],i=t||e.properties||{},a=UI(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=gI(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function UI(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...UI(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var WI=`[x]`,GI=`[ ]`;function KI(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||WI:e.options.unchecked||GI};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=HI(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var qI={}.hasOwnProperty;function JI(e,t){let n=e.type===`element`&&qI.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var YI=new Set([`pingback`,`prefetch`,`stylesheet`]);function XI(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!YI.has(String(t[n])))return!1;return!0}var ZI=lF(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),QI=lF(`meta`);function $I(e){return!!(e.type===`text`||ZI(e)||hF(e)||XI(e)||QI(e)&&JI(e,`itemProp`))}function eL(e,t){let{rest:n,checkbox:r}=nL(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:tL(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function tL(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if($I(r))continue;if(r.tagName===`p`||n||tL(r))return!0;n=!0}}return!1}function nL(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=nL(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function rL(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),iL),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:jI(r),children:r};return e.patch(t,a),a}function iL(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var aL={};function oL(e,t){let n=t||aL;return sL(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function sL(e,t,n){if(lL(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return cL(e.children,t,n)}return Array.isArray(e)?cL(e,t,n):``}function cL(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=sL(e[i],t,n);return r.join(``)}function lL(e){return!!(e&&typeof e==`object`)}var uL=bF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function dL(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!gL(n)||`children`in n&&dL(n.children))return!0}return!1}function fL(e){return mL(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?_F(e.value):!1})?[]:[{type:`paragraph`,children:II(e)}]}}function pL(e){return mL(e.children,t,n);function t(t){let n=_L(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=_L(e),r=_L(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function mL(e,t,n){let r=hL(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];gL(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function hL(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&dL(r.children)?t.push(...pL(r)):t.push(r)}return t}function gL(e){let t=e.data&&e.data.hName;return t?$I({type:`element`,tagName:t,properties:{},children:[]}):uL(e)}function _L(e){return sF({...e,children:[]})}function vL(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(QF({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||dL(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:oL(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function yL(e,t){let n=II(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var bL=[`"`];function xL(e,t){let n=e.options.quotes||bL;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function SL(e,t){let n=e.all(t);(e.options.document||dL(n))&&(n=fL(n));let r={type:`root`,children:n};return e.patch(t,r),r}function CL(e,t){let n=HI(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function wL(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function TL(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function EL(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),DL)};return e.patch(t,n),n}function DL(){return{type:`tableCell`,children:[]}}function OL(e,t){if(e.inTable){let n={type:`text`,value:gI(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=kL(t),i=e.toSpecificContent(e.all(t),jL);r&&i.unshift(jL());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,AL)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function kL(e){let t={align:[null],headless:!0},n=0,r=0;return QF(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return YF;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function AL(){return{type:`tableCell`,children:[]}}function jL(){return{type:`tableRow`,children:[]}}function ML(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function NL(e,t){let n={type:`text`,value:gI(t)};return e.patch(t,n),n}function PL(e,t){let n={type:`text`,value:``};return e.patch(t,n),n}var FL={comment:kI,doctype:zL,root:SL,text:ML},IL={applet:zL,area:zL,basefont:zL,bgsound:zL,caption:zL,col:zL,colgroup:zL,command:zL,content:zL,datalist:zL,dialog:zL,element:zL,embed:zL,frame:zL,frameset:zL,isindex:zL,keygen:zL,link:zL,math:zL,menu:zL,menuitem:zL,meta:zL,nextid:zL,noembed:zL,noframes:zL,optgroup:zL,option:zL,param:zL,script:zL,shadow:zL,source:zL,spacer:zL,style:zL,svg:zL,template:zL,title:zL,track:zL,abbr:LL,acronym:LL,bdi:LL,bdo:LL,big:LL,blink:LL,button:LL,canvas:LL,cite:LL,data:LL,details:LL,dfn:LL,font:LL,ins:LL,label:LL,map:LL,marquee:LL,meter:LL,nobr:LL,noscript:LL,object:LL,output:LL,progress:LL,rb:LL,rbc:LL,rp:LL,rt:LL,rtc:LL,ruby:LL,slot:LL,small:LL,span:LL,sup:LL,sub:LL,tbody:LL,tfoot:LL,thead:LL,time:LL,address:RL,article:RL,aside:RL,body:RL,center:RL,div:RL,fieldset:RL,figcaption:RL,figure:RL,form:RL,footer:RL,header:RL,hgroup:RL,html:RL,legend:RL,main:RL,multicol:RL,nav:RL,picture:RL,section:RL,a:rI,audio:vL,b:wL,base:iI,blockquote:aI,br:oI,code:VI,dir:rL,dl:MI,dt:eL,dd:eL,del:AI,em:FI,h1:LI,h2:LI,h3:LI,h4:LI,h5:LI,h6:LI,hr:RI,i:FI,iframe:zI,img:BI,image:BI,input:KI,kbd:VI,li:eL,listing:OI,mark:FI,ol:rL,p:yL,plaintext:OI,pre:OI,q:xL,s:AI,samp:VI,select:CL,strike:AI,strong:wL,summary:yL,table:OL,td:TL,textarea:NL,th:TL,tr:EL,tt:VI,u:FI,ul:rL,var:VI,video:vL,wbr:PL,xmp:OI};function LL(e,t){return e.all(t)}function RL(e,t){return e.toFlow(e.all(t))}function zL(){}var BL={}.hasOwnProperty;function VL(e){return{all:HL,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...IL,...e.handlers},inTable:!1,nodeHandlers:{...FL,...e.nodeHandlers},one:UL,options:e,patch:WL,qNesting:0,resolve:GL,toFlow:KL,toSpecificContent:qL}}function HL(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function UL(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(BL.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(BL.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function WL(e,t){e.position&&(t.position=nI(e))}function GL(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function KL(e){return fL(e)}function qL(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var JL={};function YL(e,t){let n=sF(e),r=t||JL,i=KF({newlines:r.newlines===!0}),a=VL(r),o;i(n),QF(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},QF(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var XL={document:!0};function ZL(e,t){return e&&`run`in e?async function(n,r){let i=YL(n,{...XL,...t});await e.run(i,r)}:function(t){return YL(t,{...XL,...e})}}function QL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var $L=lR(/[A-Za-z]/),eR=lR(/[\dA-Za-z]/),tR=lR(/[#-'*+\--9=?A-Z^-~]/);function nR(e){return e!==null&&(e<32||e===127)}var rR=lR(/\d/),iR=lR(/[\dA-Fa-f]/),aR=lR(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function oR(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var sR=lR(/\p{P}|\p{S}/u),cR=lR(/\s/);function lR(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function uR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function dR(e,t,n){let r=bF((n||{}).ignore||[]),i=fR(t),a=-1;for(;++a<i.length;)XF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function fR(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([pR(e[0]),mR(e[1])])}return t}function pR(e){return typeof e==`string`?new RegExp(uR(e),`g`):e}function mR(e){return typeof e==`function`?e:function(){return e}}var hR=`phrasing`,gR=[`autolink`,`link`,`image`,`label`];function _R(){return{transforms:[TR],enter:{literalAutolink:yR,literalAutolinkEmail:bR,literalAutolinkHttp:bR,literalAutolinkWww:bR},exit:{literalAutolink:wR,literalAutolinkEmail:CR,literalAutolinkHttp:xR,literalAutolinkWww:SR}}}function vR(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hR,notInConstruct:gR},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hR,notInConstruct:gR},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hR,notInConstruct:gR}]}}function yR(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function bR(e){this.config.enter.autolinkProtocol.call(this,e)}function xR(e){this.config.exit.autolinkProtocol.call(this,e)}function SR(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function CR(e){this.config.exit.autolinkEmail.call(this,e)}function wR(e){this.exit(e)}function TR(e){dR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ER],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,DR]],{ignore:[`link`,`linkReference`]})}function ER(e,t,n,r,i){let a=``;if(!AR(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!OR(n)))return!1;let o=kR(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function DR(e,t,n,r){return!AR(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function OR(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function kR(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=QL(e,`(`),a=QL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function AR(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||cR(n)||sR(n))&&(!t||n!==47)}function jR(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}VR.peek=BR;function MR(){this.buffer()}function NR(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function PR(){this.buffer()}function FR(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function IR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LR(e){this.exit(e)}function RR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zR(e){this.exit(e)}function BR(){return`[`}function VR(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function HR(){return{enter:{gfmFootnoteCallString:MR,gfmFootnoteCall:NR,gfmFootnoteDefinitionLabelString:PR,gfmFootnoteDefinition:FR},exit:{gfmFootnoteCallString:IR,gfmFootnoteCall:LR,gfmFootnoteDefinitionLabelString:RR,gfmFootnoteDefinition:zR}}}function UR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:VR},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
305
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?GR:WR))),s(),o}}function WR(e,t,n){return t===0?e:GR(e,t,n)}function GR(e,t,n){return(n?``:` `)+e}var KR=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];ZR.peek=QR;function qR(){return{canContainEols:[`delete`],enter:{strikethrough:YR},exit:{strikethrough:XR}}}function JR(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:KR}],handlers:{delete:ZR}}}function YR(e){this.enter({type:`delete`,children:[]},e)}function XR(e){this.exit(e)}function ZR(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function QR(){return`~`}function $R(e){return e.length}function ez(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$R,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=tz(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=nz(r[d]);else{let e=nz(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
306
|
+
`)}function tz(e){return e==null?``:String(e)}function nz(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var rz={}.hasOwnProperty;function iz(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&rz.call(t,e)){let n=String(t[e]);i=rz.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var az={}.hasOwnProperty;function oz(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)oz(e,t.extensions[n]);for(r in t)if(az.call(t,r))switch(r){case`extensions`:break;case`unsafe`:sz(e[r],t[r]);break;case`join`:sz(e[r],t[r]);break;case`handlers`:cz(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function sz(e,t){t&&e.push(...t)}function cz(e,t){t&&Object.assign(e,t)}function lz(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),uz);return i(),o}function uz(e,t,n){return`>`+(n?``:` `)+e}function dz(e,t){return fz(e,t.inConstruct,!0)&&!fz(e,t.notInConstruct,!1)}function fz(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pz(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
307
|
+
`&&dz(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
308
|
+
`}function mz(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function hz(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gz(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _z(e,t,n,r){let i=gz(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(hz(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,vz);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(mz(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
309
309
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
310
310
|
`),a&&(u+=s.move(a+`
|
|
311
|
-
`)),u+=s.move(c),l(),u}function
|
|
312
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
311
|
+
`)),u+=s.move(c),l(),u}function vz(e,t,n){return(n?``:` `)+e}function yz(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function bz(e,t,n,r){let i=yz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
312
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function xz(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sz(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Cz(e){if(e===null||oR(e)||cR(e))return 1;if(sR(e))return 2}function wz(e,t,n){let r=Cz(e),i=Cz(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Tz.peek=Ez;function Tz(e,t,n,r){let i=xz(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sz(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sz(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ez(e,t,n){return n.options.emphasis||`*`}function Dz(e,t){let n=!1;return QF(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&oL(e)&&(t.options.setext||n))}function Oz(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Dz(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
313
313
|
`,after:`
|
|
314
314
|
`});return r(),t(),o+`
|
|
315
315
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
316
316
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
317
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
318
|
-
`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:
|
|
319
|
-
]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:
|
|
320
|
-
*])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:
|
|
317
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=Sz(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}kz.peek=Az;function kz(e){return e.value||``}function Az(){return`<`}jz.peek=Mz;function jz(e,t,n,r){let i=yz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Mz(){return`!`}Nz.peek=Pz;function Nz(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Pz(){return`!`}Fz.peek=Iz;function Fz(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Iz(){return"`"}function Lz(e,t){let n=oL(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Rz.peek=zz;function Rz(e,t,n,r){let i=yz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Lz(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function zz(e,t,n){return Lz(e,n)?`<`:`[`}Bz.peek=Vz;function Bz(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Vz(){return`[`}function Hz(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Uz(e){let t=Hz(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Wz(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Gz(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Kz(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Wz(n):Hz(n),s=e.ordered?o===`.`?`)`:`.`:Uz(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Gz(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function qz(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Jz(e,t,n,r){let i=qz(n),a=n.bulletCurrent||Hz(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Yz(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Xz(e,t,n,r){return(e.children.some(function(e){return uL(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Zz(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qz.peek=$z;function Qz(e,t,n,r){let i=Zz(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sz(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sz(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function $z(e,t,n){return n.options.strong||`*`}function eB(e,t,n,r){return n.safe(e.value,r)}function tB(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nB(e,t,n){let r=(Gz(n)+(n.options.ruleSpaces?` `:``)).repeat(tB(n));return n.options.ruleSpaces?r.slice(0,-1):r}var rB={blockquote:lz,break:pz,code:_z,definition:bz,emphasis:Tz,hardBreak:pz,heading:Oz,html:kz,image:jz,imageReference:Nz,inlineCode:Fz,link:Rz,linkReference:Bz,list:Kz,listItem:Jz,paragraph:Yz,root:Xz,strong:Qz,text:eB,thematicBreak:nB},iB=[aB];function aB(e,t,n,r){if(t.type===`code`&&hz(t,r)&&(e.type===`list`||e.type===t.type&&hz(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&Dz(t,r))?void 0:+!!n.spread}var oB=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],sB=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
|
|
318
|
+
`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:oB},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
|
|
319
|
+
]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:oB},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
|
|
320
|
+
*])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:oB},{atBreak:!0,character:`+`,after:`(?:[ \r
|
|
321
321
|
])`},{atBreak:!0,character:`-`,after:`(?:[ \r
|
|
322
322
|
-])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
|
|
323
|
-
]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:
|
|
324
|
-
`)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=
|
|
323
|
+
]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:oB},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:oB},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:oB},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:oB},{atBreak:!0,character:`~`}],cB=document.createElement(`i`);function lB(e){let t=`&`+e+`;`;cB.innerHTML=t;let n=cB.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function uB(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var dB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fB(e){return e.replace(dB,pB)}function pB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return uB(n.slice(t?2:1),t?16:10)}return lB(n)||e}function mB(e){return e.label||!e.identifier?e.label||``:fB(e.identifier)}function hB(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function gB(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
|
|
324
|
+
`)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=Sz(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Sz(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function _B(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
|
|
325
325
|
`,after:`
|
|
326
|
-
`,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(
|
|
326
|
+
`,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(vB(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function vB(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
|
|
327
327
|
`.repeat(1+a);if(a===!1)return`
|
|
328
328
|
|
|
329
329
|
<!---->
|
|
330
330
|
|
|
331
331
|
`}return`
|
|
332
332
|
|
|
333
|
-
`}var
|
|
333
|
+
`}var yB=/\r?\n|\r/g;function bB(e,t){let n=[],r=0,i=0,a;for(;a=yB.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function xB(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!dz(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(SB);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(CB(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(Sz(r.charCodeAt(e))),c++))}return a.push(CB(r.slice(c,l),n.after)),a.join(``)}function SB(e,t){return e-t}function CB(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function wB(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function TB(e,t){let n=t||{},r={associationId:mB,containerPhrasing:kB,containerFlow:AB,createTracker:wB,compilePattern:hB,enter:a,handlers:{...rB},handle:void 0,indentLines:bB,indexStack:[],join:[...iB],options:{},safe:jB,stack:[],unsafe:[...sB]};oz(r,n),r.options.tightDefinitions&&r.join.push(OB),r.handle=iz(`type`,{invalid:EB,unknown:DB,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
334
334
|
`,after:`
|
|
335
335
|
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
336
|
-
`),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function
|
|
336
|
+
`),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function EB(e){throw Error("Cannot handle value `"+e+"`, expected node")}function DB(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function OB(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function kB(e,t){return gB(e,this,t)}function AB(e,t){return _B(e,this,t)}function jB(e,t){return xB(this,e,t)}function MB(){return{enter:{table:NB,tableData:LB,tableHeader:LB,tableRow:FB},exit:{codeText:RB,table:PB,tableData:IB,tableHeader:IB,tableRow:IB}}}function NB(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function PB(e){this.exit(e),this.data.inTable=void 0}function FB(e){this.enter({type:`tableRow`,children:[]},e)}function IB(e){this.exit(e)}function LB(e){this.enter({type:`tableCell`,children:[]},e)}function RB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zB));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function zB(e,t){return t===`|`?t:e}function BB(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
337
337
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
338
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return $R(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=nB.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function BB(){return{exit:{taskListCheckValueChecked:HB,taskListCheckValueUnchecked:HB,paragraph:UB}}}function VB(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:WB}}}function HB(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function UB(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function WB(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=nB.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function GB(){return[gR(),VR(),KR(),jB(),BB()]}function KB(e){return{extensions:[_R(),HR(e),qR(),zB(e),VB()]}}function qB(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function JB(e,t){return e.length>0?(qB(e,e.length,0,t),e):t}var YB={}.hasOwnProperty;function XB(e){let t={},n=-1;for(;++n<e.length;)ZB(t,e[n]);return t}function ZB(e,t){let n;for(n in t){let r=(YB.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){YB.call(r,a)||(r[a]=[]);let e=i[a];QB(r[a],Array.isArray(e)?e:e?[e]:[])}}}function QB(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);qB(e,0,0,r)}var $B={tokenize:pV,partial:!0},eV={tokenize:mV,partial:!0},tV={tokenize:hV,partial:!0},nV={tokenize:gV,partial:!0},rV={tokenize:_V,partial:!0},iV={name:`wwwAutolink`,tokenize:dV,previous:vV},aV={name:`protocolAutolink`,tokenize:fV,previous:yV},oV={name:`emailAutolink`,tokenize:uV,previous:bV},sV={};function cV(){return{text:sV}}for(var lV=48;lV<123;)sV[lV]=oV,lV++,lV===58?lV=65:lV===91&&(lV=97);sV[43]=oV,sV[45]=oV,sV[46]=oV,sV[95]=oV,sV[72]=[oV,aV],sV[104]=[oV,aV],sV[87]=[oV,iV],sV[119]=[oV,iV];function uV(e,t,n){let r=this,i,a;return o;function o(t){return!xV(t)||!bV.call(r,r.previous)||SV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return xV(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(rV,u,l)(t):t===45||t===95||$L(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&QL(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function dV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!vV.call(r,r.previous)||SV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check($B,e.attempt(eV,e.attempt(tV,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function fV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&yV.call(r,r.previous)&&!SV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(QL(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||tR(t)||aR(t)||sR(t)||oR(t)?n(t):e.attempt(eV,e.attempt(tV,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function pV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function mV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(nV,c,s)(t):t===null||aR(t)||sR(t)||t!==45&&oR(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function hV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(nV,t,a)(o):o===null||aR(o)||sR(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function gV(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||aR(o)||sR(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||aR(e)||sR(e)?t(e):r(e)}function a(e){return QL(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):QL(t)?(e.consume(t),o):n(t)}}function _V(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return $L(e)?n(e):t(e)}}function vV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||aR(e)}function yV(e){return!QL(e)}function bV(e){return!(e===47||xV(e))}function xV(e){return e===43||e===45||e===46||e===95||$L(e)}function SV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function CV(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&$L(e.charCodeAt(n+1))&&$L(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function wV(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var TV={name:`attention`,resolveAll:EV,tokenize:DV};function EV(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};OV(d,-c),OV(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=JB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=JB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=JB(l,wV(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=JB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=JB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,qB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function DV(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Sz(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Sz(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function OV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var kV={name:`autolink`,tokenize:AV};function AV(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return QL(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||$L(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||$L(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||tR(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):eR(t)?(e.consume(t),l):n(t)}function u(e){return $L(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||$L(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function jV(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var MV={partial:!0,tokenize:NV};function NV(e,t,n){return r;function r(t){return Q(t)?jV(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var PV={continuation:{tokenize:IV},exit:LV,name:`blockQuote`,tokenize:FV};function FV(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function IV(e,t,n){let r=this;return i;function i(t){return Q(t)?jV(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(PV,t,n)(r)}}function LV(e){e.exit(`blockQuote`)}var RV={name:`characterEscape`,tokenize:zV};function zV(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return iR(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var BV={name:`characterReference`,tokenize:VV};function VV(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=$L,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=rR,u):(e.enter(`characterReferenceValue`),a=7,o=nR,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===$L&&!cB(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var HV={partial:!0,tokenize:GV},UV={concrete:!0,name:`codeFenced`,tokenize:WV};function WV(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?jV(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(HV,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),jV(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?jV(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(HV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?jV(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?jV(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function GV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var KV={name:`codeIndented`,tokenize:JV},qV={partial:!0,tokenize:YV};function JV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),jV(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Z(t)?e.attempt(qV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function YV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):jV(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Z(e)?i(e):n(e)}}var XV={name:`codeText`,previous:QV,resolve:ZV,tokenize:$V};function ZV(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function QV(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function $V(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var eH=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&tH(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),tH(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tH(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);tH(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);tH(this.left,t.reverse())}}};function tH(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nH(e){let t={},n=-1,r,i,a,o,s,c,l,u=new eH(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,rH(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return qB(e,0,1/0,u.slice(0)),!l}function rH(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var iH={resolve:oH,tokenize:sH},aH={partial:!0,tokenize:cH};function oH(e){return nH(e),e}function sH(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(aH,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function cH(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jV(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function lH(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||tR(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||aR(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||tR(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function uH(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function dH(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jV(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function fH(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?jV(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var pH={name:`definition`,tokenize:hH},mH={partial:!0,tokenize:gH};function hH(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return uH.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=AR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return aR(t)?fH(e,l)(t):l(t)}function l(t){return lH(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(mH,d,d)(t)}function d(t){return Q(t)?jV(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function gH(e,t,n){return r;function r(t){return aR(t)?fH(e,i)(t):n(t)}function i(t){return dH(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?jV(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var _H={name:`hardBreakEscape`,tokenize:vH};function vH(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var yH={name:`headingAtx`,resolve:bH,tokenize:xH};function bH(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},qB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function xH(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||aR(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?jV(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||aR(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var SH=`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.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),CH=[`pre`,`script`,`style`,`textarea`],wH={concrete:!0,name:`htmlFlow`,resolveTo:DH,tokenize:OH},TH={partial:!0,tokenize:AH},EH={partial:!0,tokenize:kH};function DH(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function OH(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:de):QL(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):QL(a)?(e.consume(a),i=4,r.interrupt?t:de):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:de):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:re:m):n(i)}function h(t){return QL(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||aR(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&CH.includes(l)?(i=1,r.interrupt?t(s):re(s)):SH.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):re(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||$L(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:re):n(i)}function v(t){return Q(t)?(e.consume(t),v):w(t)}function y(t){return t===47?(e.consume(t),w):t===58||t===95||QL(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):w(t)}function b(t){return t===45||t===46||t===58||t===95||$L(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):ee(t)}function C(t){return t===c?(e.consume(t),c=null,te):t===null||Z(t)?n(t):(e.consume(t),C)}function ee(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||aR(t)?x(t):(e.consume(t),ee)}function te(e){return e===47||e===62||Q(e)?y(e):n(e)}function w(t){return t===62?(e.consume(t),ne):n(t)}function ne(t){return t===null||Z(t)?re(t):Q(t)?(e.consume(t),ne):n(t)}function re(t){return t===45&&i===2?(e.consume(t),se):t===60&&i===1?(e.consume(t),ce):t===62&&i===4?(e.consume(t),fe):t===63&&i===3?(e.consume(t),de):t===93&&i===5?(e.consume(t),ue):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(TH,pe,ie)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(t){return e.check(EH,ae,pe)(t)}function ae(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return t===null||Z(t)?ie(t):(e.enter(`htmlFlowData`),re(t))}function se(t){return t===45?(e.consume(t),de):re(t)}function ce(t){return t===47?(e.consume(t),o=``,le):re(t)}function le(t){if(t===62){let n=o.toLowerCase();return CH.includes(n)?(e.consume(t),fe):re(t)}return QL(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),le):re(t)}function ue(t){return t===93?(e.consume(t),de):re(t)}function de(t){return t===62?(e.consume(t),fe):t===45&&i===2?(e.consume(t),de):re(t)}function fe(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),pe(t)):(e.consume(t),fe)}function pe(n){return e.exit(`htmlFlow`),t(n)}}function kH(e,t,n){let r=this;return i;function i(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function AH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(MV,t,n)}}var jH={name:`htmlText`,tokenize:MH};function MH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):QL(t)?(e.consume(t),ee):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):QL(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,ce(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?se(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,ce(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?se(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?se(t):Z(t)?(o=v,ce(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,ce(t)):(e.consume(t),y)}function b(e){return e===62?se(e):y(e)}function x(t){return QL(t)?(e.consume(t),S):n(t)}function S(t){return t===45||$L(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,ce(t)):Q(t)?(e.consume(t),C):se(t)}function ee(t){return t===45||$L(t)?(e.consume(t),ee):t===47||t===62||aR(t)?te(t):n(t)}function te(t){return t===47?(e.consume(t),se):t===58||t===95||QL(t)?(e.consume(t),w):Z(t)?(o=te,ce(t)):Q(t)?(e.consume(t),te):se(t)}function w(t){return t===45||t===46||t===58||t===95||$L(t)?(e.consume(t),w):ne(t)}function ne(t){return t===61?(e.consume(t),re):Z(t)?(o=ne,ce(t)):Q(t)?(e.consume(t),ne):te(t)}function re(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ie):Z(t)?(o=re,ce(t)):Q(t)?(e.consume(t),re):(e.consume(t),ae)}function ie(t){return t===i?(e.consume(t),i=void 0,oe):t===null?n(t):Z(t)?(o=ie,ce(t)):(e.consume(t),ie)}function ae(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||aR(t)?te(t):(e.consume(t),ae)}function oe(e){return e===47||e===62||aR(e)?te(e):n(e)}function se(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ce(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),le}function le(t){return Q(t)?jV(e,ue,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ue(t)}function ue(t){return e.enter(`htmlTextData`),o(t)}}var NH={name:`labelEnd`,resolveAll:LH,resolveTo:RH,tokenize:zH},PH={tokenize:BH},FH={tokenize:VH},IH={tokenize:HH};function LH(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&qB(e,0,e.length,n),e}function RH(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=JB(s,e.slice(a+1,a+r+3)),s=JB(s,[[`enter`,u,t]]),s=JB(s,wV(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=JB(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=JB(s,e.slice(o+1)),s=JB(s,[[`exit`,c,t]]),qB(e,a,e.length,s),e}function zH(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(AR(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(PH,u,o?u:d)(t):t===91?e.attempt(FH,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(IH,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function BH(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return aR(t)?fH(e,a)(t):a(t)}function a(t){return t===41?u(t):lH(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return aR(t)?fH(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?dH(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return aR(t)?fH(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function VH(e,t,n){let r=this;return i;function i(t){return uH.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(AR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function HH(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var UH={name:`labelStartImage`,resolveAll:NH.resolveAll,tokenize:WH};function WH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var GH={name:`labelStartLink`,resolveAll:NH.resolveAll,tokenize:KH};function KH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var qH={name:`lineEnding`,tokenize:JH};function JH(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jV(e,t,`linePrefix`)}}var YH={name:`thematicBreak`,tokenize:XH};function XH(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?jV(e,s,`whitespace`)(t):s(t))}}var ZH={continuation:{tokenize:tU},exit:rU,name:`list`,tokenize:eU},QH={partial:!0,tokenize:iU},$H={partial:!0,tokenize:nU};function eU(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:nR(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(YH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return nR(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(MV,r.interrupt?n:u,e.attempt(QH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function tU(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(MV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,jV(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($H,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,jV(e,e.attempt(ZH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function nU(e,t,n){let r=this;return jV(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function rU(e){e.exit(this.containerState.type)}function iU(e,t,n){let r=this;return jV(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var aU={name:`setextUnderline`,resolveTo:oU,tokenize:sU};function oU(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function sU(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?jV(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var cU={tokenize:gU,partial:!0};function lU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:pU,continuation:{tokenize:mU},exit:hU}},text:{91:{name:`gfmFootnoteCall`,tokenize:fU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:uU,resolveTo:dU}}}}function uU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=AR(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function dU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function fU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||aR(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(AR(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return aR(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function pU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||aR(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=AR(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return aR(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),jV(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function mU(e,t,n){return e.check(MV,t,e.attempt(cU,t,n))}function hU(e){e.exit(`gfmFootnoteDefinition`)}function gU(e,t,n){let r=this;return jV(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function _U(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&qB(o,o.length,0,wV(s,e.slice(r+1,n),t)),qB(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),qB(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Sz(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Sz(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var vU=class{constructor(){this.map=[]}add(e,t,n){yU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function yU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function bU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function xU(){return{flow:{null:{name:`table`,tokenize:SU,resolveAll:CU}}}}function SU(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?jV(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||aR(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?jV(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?jV(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?jV(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?jV(e,C,`whitespace`)(n):(e.enter(`data`),ee(n))}function ee(t){return t===null||t===124||aR(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?te:ee)}function te(t){return t===92||t===124?(e.consume(t),ee):ee(t)}}function CU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new vU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(TU(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wU(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wU(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=wU(f,t,o,i,n,d)):(o[0]=o[1],d=wU(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&TU(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=bU(t.events,n))}return e}function wU(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},EU(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=EU(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=EU(t.events,n[2]),a=EU(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},EU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function TU(e,t,n,r,i){let a=[],o=EU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function EU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var DU={name:`tasklistCheck`,tokenize:kU};function OU(){return{text:{91:DU}}}function kU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return aR(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Q(r)?e.check({tokenize:AU},t,n)(r):n(r)}}function AU(e,t,n){return jV(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function jU(e){return XB([cV(),lU(),_U(e),xU(),OU()])}var MU={};function NU(e){let t=this,n=e||MU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(jU(n)),a.push(GB()),o.push(KB(n))}function PU(e){let t=this;t.compiler=n;function n(n){return wB(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function FU(e){if(e)throw e}var IU=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function LU(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function RU(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?zU(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function zU(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var BU=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),VU={}.hasOwnProperty,HU=new class e extends BU{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=RU()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,IU.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(GU(`data`,this.frozen),this.namespace[e]=t,this):VU.call(this.namespace,e)&&this.namespace[e]||void 0:e?(GU(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=JU(e),n=this.parser||this.Parser;return UU(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),UU(`process`,this.parser||this.Parser),WU(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=JU(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);XU(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),UU(`processSync`,this.parser||this.Parser),WU(`processSync`,this.compiler||this.Compiler),this.process(e,r),qU(`processSync`,`process`,t),n;function r(e,r){t=!0,FU(e),n=r}}run(e,t,n){KU(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=JU(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),qU(`runSync`,`run`,n),r;function i(e,t){FU(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=JU(t),r=this.compiler||this.Compiler;return WU(`stringify`,r),KU(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(GU(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,IU.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];LU(o)&&LU(r)&&(r=(0,IU.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function UU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function WU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function GU(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function KU(e){if(!LU(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function qU(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function JU(e){return YU(e)?e:new MP(e)}function YU(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function XU(e){return typeof e==`string`||ZU(e)}function ZU(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QU=9,$U=32;function eW(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tW(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tW(t.slice(i),i>0,!1)),a.join(``)}function tW(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===QU||t===$U;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===QU||t===$U;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nW(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return ZF(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return uW(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(oW(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(P.from(a.content).replaceChild(0,e.text(oW(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function rW(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function iW(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(P.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(P.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function aW(e){throw Error(`unknown markdown node: ${e.type}`)}function oW(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sW(){}function cW(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function lW(e,t,n,r){return rz(`tagName`,{handlers:e})(t,n,r)}function uW(e,t,n,r,i,a){return rz(`type`,{invalid:cW,unknown:aW,handlers:{toml:sW,yaml:sW,definition:sW,footnoteDefinition:sW,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=WP(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?lW(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=rW(eW(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return iW(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function dW(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function fW(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var pW=function(e,t){let n=uW(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,nW(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},mW=function(e){this.compiler=function(t){return pW(t,e)}};function hW(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>vF(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function gW(e,t){return hW(t.nodeHandlers,t.markHandlers).one(e)}function _W(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function vW(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var yW=e(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),bW=Object.assign(xW(Error),{eval:xW(EvalError),range:xW(RangeError),reference:xW(ReferenceError),syntax:xW(SyntaxError),type:xW(TypeError),uri:xW(URIError)});function xW(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,yW.default)(t,...n))}}var SW={}.hasOwnProperty,CW={yaml:`-`,toml:`+`};function wW(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=TW(r[n]);return t}function TW(e){let t=e;if(typeof t==`string`){if(!SW.call(CW,t))throw bW("Missing matter definition for `%s`",t);t={type:t,marker:CW[t]}}else if(typeof t!=`object`)throw bW("Expected matter to be an object, not `%j`",t);if(!SW.call(t,`type`))throw bW("Missing `type` in matter `%j`",t);if(!SW.call(t,`fence`)&&!SW.call(t,`marker`))throw bW("Missing `marker` or `fence` in matter `%j`",t);return t}function EW(e){let t=wW(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=OW(e,`open`).charCodeAt(0),a=DW(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function DW(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=OW(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Q(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Q(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return Z(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=OW(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||Z(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||Z(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Q(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Q(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||Z(i)?(e.exit(r),t(i)):n(i)}}}function OW(e,t){return e.marker?kW(e.marker,t).repeat(3):kW(e.fence,t)}function kW(e,t){return typeof e==`string`?e:e[t]}function AW(e){let t=wW(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=jW(e),r[e.type]=MW,r[e.type+`Value`]=NW}return{enter:n,exit:r}}function jW(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function MW(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function NW(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function PW(e){let t=[],n={},r=wW(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=FW(e);let a=IW(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:lR(a.charAt(1))})}return{unsafe:t,handlers:n}}function FW(e){let t=IW(e,`open`),n=IW(e,`close`);return r;function r(e){return t+(e.value?`
|
|
338
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return ez(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=rB.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function VB(){return{exit:{taskListCheckValueChecked:UB,taskListCheckValueUnchecked:UB,paragraph:WB}}}function HB(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:GB}}}function UB(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function WB(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function GB(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=rB.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function KB(){return[_R(),HR(),qR(),MB(),VB()]}function qB(e){return{extensions:[vR(),UR(e),JR(),BB(e),HB()]}}function JB(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function YB(e,t){return e.length>0?(JB(e,e.length,0,t),e):t}var XB={}.hasOwnProperty;function ZB(e){let t={},n=-1;for(;++n<e.length;)QB(t,e[n]);return t}function QB(e,t){let n;for(n in t){let r=(XB.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){XB.call(r,a)||(r[a]=[]);let e=i[a];$B(r[a],Array.isArray(e)?e:e?[e]:[])}}}function $B(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);JB(e,0,0,r)}var eV={tokenize:mV,partial:!0},tV={tokenize:hV,partial:!0},nV={tokenize:gV,partial:!0},rV={tokenize:_V,partial:!0},iV={tokenize:vV,partial:!0},aV={name:`wwwAutolink`,tokenize:fV,previous:yV},oV={name:`protocolAutolink`,tokenize:pV,previous:bV},sV={name:`emailAutolink`,tokenize:dV,previous:xV},cV={};function lV(){return{text:cV}}for(var uV=48;uV<123;)cV[uV]=sV,uV++,uV===58?uV=65:uV===91&&(uV=97);cV[43]=sV,cV[45]=sV,cV[46]=sV,cV[95]=sV,cV[72]=[sV,oV],cV[104]=[sV,oV],cV[87]=[sV,aV],cV[119]=[sV,aV];function dV(e,t,n){let r=this,i,a;return o;function o(t){return!SV(t)||!xV.call(r,r.previous)||CV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return SV(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(iV,u,l)(t):t===45||t===95||eR(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&$L(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function fV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!yV.call(r,r.previous)||CV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(eV,e.attempt(tV,e.attempt(nV,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function pV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&bV.call(r,r.previous)&&!CV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if($L(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||nR(t)||oR(t)||cR(t)||sR(t)?n(t):e.attempt(tV,e.attempt(nV,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function mV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function hV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(rV,c,s)(t):t===null||oR(t)||cR(t)||t!==45&&sR(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function gV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rV,t,a)(o):o===null||oR(o)||cR(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function _V(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||oR(o)||cR(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||oR(e)||cR(e)?t(e):r(e)}function a(e){return $L(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):$L(t)?(e.consume(t),o):n(t)}}function vV(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return eR(e)?n(e):t(e)}}function yV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oR(e)}function bV(e){return!$L(e)}function xV(e){return!(e===47||SV(e))}function SV(e){return e===43||e===45||e===46||e===95||eR(e)}function CV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function wV(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&eR(e.charCodeAt(n+1))&&eR(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function TV(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var EV={name:`attention`,resolveAll:DV,tokenize:OV};function DV(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};kV(d,-c),kV(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=YB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=YB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=YB(l,TV(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=YB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=YB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,JB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function OV(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Cz(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Cz(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function kV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var AV={name:`autolink`,tokenize:jV};function jV(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return $L(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||eR(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||eR(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||nR(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):tR(t)?(e.consume(t),l):n(t)}function u(e){return eR(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||eR(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var MV={partial:!0,tokenize:NV};function NV(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var PV={continuation:{tokenize:IV},exit:LV,name:`blockQuote`,tokenize:FV};function FV(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function IV(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(PV,t,n)(r)}}function LV(e){e.exit(`blockQuote`)}var RV={name:`characterEscape`,tokenize:zV};function zV(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return aR(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var BV={name:`characterReference`,tokenize:VV};function VV(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=eR,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=iR,u):(e.enter(`characterReferenceValue`),a=7,o=rR,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===eR&&!lB(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var HV={partial:!0,tokenize:GV},UV={concrete:!0,name:`codeFenced`,tokenize:WV};function WV(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(HV,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(HV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function GV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var KV={name:`codeIndented`,tokenize:JV},qV={partial:!0,tokenize:YV};function JV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(qV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function YV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var XV={name:`codeText`,previous:QV,resolve:ZV,tokenize:$V};function ZV(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function QV(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function $V(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var eH=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&tH(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),tH(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tH(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);tH(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);tH(this.left,t.reverse())}}};function tH(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nH(e){let t={},n=-1,r,i,a,o,s,c,l,u=new eH(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,rH(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return JB(e,0,1/0,u.slice(0)),!l}function rH(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var iH={resolve:oH,tokenize:sH},aH={partial:!0,tokenize:cH};function oH(e){return nH(e),e}function sH(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(aH,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function cH(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function lH(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||nR(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||oR(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||nR(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function uH(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function dH(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function fH(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var pH={name:`definition`,tokenize:hH},mH={partial:!0,tokenize:gH};function hH(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return uH.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=jR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return oR(t)?fH(e,l)(t):l(t)}function l(t){return lH(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(mH,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function gH(e,t,n){return r;function r(t){return oR(t)?fH(e,i)(t):n(t)}function i(t){return dH(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var _H={name:`hardBreakEscape`,tokenize:vH};function vH(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var yH={name:`headingAtx`,resolve:bH,tokenize:xH};function bH(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},JB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function xH(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||oR(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||oR(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var SH=`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.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),CH=[`pre`,`script`,`style`,`textarea`],wH={concrete:!0,name:`htmlFlow`,resolveTo:DH,tokenize:OH},TH={partial:!0,tokenize:AH},EH={partial:!0,tokenize:kH};function DH(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function OH(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:de):$L(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):$L(a)?(e.consume(a),i=4,r.interrupt?t:de):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:de):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:re:m):n(i)}function h(t){return $L(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||oR(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&CH.includes(l)?(i=1,r.interrupt?t(s):re(s)):SH.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):re(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||eR(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:re):n(i)}function v(t){return Z(t)?(e.consume(t),v):w(t)}function y(t){return t===47?(e.consume(t),w):t===58||t===95||$L(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):w(t)}function b(t){return t===45||t===46||t===58||t===95||eR(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):ee(t)}function C(t){return t===c?(e.consume(t),c=null,te):t===null||X(t)?n(t):(e.consume(t),C)}function ee(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||oR(t)?x(t):(e.consume(t),ee)}function te(e){return e===47||e===62||Z(e)?y(e):n(e)}function w(t){return t===62?(e.consume(t),ne):n(t)}function ne(t){return t===null||X(t)?re(t):Z(t)?(e.consume(t),ne):n(t)}function re(t){return t===45&&i===2?(e.consume(t),se):t===60&&i===1?(e.consume(t),ce):t===62&&i===4?(e.consume(t),fe):t===63&&i===3?(e.consume(t),de):t===93&&i===5?(e.consume(t),ue):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(TH,pe,ie)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(t){return e.check(EH,ae,pe)(t)}function ae(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return t===null||X(t)?ie(t):(e.enter(`htmlFlowData`),re(t))}function se(t){return t===45?(e.consume(t),de):re(t)}function ce(t){return t===47?(e.consume(t),o=``,le):re(t)}function le(t){if(t===62){let n=o.toLowerCase();return CH.includes(n)?(e.consume(t),fe):re(t)}return $L(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),le):re(t)}function ue(t){return t===93?(e.consume(t),de):re(t)}function de(t){return t===62?(e.consume(t),fe):t===45&&i===2?(e.consume(t),de):re(t)}function fe(t){return t===null||X(t)?(e.exit(`htmlFlowData`),pe(t)):(e.consume(t),fe)}function pe(n){return e.exit(`htmlFlow`),t(n)}}function kH(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function AH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(MV,t,n)}}var jH={name:`htmlText`,tokenize:MH};function MH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):$L(t)?(e.consume(t),ee):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):$L(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,ce(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?se(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,ce(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?se(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?se(t):X(t)?(o=v,ce(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,ce(t)):(e.consume(t),y)}function b(e){return e===62?se(e):y(e)}function x(t){return $L(t)?(e.consume(t),S):n(t)}function S(t){return t===45||eR(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,ce(t)):Z(t)?(e.consume(t),C):se(t)}function ee(t){return t===45||eR(t)?(e.consume(t),ee):t===47||t===62||oR(t)?te(t):n(t)}function te(t){return t===47?(e.consume(t),se):t===58||t===95||$L(t)?(e.consume(t),w):X(t)?(o=te,ce(t)):Z(t)?(e.consume(t),te):se(t)}function w(t){return t===45||t===46||t===58||t===95||eR(t)?(e.consume(t),w):ne(t)}function ne(t){return t===61?(e.consume(t),re):X(t)?(o=ne,ce(t)):Z(t)?(e.consume(t),ne):te(t)}function re(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ie):X(t)?(o=re,ce(t)):Z(t)?(e.consume(t),re):(e.consume(t),ae)}function ie(t){return t===i?(e.consume(t),i=void 0,oe):t===null?n(t):X(t)?(o=ie,ce(t)):(e.consume(t),ie)}function ae(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||oR(t)?te(t):(e.consume(t),ae)}function oe(e){return e===47||e===62||oR(e)?te(e):n(e)}function se(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ce(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),le}function le(t){return Z(t)?Q(e,ue,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ue(t)}function ue(t){return e.enter(`htmlTextData`),o(t)}}var NH={name:`labelEnd`,resolveAll:LH,resolveTo:RH,tokenize:zH},PH={tokenize:BH},FH={tokenize:VH},IH={tokenize:HH};function LH(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&JB(e,0,e.length,n),e}function RH(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=YB(s,e.slice(a+1,a+r+3)),s=YB(s,[[`enter`,u,t]]),s=YB(s,TV(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=YB(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=YB(s,e.slice(o+1)),s=YB(s,[[`exit`,c,t]]),JB(e,a,e.length,s),e}function zH(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(jR(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(PH,u,o?u:d)(t):t===91?e.attempt(FH,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(IH,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function BH(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return oR(t)?fH(e,a)(t):a(t)}function a(t){return t===41?u(t):lH(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return oR(t)?fH(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?dH(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return oR(t)?fH(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function VH(e,t,n){let r=this;return i;function i(t){return uH.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(jR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function HH(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var UH={name:`labelStartImage`,resolveAll:NH.resolveAll,tokenize:WH};function WH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var GH={name:`labelStartLink`,resolveAll:NH.resolveAll,tokenize:KH};function KH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var qH={name:`lineEnding`,tokenize:JH};function JH(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var YH={name:`thematicBreak`,tokenize:XH};function XH(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var ZH={continuation:{tokenize:tU},exit:rU,name:`list`,tokenize:eU},QH={partial:!0,tokenize:iU},$H={partial:!0,tokenize:nU};function eU(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:rR(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(YH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return rR(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(MV,r.interrupt?n:u,e.attempt(QH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function tU(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(MV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($H,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(ZH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function nU(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function rU(e){e.exit(this.containerState.type)}function iU(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var aU={name:`setextUnderline`,resolveTo:oU,tokenize:sU};function oU(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function sU(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var cU={tokenize:gU,partial:!0};function lU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:pU,continuation:{tokenize:mU},exit:hU}},text:{91:{name:`gfmFootnoteCall`,tokenize:fU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:uU,resolveTo:dU}}}}function uU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=jR(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function dU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function fU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||oR(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(jR(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return oR(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function pU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||oR(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=jR(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return oR(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function mU(e,t,n){return e.check(MV,t,e.attempt(cU,t,n))}function hU(e){e.exit(`gfmFootnoteDefinition`)}function gU(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function _U(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&JB(o,o.length,0,TV(s,e.slice(r+1,n),t)),JB(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),JB(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Cz(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Cz(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var vU=class{constructor(){this.map=[]}add(e,t,n){yU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function yU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function bU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function xU(){return{flow:{null:{name:`table`,tokenize:SU,resolveAll:CU}}}}function SU(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||oR(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),ee(n))}function ee(t){return t===null||t===124||oR(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?te:ee)}function te(t){return t===92||t===124?(e.consume(t),ee):ee(t)}}function CU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new vU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(TU(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wU(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wU(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=wU(f,t,o,i,n,d)):(o[0]=o[1],d=wU(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&TU(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=bU(t.events,n))}return e}function wU(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},EU(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=EU(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=EU(t.events,n[2]),a=EU(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},EU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function TU(e,t,n,r,i){let a=[],o=EU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function EU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var DU={name:`tasklistCheck`,tokenize:kU};function OU(){return{text:{91:DU}}}function kU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return oR(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Z(r)?e.check({tokenize:AU},t,n)(r):n(r)}}function AU(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function jU(e){return ZB([lV(),lU(),_U(e),xU(),OU()])}var MU={};function NU(e){let t=this,n=e||MU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(jU(n)),a.push(KB()),o.push(qB(n))}function PU(e){let t=this;t.compiler=n;function n(n){return TB(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function FU(e){if(e)throw e}var IU=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function LU(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function RU(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?zU(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function zU(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var BU=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),VU={}.hasOwnProperty,HU=new class e extends BU{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=RU()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,IU.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(GU(`data`,this.frozen),this.namespace[e]=t,this):VU.call(this.namespace,e)&&this.namespace[e]||void 0:e?(GU(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=JU(e),n=this.parser||this.Parser;return UU(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),UU(`process`,this.parser||this.Parser),WU(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=JU(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);XU(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),UU(`processSync`,this.parser||this.Parser),WU(`processSync`,this.compiler||this.Compiler),this.process(e,r),qU(`processSync`,`process`,t),n;function r(e,r){t=!0,FU(e),n=r}}run(e,t,n){KU(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=JU(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),qU(`runSync`,`run`,n),r;function i(e,t){FU(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=JU(t),r=this.compiler||this.Compiler;return WU(`stringify`,r),KU(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(GU(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,IU.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];LU(o)&&LU(r)&&(r=(0,IU.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function UU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function WU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function GU(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function KU(e){if(!LU(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function qU(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function JU(e){return YU(e)?e:new NP(e)}function YU(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function XU(e){return typeof e==`string`||ZU(e)}function ZU(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QU=9,$U=32;function eW(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tW(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tW(t.slice(i),i>0,!1)),a.join(``)}function tW(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===QU||t===$U;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===QU||t===$U;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nW(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return QF(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return uW(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(oW(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(P.from(a.content).replaceChild(0,e.text(oW(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function rW(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function iW(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(P.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(P.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function aW(e){throw Error(`unknown markdown node: ${e.type}`)}function oW(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sW(){}function cW(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function lW(e,t,n,r){return iz(`tagName`,{handlers:e})(t,n,r)}function uW(e,t,n,r,i,a){return iz(`type`,{invalid:cW,unknown:aW,handlers:{toml:sW,yaml:sW,definition:sW,footnoteDefinition:sW,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=GP(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?lW(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=rW(eW(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return iW(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function dW(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function fW(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var pW=function(e,t){let n=uW(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,nW(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},mW=function(e){this.compiler=function(t){return pW(t,e)}};function hW(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>yF(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function gW(e,t){return hW(t.nodeHandlers,t.markHandlers).one(e)}function _W(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function vW(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var yW=e(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),bW=Object.assign(xW(Error),{eval:xW(EvalError),range:xW(RangeError),reference:xW(ReferenceError),syntax:xW(SyntaxError),type:xW(TypeError),uri:xW(URIError)});function xW(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,yW.default)(t,...n))}}var SW={}.hasOwnProperty,CW={yaml:`-`,toml:`+`};function wW(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=TW(r[n]);return t}function TW(e){let t=e;if(typeof t==`string`){if(!SW.call(CW,t))throw bW("Missing matter definition for `%s`",t);t={type:t,marker:CW[t]}}else if(typeof t!=`object`)throw bW("Expected matter to be an object, not `%j`",t);if(!SW.call(t,`type`))throw bW("Missing `type` in matter `%j`",t);if(!SW.call(t,`fence`)&&!SW.call(t,`marker`))throw bW("Missing `marker` or `fence` in matter `%j`",t);return t}function EW(e){let t=wW(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=OW(e,`open`).charCodeAt(0),a=DW(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function DW(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=OW(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Z(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Z(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return X(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=OW(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||X(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||X(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Z(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Z(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||X(i)?(e.exit(r),t(i)):n(i)}}}function OW(e,t){return e.marker?kW(e.marker,t).repeat(3):kW(e.fence,t)}function kW(e,t){return typeof e==`string`?e:e[t]}function AW(e){let t=wW(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=jW(e),r[e.type]=MW,r[e.type+`Value`]=NW}return{enter:n,exit:r}}function jW(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function MW(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function NW(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function PW(e){let t=[],n={},r=wW(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=FW(e);let a=IW(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:uR(a.charAt(1))})}return{unsafe:t,handlers:n}}function FW(e){let t=IW(e,`open`),n=IW(e,`close`);return r;function r(e){return t+(e.value?`
|
|
339
339
|
`+e.value:``)+`
|
|
340
|
-
`+n}}function IW(e,t){return e.marker?LW(e.marker,t).repeat(3):LW(e.fence,t)}function LW(e,t){return typeof e==`string`?e:e[t]}var RW=`yaml`;function zW(e){let t=this,n=e||RW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(EW(n)),a.push(AW(n)),o.push(PW(n))}function BW(e){return e.charAt(0).toUpperCase()+e.slice(1)}var VW={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function HW(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}var UW=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=VW,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(
|
|
341
|
-
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(
|
|
340
|
+
`+n}}function IW(e,t){return e.marker?LW(e.marker,t).repeat(3):LW(e.fence,t)}function LW(e,t){return typeof e==`string`?e:e[t]}var RW=`yaml`;function zW(e){let t=this,n=e||RW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(EW(n)),a.push(AW(n)),o.push(PW(n))}function BW(e){return e.charAt(0).toUpperCase()+e.slice(1)}var VW={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function HW(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}var UW=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=VW,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(QF(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??BW(u)),f=n[u],p=`data:image/svg+xml;utf8,${HW(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function WW(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function GW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
341
|
+
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(mz(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
342
342
|
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
343
343
|
`),i&&(c+=a.move(i+`
|
|
344
|
-
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var KW={tokenize:JW,concrete:!0,name:`mathFlow`},qW={tokenize:YW,partial:!0};function JW(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),jV(e,l,`whitespace`)(t))}function l(t){return t===null||Z(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(qW,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?jV(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):Z(t)?e.attempt(qW,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||Z(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return jV(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),jV(e,c,`whitespace`)(t))}function c(r){return r===null||Z(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function YW(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function XW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:ZW,previous:QW,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||Z(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function ZW(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function QW(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function $W(e){return{flow:{36:KW},text:{36:XW(e)}}}var eG={};function tG(e){let t=this,n=e||eG,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push($W(n)),a.push(WW()),o.push(GW(n))}var nG={tokenize:rG};function rG(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jV(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var iG={tokenize:oG},aG={tokenize:sG};function oG(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return qB(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(aG,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(aG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;qB(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sG(e,t,n){return jV(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var cG={tokenize:lG};function lG(e){let t=this,n=e.attempt(MV,r,e.attempt(this.parser.constructs.flowInitial,i,jV(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iH,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var uG={resolveAll:mG()},dG=pG(`string`),fG=pG(`text`);function pG(e){return{resolveAll:mG(e===`text`?hG:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function mG(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function hG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var gG=t({attentionMarkers:()=>wG,contentInitial:()=>vG,disable:()=>TG,document:()=>_G,flow:()=>bG,flowInitial:()=>yG,insideSpan:()=>CG,string:()=>xG,text:()=>SG}),_G={42:ZH,43:ZH,45:ZH,48:ZH,49:ZH,50:ZH,51:ZH,52:ZH,53:ZH,54:ZH,55:ZH,56:ZH,57:ZH,62:PV},vG={91:pH},yG={[-2]:KV,[-1]:KV,32:KV},bG={35:yH,42:YH,45:[aU,YH],60:wH,61:aU,95:YH,96:UV,126:UV},xG={38:BV,92:RV},SG={[-5]:qH,[-4]:qH,[-3]:qH,33:UH,38:BV,42:TV,60:[kV,jH],91:GH,92:[_H,RV],93:NH,95:TV,96:XV},CG={null:[TV,uG]},wG={null:[42,95]},TG={null:[]};function EG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=JB(o,e),g(),o[o.length-1]===null?(ee(t,0),l.events=wV(a,l.events,l),l.events):[]}function f(e,t){return OG(p(e),t)}function p(e){return DG(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,w()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,w()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){ee(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=te(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function ee(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&qB(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function te(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function DG(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function OG(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
344
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var KW={tokenize:JW,concrete:!0,name:`mathFlow`},qW={tokenize:YW,partial:!0};function JW(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Q(e,l,`whitespace`)(t))}function l(t){return t===null||X(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(qW,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Q(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):X(t)?e.attempt(qW,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||X(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Q(e,c,`whitespace`)(t))}function c(r){return r===null||X(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function YW(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function XW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:ZW,previous:QW,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||X(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function ZW(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function QW(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function $W(e){return{flow:{36:KW},text:{36:XW(e)}}}var eG={};function tG(e){let t=this,n=e||eG,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push($W(n)),a.push(WW()),o.push(GW(n))}var nG={tokenize:rG};function rG(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var iG={tokenize:oG},aG={tokenize:sG};function oG(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return JB(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(aG,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(aG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;JB(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sG(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var cG={tokenize:lG};function lG(e){let t=this,n=e.attempt(MV,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iH,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var uG={resolveAll:mG()},dG=pG(`string`),fG=pG(`text`);function pG(e){return{resolveAll:mG(e===`text`?hG:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function mG(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function hG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var gG=t({attentionMarkers:()=>wG,contentInitial:()=>vG,disable:()=>TG,document:()=>_G,flow:()=>bG,flowInitial:()=>yG,insideSpan:()=>CG,string:()=>xG,text:()=>SG}),_G={42:ZH,43:ZH,45:ZH,48:ZH,49:ZH,50:ZH,51:ZH,52:ZH,53:ZH,54:ZH,55:ZH,56:ZH,57:ZH,62:PV},vG={91:pH},yG={[-2]:KV,[-1]:KV,32:KV},bG={35:yH,42:YH,45:[aU,YH],60:wH,61:aU,95:YH,96:UV,126:UV},xG={38:BV,92:RV},SG={[-5]:qH,[-4]:qH,[-3]:qH,33:UH,38:BV,42:EV,60:[AV,jH],91:GH,92:[_H,RV],93:NH,95:EV,96:XV},CG={null:[EV,uG]},wG={null:[42,95]},TG={null:[]};function EG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=YB(o,e),g(),o[o.length-1]===null?(ee(t,0),l.events=TV(a,l.events,l),l.events):[]}function f(e,t){return OG(p(e),t)}function p(e){return DG(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,w()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,w()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){ee(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=te(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function ee(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&JB(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function te(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function DG(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function OG(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
345
345
|
`;break;case-3:o=`\r
|
|
346
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function kG(e){let t={constructs:XB([gG,...(e||{}).extensions||[]]),content:n(nG),defined:[],document:n(iG),flow:n(cG),lazy:{},string:n(dG),text:n(fG)};return t;function n(e){return n;function n(n){return EG(t,e,n)}}}function AG(e){for(;!nH(e););return e}var jG=/[\0\t\n\r]/g;function MG(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(jG.lastIndex=u,c=jG.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var NG={}.hasOwnProperty;function PG(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),FG(n)(AG(kG(n).document().write(MG()(e,t,!0))))}function FG(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ke),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(Te),blockQuote:a(xe),characterEscape:te,characterReference:te,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(T,o),codeTextData:te,data:te,codeFlowValue:te,definition:a(Ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(we),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(De,o),htmlFlowData:te,htmlText:a(De,o),htmlTextData:te,image:a(Oe),label:o,link:a(ke),listItem:a(je),listItemValue:f,listOrdered:a(Ae,d),listUnordered:a(Ae),paragraph:a(Me),reference:me,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Te),strong:a(Ne),thematicBreak:a(Fe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:be,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:_e,characterReference:ve,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(_),codeText:c(oe),codeTextData:w,data:w,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ie),htmlFlowData:w,htmlText:c(ae),htmlTextData:w,image:c(ce),label:ue,labelText:le,lineEnding:ne,link:c(se),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:he,resourceDestinationString:de,resourceTitleString:fe,resource:pe,setextHeading:c(ee),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};LG(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];NG.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||zG).call(a,void 0,e[0])}for(r.position={start:IG(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:IG(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:IG(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||zG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ld({start:e.start,end:e.end})+`): it’s not open`);n.position.end=IG(e.end)}function u(){return aL(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=AR(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function te(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Pe(),n.position={start:IG(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=IG(e.end)}function ne(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=IG(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(te.call(this,e),w.call(this,e))}function re(){this.data.atHardBreak=!0}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function se(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ce(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function le(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=dB(t),n.identifier=AR(t).toLowerCase()}function ue(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function fe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function pe(){this.data.inReference=void 0}function me(){this.data.referenceType=`collapsed`}function he(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=AR(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ge(e){this.data.characterReferenceType=e.type}function _e(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=lB(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=cB(t);let i=this.stack[this.stack.length-1];i.value+=r}function ve(e){let t=this.stack.pop();t.position.end=IG(e.end)}function ye(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function be(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function xe(){return{type:`blockquote`,children:[]}}function Se(){return{type:`code`,lang:null,meta:null,value:``}}function T(){return{type:`inlineCode`,value:``}}function Ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function we(){return{type:`emphasis`,children:[]}}function Te(){return{type:`heading`,depth:0,children:[]}}function Ee(){return{type:`break`}}function De(){return{type:`html`,value:``}}function Oe(){return{type:`image`,title:null,url:``,alt:null}}function ke(){return{type:`link`,title:null,url:``,children:[]}}function Ae(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function je(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Me(){return{type:`paragraph`,children:[]}}function Ne(){return{type:`strong`,children:[]}}function Pe(){return{type:`text`,value:``}}function Fe(){return{type:`thematicBreak`}}}function IG(e){return{line:e.line,column:e.column,offset:e.offset}}function LG(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?LG(e,r):RG(e,r)}}function RG(e,t){let n;for(n in t)if(NG.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function zG(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ld({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ld({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ld({start:t.start,end:t.end})+`) is still open`)}function BG(e){let t=this;t.parser=n;function n(n){return PG(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function VG(){return{enter:{mdxFlowExpression:UG,mdxTextExpression:WG},exit:{mdxFlowExpression:GG,mdxFlowExpressionChunk:KG,mdxTextExpression:GG,mdxTextExpressionChunk:KG}}}function HG(){return{handlers:{mdxFlowExpression:qG,mdxTextExpression:qG},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function UG(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function WG(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function GG(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function KG(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function qG(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var JG=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),YG={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function XG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function ZG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function QG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function $G(e){return QG(e)||XG(e)}var eK=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function tK(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?$G:u===`decimal`?XG:ZG;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&JG.includes(y)&&(_=y,v=cB(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?cB(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):$G(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(nK(e))h(7,S),C=`�`;else if(e in YG)h(6,S),C=YG[e];else{let t=``;rK(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,eK[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function nK(e){return e>=55296&&e<=57343||e>1114111}function rK(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var iK=/["&'<>`]/g,aK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,sK=/[|\\{}()[\]^$+*?.]/g,cK=new WeakMap;function lK(e,t){if(e=e.replace(t.subset?uK(t.subset):iK,r),t.subset||t.escapeOnly)return e;return e.replace(aK,n).replace(oK,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function uK(e){let t=cK.get(e);return t||(t=dK(e),cK.set(e,t)),t}function dK(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(sK,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var fK=/[\dA-Fa-f]/;function pK(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!fK.test(String.fromCharCode(t))?r:r+`;`}var mK=/\d/;function hK(e,t,n){let r=`&#`+String(e);return n&&t&&!mK.test(String.fromCharCode(t))?r:r+`;`}var gK={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},_K=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],vK={}.hasOwnProperty,yK={},bK;for(bK in gK)vK.call(gK,bK)&&(yK[gK[bK]]=bK);var xK=/[^\dA-Za-z]/;function SK(e,t,n,r){let i=String.fromCharCode(e);if(vK.call(yK,i)){let e=yK[i],a=`&`+e;return n&&JG.includes(e)&&!_K.includes(e)&&(!r||t&&t!==61&&xK.test(String.fromCharCode(t)))?a:a+`;`}return``}function CK(e,t,n){let r=pK(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=SK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=hK(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function wK(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function TK(e,t){return lK(e,Object.assign({format:CK},t))}function EK(e,t){return lK(e,Object.assign({format:wK},t))}var DK=` `;function OK(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new pd("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new pd(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new pd("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=tK(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new pd("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+ld(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new pd("Expected a closing tag for `"+S(r)+"` ("+ld({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new pd("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+ld(t.end)+") or another opening tag after the start of `"+t.type+"` ("+ld(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function kK(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=NK,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=MK(jK(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&ZL(e,n)>ZL(e,o)?o:n;s=t+EK(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+DK+m[e];b+=y.move(`
|
|
346
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function kG(e){let t={constructs:ZB([gG,...(e||{}).extensions||[]]),content:n(nG),defined:[],document:n(iG),flow:n(cG),lazy:{},string:n(dG),text:n(fG)};return t;function n(e){return n;function n(n){return EG(t,e,n)}}}function AG(e){for(;!nH(e););return e}var jG=/[\0\t\n\r]/g;function MG(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(jG.lastIndex=u,c=jG.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var NG={}.hasOwnProperty;function PG(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),FG(n)(AG(kG(n).document().write(MG()(e,t,!0))))}function FG(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ke),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(Te),blockQuote:a(xe),characterEscape:te,characterReference:te,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(T,o),codeTextData:te,data:te,codeFlowValue:te,definition:a(Ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(we),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(De,o),htmlFlowData:te,htmlText:a(De,o),htmlTextData:te,image:a(Oe),label:o,link:a(ke),listItem:a(je),listItemValue:f,listOrdered:a(Ae,d),listUnordered:a(Ae),paragraph:a(Me),reference:me,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Te),strong:a(Ne),thematicBreak:a(Fe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:be,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:_e,characterReference:ve,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(_),codeText:c(oe),codeTextData:w,data:w,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ie),htmlFlowData:w,htmlText:c(ae),htmlTextData:w,image:c(ce),label:ue,labelText:le,lineEnding:ne,link:c(se),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:he,resourceDestinationString:de,resourceTitleString:fe,resource:pe,setextHeading:c(ee),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};LG(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];NG.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||zG).call(a,void 0,e[0])}for(r.position={start:IG(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:IG(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:IG(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||zG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ld({start:e.start,end:e.end})+`): it’s not open`);n.position.end=IG(e.end)}function u(){return oL(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jR(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function te(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Pe(),n.position={start:IG(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=IG(e.end)}function ne(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=IG(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(te.call(this,e),w.call(this,e))}function re(){this.data.atHardBreak=!0}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function se(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ce(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function le(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=fB(t),n.identifier=jR(t).toLowerCase()}function ue(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function fe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function pe(){this.data.inReference=void 0}function me(){this.data.referenceType=`collapsed`}function he(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jR(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ge(e){this.data.characterReferenceType=e.type}function _e(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=uB(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=lB(t);let i=this.stack[this.stack.length-1];i.value+=r}function ve(e){let t=this.stack.pop();t.position.end=IG(e.end)}function ye(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function be(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function xe(){return{type:`blockquote`,children:[]}}function Se(){return{type:`code`,lang:null,meta:null,value:``}}function T(){return{type:`inlineCode`,value:``}}function Ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function we(){return{type:`emphasis`,children:[]}}function Te(){return{type:`heading`,depth:0,children:[]}}function Ee(){return{type:`break`}}function De(){return{type:`html`,value:``}}function Oe(){return{type:`image`,title:null,url:``,alt:null}}function ke(){return{type:`link`,title:null,url:``,children:[]}}function Ae(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function je(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Me(){return{type:`paragraph`,children:[]}}function Ne(){return{type:`strong`,children:[]}}function Pe(){return{type:`text`,value:``}}function Fe(){return{type:`thematicBreak`}}}function IG(e){return{line:e.line,column:e.column,offset:e.offset}}function LG(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?LG(e,r):RG(e,r)}}function RG(e,t){let n;for(n in t)if(NG.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function zG(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ld({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ld({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ld({start:t.start,end:t.end})+`) is still open`)}function BG(e){let t=this;t.parser=n;function n(n){return PG(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function VG(){return{enter:{mdxFlowExpression:UG,mdxTextExpression:WG},exit:{mdxFlowExpression:GG,mdxFlowExpressionChunk:KG,mdxTextExpression:GG,mdxTextExpressionChunk:KG}}}function HG(){return{handlers:{mdxFlowExpression:qG,mdxTextExpression:qG},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function UG(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function WG(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function GG(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function KG(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function qG(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var JG=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),YG={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function XG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function ZG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function QG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function $G(e){return QG(e)||XG(e)}var eK=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function tK(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?$G:u===`decimal`?XG:ZG;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&JG.includes(y)&&(_=y,v=lB(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?lB(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):$G(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(nK(e))h(7,S),C=`�`;else if(e in YG)h(6,S),C=YG[e];else{let t=``;rK(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,eK[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function nK(e){return e>=55296&&e<=57343||e>1114111}function rK(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var iK=/["&'<>`]/g,aK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,sK=/[|\\{}()[\]^$+*?.]/g,cK=new WeakMap;function lK(e,t){if(e=e.replace(t.subset?uK(t.subset):iK,r),t.subset||t.escapeOnly)return e;return e.replace(aK,n).replace(oK,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function uK(e){let t=cK.get(e);return t||(t=dK(e),cK.set(e,t)),t}function dK(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(sK,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var fK=/[\dA-Fa-f]/;function pK(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!fK.test(String.fromCharCode(t))?r:r+`;`}var mK=/\d/;function hK(e,t,n){let r=`&#`+String(e);return n&&t&&!mK.test(String.fromCharCode(t))?r:r+`;`}var gK={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},_K=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],vK={}.hasOwnProperty,yK={},bK;for(bK in gK)vK.call(gK,bK)&&(yK[gK[bK]]=bK);var xK=/[^\dA-Za-z]/;function SK(e,t,n,r){let i=String.fromCharCode(e);if(vK.call(yK,i)){let e=yK[i],a=`&`+e;return n&&JG.includes(e)&&!_K.includes(e)&&(!r||t&&t!==61&&xK.test(String.fromCharCode(t)))?a:a+`;`}return``}function CK(e,t,n){let r=pK(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=SK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=hK(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function wK(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function TK(e,t){return lK(e,Object.assign({format:CK},t))}function EK(e,t){return lK(e,Object.assign({format:wK},t))}var DK=` `;function OK(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new pd("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new pd(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new pd("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=tK(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new pd("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+ld(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new pd("Expected a closing tag for `"+S(r)+"` ("+ld({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new pd("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+ld(t.end)+") or another opening tag after the start of `"+t.type+"` ("+ld(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function kK(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=NK,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=MK(jK(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&QL(e,n)>QL(e,o)?o:n;s=t+EK(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+DK+m[e];b+=y.move(`
|
|
347
347
|
`+m.join(`
|
|
348
348
|
`)+`
|
|
349
349
|
`+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
|
|
@@ -354,7 +354,7 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
354
354
|
|
|
355
355
|
`))}return r.pop(),s.join(``)}function jK(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function MK(e){return DK.repeat(e)}function NK(){return`<`}function PK(){return{enter:{mdxjsEsm:IK},exit:{mdxjsEsm:LK,mdxjsEsmData:RK}}}function FK(){return{handlers:{mdxjsEsm:zK}}}function IK(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function LK(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function RK(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function zK(e){return e.value||``}function BK(){return[VG(),OK(),PK()]}function VK(e){return{extensions:[HG(),kK(e),FK()]}}function HK(e){return e}var UK={}.hasOwnProperty,WK=Symbol(`continue`),GK=Symbol(`exit`),KK=Symbol(`skip`);function qK(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return YK(e)&&(s.displayName=`node (`+HK(e.type)+`)`),s;function s(){let s=n?JK(n(e,t,a,o)):[];if(s[0]===GK)return s;if(s[0]!==KK){let t;for(t in e)if(UK.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(YK(r)){let e=i(r,t,a,n)();if(e[0]===GK)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(YK(r)){let e=i(r,t,void 0,n)();if(e[0]===GK)return e}}}return r?JK(r(e,t,a,o)):s}}}function JK(e){return Array.isArray(e)?e:typeof e==`number`?[WK,e]:[e]}function YK(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function XK(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=QK(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&ZK(m);if(g&&!t.allowEmpty)throw new pd(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(ZK(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,qK(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=$K(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function ZK(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function QK(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=eq(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function $K(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function eq(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
|
|
356
356
|
`;break;case-3:a=`\r
|
|
357
|
-
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function tq(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=nq(n.start,r[0]||t.start),a=nq(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function nq(e,t){if(e&&typeof e==`object`){let n=`line`in e?rq(e.line):void 0,r=`column`in e?rq(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:rq(t)}}}function rq(e){return typeof e==`number`&&e>-1?e:void 0}var iq=2,aq=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,oq=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,sq=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,cq=`#unexpected-type-in-code-expected-an-object-spread-spread`,lq=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,uq=`#could-not-parse-expression-with-acorn`;function dq(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new pd("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=aq+oq,e}if(Z(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?fq.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||Z(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new pd("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=aq+sq,e}return Q(t)?jV(e,_,`linePrefix`,iq+1)(t):_(t)}}function fq(e,t,n,r,i,a,o){let s=XK(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=tq(e),n=new pd("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=aq+cq,n}if(e.expression.properties[1]){let t=new pd(`Unexpected extra content in spread: only a single spread is supported`,{place:tq(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=aq+lq,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=tq(e.expression.properties[0]),n=new pd("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=aq+cq,n}}if(s.error){let e=new pd(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=aq+uq,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function pq(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return dq.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Q(t)?jV(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||Z(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return dq.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var mq=/[$_\p{ID_Start}]/u,hq=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,gq=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,_q={};function vq(e){return e?mq.test(String.fromCodePoint(e)):!1}function yq(e,t){let n=(t||_q).jsx?gq:hq;return e?n.test(String.fromCodePoint(e)):!1}var bq=`https://github.com/micromark/micromark-extension-mdx-jsx`;function xq(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,ne,re,ie,ae,oe){let se=this,ce,le;return ue;function ue(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),de}function de(e){return aR(e)?n(e):(ce=fe,Pe(e))}function fe(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),ce=pe,Pe;if(t===62)return Ne(t);if(t!==null&&t>=0&&vq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function pe(t){if(t===62)return Ne(t);if(t!==null&&t>=0&&vq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function me(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),me;if(t===46||t===47||t===58||t===62||t===123||aR(t)||sR(t))return e.exit(f),ce=he,Pe(t);Le(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function he(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===58)return e.enter(h),e.consume(t),e.exit(h),ce=ye,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(t){if(t!==null&&t>=0&&vq(t))return e.enter(m),e.consume(t),_e;Le(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),_e;if(t===46||t===47||t===62||t===123||aR(t)||sR(t))return e.exit(m),ce=ve,Pe(t);Le(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ve(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(t){if(t!==null&&t>=0&&vq(t))return e.enter(g),e.consume(t),be;Le(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function be(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===62||t===123||aR(t)||sR(t))return e.exit(g),ce=xe,Pe(t);Le(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function xe(t){if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Se(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),ce=Me,Pe;if(t===62)return Ne(t);if(t===123)return dq.call(se,e,T,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&vq(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),Ce;Le(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function T(e){return ce=Se,Pe(e)}function Ce(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===58||t===61||t===62||t===123||aR(t)||sR(t))return e.exit(S),ce=we,Pe(t);Le(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),ce=Te,Pe;if(t===61)return e.exit(x),e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||aR(t)||sR(t)||t!==null&&t>=0&&vq(t))return e.exit(x),e.exit(b),ce=Se,Pe(t);Le(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t!==null&&t>=0&&vq(t))return e.enter(ee),e.consume(t),Ee;Le(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),Ee;if(t===47||t===61||t===62||t===123||aR(t)||sR(t))return e.exit(ee),e.exit(x),ce=De,Pe(t);Le(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function De(t){if(t===61)return e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(b),Se(t);Le(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Oe(t){if(t===34||t===39)return e.enter(w),e.enter(ne),e.consume(t),e.exit(ne),le=t,Ae;if(t===123)return dq.call(se,e,ke,ie,ae,oe,r,i,a,!1,!1,o)(t);Le(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function ke(t){return e.exit(b),ce=Se,Pe(t)}function Ae(t){return t===null&&Le(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(le)+"`"),t===le?(e.enter(ne),e.consume(t),e.exit(ne),e.exit(w),e.exit(b),le=void 0,ce=Se,Pe):Z(t)?(ce=Ae,Pe(t)):(e.enter(re),je(t))}function je(t){return t===null||t===le||Z(t)?(e.exit(re),Ae(t)):(e.consume(t),je)}function Me(e){if(e===62)return Ne(e);Le(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ne(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Pe(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ie):Q(t)||sR(t)?(e.enter(`esWhitespace`),Fe(t)):ce(t)}function Fe(t){return Z(t)?(e.exit(`esWhitespace`),Pe(t)):Q(t)||sR(t)?(e.consume(t),Fe):(e.exit(`esWhitespace`),ce(t))}function Ie(e){if(!o&&se.parser.lazy[se.now().line]){let e=new pd("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=bq+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Pe(e)}function Le(e,t,n){let r=new pd(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+Sq(e)+`)`)+` `+t+`, expected `+n,se.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=bq+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function Sq(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function Cq(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return xq.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function wq(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return xq.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Q(e)?jV(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||Z(e)?r(e):i(e)}}}function Tq(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:wq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Cq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Eq(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function Dq(){return XB([pq(),Tq(),Eq()])}var Oq=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],kq=/^>|^->|<!--|-->|--!>|<!-$/g,Aq=[`>`],jq=[`<`,`>`];function Mq(e,t,n,r){return r.settings.bogusComments?`<?`+TK(e.value,Object.assign({},r.settings.characterReferences,{subset:Aq}))+`>`:`<!--`+e.value.replace(kq,i)+`-->`;function i(e){return TK(e,Object.assign({},r.settings.characterReferences,{subset:jq}))}}function Nq(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var Pq=Lq(1),Fq=Lq(-1),Iq=[];function Lq(e){return t;function t(t,n,r){let i=t?t.children:Iq,a=(n||0)+e,o=i[a];if(!r)for(;o&&gF(o);)a+=e,o=i[a];return o}}var Rq={}.hasOwnProperty;function zq(e){return t;function t(t,n,r){return Rq.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Bq=zq({body:Uq,caption:Vq,colgroup:Vq,dd:qq,dt:Kq,head:Vq,html:Hq,li:Gq,optgroup:Yq,option:Xq,p:Wq,rp:Jq,rt:Jq,tbody:Qq,td:tJ,tfoot:$q,th:tJ,thead:Zq,tr:eJ});function Vq(e,t,n){let r=Pq(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&gF(r.value.charAt(0)))}function Hq(e,t,n){let r=Pq(n,t);return!r||r.type!==`comment`}function Uq(e,t,n){let r=Pq(n,t);return!r||r.type!==`comment`}function Wq(e,t,n){let r=Pq(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Gq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Kq(e,t,n){let r=Pq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function qq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Jq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Yq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Xq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Zq(e,t,n){let r=Pq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Qq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function $q(e,t,n){return!Pq(n,t)}function eJ(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function tJ(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var nJ=zq({body:aJ,colgroup:oJ,head:iJ,html:rJ,tbody:sJ});function rJ(e){let t=Pq(e,-1);return!t||t.type!==`comment`}function iJ(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function aJ(e){let t=Pq(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&gF(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function oJ(e,t,n){let r=Fq(n,t),i=Pq(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Bq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function sJ(e,t,n){let r=Fq(n,t),i=Pq(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Bq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var cJ={name:[[`
|
|
357
|
+
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function tq(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=nq(n.start,r[0]||t.start),a=nq(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function nq(e,t){if(e&&typeof e==`object`){let n=`line`in e?rq(e.line):void 0,r=`column`in e?rq(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:rq(t)}}}function rq(e){return typeof e==`number`&&e>-1?e:void 0}var iq=2,aq=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,oq=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,sq=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,cq=`#unexpected-type-in-code-expected-an-object-spread-spread`,lq=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,uq=`#could-not-parse-expression-with-acorn`;function dq(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new pd("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=aq+oq,e}if(X(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?fq.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||X(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new pd("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=aq+sq,e}return Z(t)?Q(e,_,`linePrefix`,iq+1)(t):_(t)}}function fq(e,t,n,r,i,a,o){let s=XK(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=tq(e),n=new pd("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=aq+cq,n}if(e.expression.properties[1]){let t=new pd(`Unexpected extra content in spread: only a single spread is supported`,{place:tq(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=aq+lq,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=tq(e.expression.properties[0]),n=new pd("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=aq+cq,n}}if(s.error){let e=new pd(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=aq+uq,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function pq(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return dq.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||X(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return dq.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var mq=/[$_\p{ID_Start}]/u,hq=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,gq=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,_q={};function vq(e){return e?mq.test(String.fromCodePoint(e)):!1}function yq(e,t){let n=(t||_q).jsx?gq:hq;return e?n.test(String.fromCodePoint(e)):!1}var bq=`https://github.com/micromark/micromark-extension-mdx-jsx`;function xq(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,ne,re,ie,ae,oe){let se=this,ce,le;return ue;function ue(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),de}function de(e){return oR(e)?n(e):(ce=fe,Pe(e))}function fe(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),ce=pe,Pe;if(t===62)return Ne(t);if(t!==null&&t>=0&&vq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function pe(t){if(t===62)return Ne(t);if(t!==null&&t>=0&&vq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function me(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),me;if(t===46||t===47||t===58||t===62||t===123||oR(t)||cR(t))return e.exit(f),ce=he,Pe(t);Le(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function he(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===58)return e.enter(h),e.consume(t),e.exit(h),ce=ye,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(t){if(t!==null&&t>=0&&vq(t))return e.enter(m),e.consume(t),_e;Le(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),_e;if(t===46||t===47||t===62||t===123||oR(t)||cR(t))return e.exit(m),ce=ve,Pe(t);Le(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ve(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(t){if(t!==null&&t>=0&&vq(t))return e.enter(g),e.consume(t),be;Le(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function be(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===62||t===123||oR(t)||cR(t))return e.exit(g),ce=xe,Pe(t);Le(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function xe(t){if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(d),Se(t);Le(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Se(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),ce=Me,Pe;if(t===62)return Ne(t);if(t===123)return dq.call(se,e,T,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&vq(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),Ce;Le(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function T(e){return ce=Se,Pe(e)}function Ce(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===58||t===61||t===62||t===123||oR(t)||cR(t))return e.exit(S),ce=we,Pe(t);Le(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),ce=Te,Pe;if(t===61)return e.exit(x),e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||oR(t)||cR(t)||t!==null&&t>=0&&vq(t))return e.exit(x),e.exit(b),ce=Se,Pe(t);Le(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t!==null&&t>=0&&vq(t))return e.enter(ee),e.consume(t),Ee;Le(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(t){if(t!==null&&t>=0&&yq(t,{jsx:!0}))return e.consume(t),Ee;if(t===47||t===61||t===62||t===123||oR(t)||cR(t))return e.exit(ee),e.exit(x),ce=De,Pe(t);Le(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function De(t){if(t===61)return e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&vq(t))return e.exit(b),Se(t);Le(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Oe(t){if(t===34||t===39)return e.enter(w),e.enter(ne),e.consume(t),e.exit(ne),le=t,Ae;if(t===123)return dq.call(se,e,ke,ie,ae,oe,r,i,a,!1,!1,o)(t);Le(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function ke(t){return e.exit(b),ce=Se,Pe(t)}function Ae(t){return t===null&&Le(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(le)+"`"),t===le?(e.enter(ne),e.consume(t),e.exit(ne),e.exit(w),e.exit(b),le=void 0,ce=Se,Pe):X(t)?(ce=Ae,Pe(t)):(e.enter(re),je(t))}function je(t){return t===null||t===le||X(t)?(e.exit(re),Ae(t)):(e.consume(t),je)}function Me(e){if(e===62)return Ne(e);Le(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ne(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Pe(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ie):Z(t)||cR(t)?(e.enter(`esWhitespace`),Fe(t)):ce(t)}function Fe(t){return X(t)?(e.exit(`esWhitespace`),Pe(t)):Z(t)||cR(t)?(e.consume(t),Fe):(e.exit(`esWhitespace`),ce(t))}function Ie(e){if(!o&&se.parser.lazy[se.now().line]){let e=new pd("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=bq+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Pe(e)}function Le(e,t,n){let r=new pd(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+Sq(e)+`)`)+` `+t+`, expected `+n,se.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=bq+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function Sq(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function Cq(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return xq.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function wq(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return xq.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Z(e)?Q(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||X(e)?r(e):i(e)}}}function Tq(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:wq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Cq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Eq(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function Dq(){return ZB([pq(),Tq(),Eq()])}var Oq=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],kq=/^>|^->|<!--|-->|--!>|<!-$/g,Aq=[`>`],jq=[`<`,`>`];function Mq(e,t,n,r){return r.settings.bogusComments?`<?`+TK(e.value,Object.assign({},r.settings.characterReferences,{subset:Aq}))+`>`:`<!--`+e.value.replace(kq,i)+`-->`;function i(e){return TK(e,Object.assign({},r.settings.characterReferences,{subset:jq}))}}function Nq(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var Pq=Lq(1),Fq=Lq(-1),Iq=[];function Lq(e){return t;function t(t,n,r){let i=t?t.children:Iq,a=(n||0)+e,o=i[a];if(!r)for(;o&&_F(o);)a+=e,o=i[a];return o}}var Rq={}.hasOwnProperty;function zq(e){return t;function t(t,n,r){return Rq.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Bq=zq({body:Uq,caption:Vq,colgroup:Vq,dd:qq,dt:Kq,head:Vq,html:Hq,li:Gq,optgroup:Yq,option:Xq,p:Wq,rp:Jq,rt:Jq,tbody:Qq,td:tJ,tfoot:$q,th:tJ,thead:Zq,tr:eJ});function Vq(e,t,n){let r=Pq(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&_F(r.value.charAt(0)))}function Hq(e,t,n){let r=Pq(n,t);return!r||r.type!==`comment`}function Uq(e,t,n){let r=Pq(n,t);return!r||r.type!==`comment`}function Wq(e,t,n){let r=Pq(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Gq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Kq(e,t,n){let r=Pq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function qq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Jq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Yq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Xq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Zq(e,t,n){let r=Pq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Qq(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function $q(e,t,n){return!Pq(n,t)}function eJ(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function tJ(e,t,n){let r=Pq(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var nJ=zq({body:aJ,colgroup:oJ,head:iJ,html:rJ,tbody:sJ});function rJ(e){let t=Pq(e,-1);return!t||t.type!==`comment`}function iJ(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function aJ(e){let t=Pq(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&_F(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function oJ(e,t,n){let r=Fq(n,t),i=Pq(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Bq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function sJ(e,t,n){let r=Fq(n,t),i=Pq(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Bq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var cJ={name:[[`
|
|
358
358
|
\f\r &/=>`.split(``),`
|
|
359
359
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
360
360
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -362,13 +362,13 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
362
362
|
\f\r &>`.split(``),`\0
|
|
363
363
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
364
364
|
\f\r "&'<=>\``.split(``),`\0
|
|
365
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function lJ(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=
|
|
365
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function lJ(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Ik);let l=uJ(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!nJ(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Bq(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function uJ(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=dJ(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function dJ(e,t,n){let r=Pk(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=TK(r.attribute,Object.assign({},e.settings.characterReferences,{subset:cJ.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Rk:Hk)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=TK(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:cJ.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&QL(n,o)>QL(n,e.alternative)&&(o=e.alternative),s=o+TK(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?cJ.single:cJ.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var fJ=[`<`,`&`];function pJ(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:TK(e.value,Object.assign({},r.settings.characterReferences,{subset:fJ}))}function mJ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:pJ(e,t,n,r)}function hJ(e,t,n,r){return r.all(e)}var gJ=iz(`type`,{invalid:_J,unknown:vJ,handlers:{comment:Mq,doctype:Nq,element:lJ,raw:mJ,root:hJ,text:pJ}});function _J(e){throw Error("Expected node, not `"+e+"`")}function vJ(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var yJ={},bJ={},xJ=[];function SJ(e,t){let n=t||yJ,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:CJ,all:wJ,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Oq,characterReferences:n.characterReferences||bJ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Ik:Fk,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function CJ(e,t,n){return gJ(e,t,n,this)}function wJ(e){let t=[],n=e&&e.children||xJ,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function TJ(e){let t=this,n={...t.data(`settings`),...e};t.compiler=r;function r(e){return SJ(e,n)}}function EJ(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DJ(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
366
366
|
`}]}function OJ(e,t){let n=t.value?t.value+`
|
|
367
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function kJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=
|
|
367
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function kJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=wV(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function MJ(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PJ(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function FJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PJ(e,t);let i={src:wV(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function IJ(e,t){let n={src:wV(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function LJ(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function RJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PJ(e,t);let i={href:wV(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zJ(e,t){let n={href:wV(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BJ(e,t,n){let r=e.all(t),i=n?VJ(n):HJ(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
368
368
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
369
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function VJ(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=HJ(n[r])}return t}function HJ(e){return e.spread??e.children.length>1}function UJ(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function WJ(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GJ(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function KJ(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qJ(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a
|
|
369
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function VJ(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=HJ(n[r])}return t}function HJ(e){return e.spread??e.children.length>1}function UJ(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function WJ(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GJ(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function KJ(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qJ(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=eI(t.children[1]),o=$F(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function JJ(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function YJ(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XJ(e,t){let n={type:`text`,value:eW(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ZJ(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var QJ={blockquote:EJ,break:DJ,code:OJ,delete:kJ,emphasis:AJ,footnoteReference:jJ,heading:MJ,html:NJ,imageReference:FJ,image:IJ,inlineCode:LJ,linkReference:RJ,link:zJ,listItem:BJ,list:UJ,paragraph:WJ,root:GJ,strong:KJ,table:qJ,tableCell:YJ,tableRow:JJ,text:XJ,thematicBreak:ZJ,toml:$J,yaml:$J,definition:$J,footnoteDefinition:$J};function $J(){}function eY(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function tY(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function nY(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||eY,r=e.options.footnoteBackLabel||tY,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=wV(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...sF(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
370
370
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
371
|
-
`}]}}var rY={}.hasOwnProperty,iY={};function aY(e,t){let n=t||iY,r=new Map,i=new Map,a={all:s,applyData:sY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...QJ,...n.handlers},one:o,options:n,patch:oY,wrap:lY};return
|
|
371
|
+
`}]}}var rY={}.hasOwnProperty,iY={};function aY(e,t){let n=t||iY,r=new Map,i=new Map,a={all:s,applyData:sY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...QJ,...n.handlers},one:o,options:n,patch:oY,wrap:lY};return QF(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(rY.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=sF(n);return r.children=a.all(e),r}return sF(e)}return(a.options.unknownHandler||cY)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=uY(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=uY(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function oY(e,t){e.position&&(t.position=nI(e))}function sY(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,sF(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function cY(e,t){let n=t.data||{},r=`value`in t&&!(rY.call(n,`hProperties`)||rY.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lY(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
372
372
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
373
373
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
374
374
|
`}),n}function uY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dY(e,t){let n=aY(e,t),r=n.one(e,void 0),i=nY(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
@@ -380,7 +380,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
380
380
|
`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
|
|
381
381
|
Please provide a chat model before proceeding with creating an answer session.
|
|
382
382
|
Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
|
|
383
|
-
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function $(e,...t){let n=Error(wY(KY[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function qY(e){return{raw:Number(e),formatted:OY(e)}}function JY(e){if(e.id){if(typeof e.id!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return AY()}function YY(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if($Y(r)){let e=nX(r);if(!Array.isArray(t)||t.length!==e)throw $(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(eX(r)){if(!Array.isArray(t))return n;let e=tX(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=YY(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var XY={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},ZY={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function QY(e){return e===`geopoint`}function $Y(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function eX(e){return typeof e==`string`&&XY[e]}function tX(e){return ZY[e]}function nX(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw $(`INVALID_VECTOR_VALUE`,e);case t<=0:throw $(`INVALID_VECTOR_SIZE`,e);default:return t}}function rX(){return{idToInternalId:new Map,internalIdToId:[],save:iX,load:aX}}function iX(e){return{internalIdToId:e.internalIdToId}}function aX(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function oX(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?oX(e,t.toString()):t}function sX(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function cX(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function lX(e,t){let n=oX(e.sharedInternalDocumentStore,t);return e.docs[n]}function uX(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=oX(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function dX(e){return e.docs}function fX(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function pX(e,t){let n=oX(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function mX(e){return e.count}function hX(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function gX(e){return{docs:e.docs,count:e.count}}function _X(){return{create:cX,get:lX,getMultiple:uX,getAll:dX,store:fX,remove:pX,count:mX,load:hX,save:gX}}var vX=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function yX(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),$(`PLUGIN_CRASHED`)}return n}var bX=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],xX=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function SX(e,t,n,r){if(e.some(zY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function CX(e,t,n){if(e.some(zY))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function wX(e,t,n,r,i){if(e.some(zY))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function TX(e,t,n,r){if(e.some(zY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function EX(e,t){if(e.some(zY))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var DX=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},OX=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new DX(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?DX.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new DX(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new DX(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new DX(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},kX=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function AX(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function jX(e,t,n){let r=AX(e,t,n);return{distance:r,isBounded:r>=0}}var MX=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(jY(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&jX(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(jY(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(jX(e,n,r).isBounded&&(i[n]=[]),jY(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},NX=class e extends MX{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,MX.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},PX=2,FX=6371e3,IX=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},LX=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new IX(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%PX===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=IX.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return FX*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let ee=S*(n*n-i*i)/(i*i),te=1+ee/16384*(4096+ee*(-768+ee*(320-175*ee))),w=ee/1024*(256+ee*(-128+ee*(74-47*ee))),ne=w*v*(C+w/4*(y*(-1+2*C*C)-w/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*te*(b-ne)}},RX=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function zX(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var BX=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=VX(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),HX(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function VX(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function HX(e,t,n,r,i){let a=VX(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function UX(e,t,n,r,i){let a=oX(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function WX(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=oX(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function GX(e,t,n,r){let i=oX(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function KX(e,t,n){e.tokenOccurrences[t][n]--}function qX(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){qX(e,t,o,r,n);continue}if($Y(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new BX(nX(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new RX,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new OX(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new NX,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new kX,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new LX,isArray:e};break;default:throw $(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function JX(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function YX(e,t,n,r,i,a,o,s,c,l,u){if($Y(o))return XX(t,n,a,r,i);let d=JX(e,t,n,i,s,c,l,u);if(!eX(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function XX(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function ZX(e,t,n,r,i,a,o,s,c,l){if($Y(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function QX(e,t,n,r,i,a,o,s,c,l){if(!eX(o))return ZX(e,t,n,r,i,a,o,s,c,l);let u=tX(o),d=a,f=d.length;for(let a=0;a<f;a++)ZX(e,t,n,r,i,d[a],u,s,c,l);return!0}function $X(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=zX(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function eZ(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw $(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw $(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];$X(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function tZ(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:VY(...i.map(n=>tZ(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>tZ(e,t,n,r)).reduce((e,t)=>UY(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return WY(a,tZ(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw $(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=UY(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=LY(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=sZ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=sZ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=dZ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw $(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=UY(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw $(`INVALID_FILTER_OPERATION`,e)}a[o]=UY(a[o],n)}}return VY(...Object.values(a))}function nZ(e){return e.searchableProperties}function rZ(e){return e.searchablePropertiesWithTypes}function iZ(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:NX.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:kX.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:OX.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:LX.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:RX.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:BX.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function aZ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function oZ(){return{create:qX,insert:YX,remove:QX,insertDocumentScoreParameters:UX,insertTokenScoreParameters:WX,removeDocumentScoreParameters:GX,removeTokenScoreParameters:KX,calculateResultScores:$X,search:eZ,searchByWhereClause:tZ,getSearchableProperties:nZ,getSearchablePropertiesWithTypes:rZ,load:iZ,save:aZ}}function sZ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function cZ(e,t,n=!1){let r=n?LX.vincentyDistance:LX.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function lZ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function uZ(e,t){let n=e,r=lZ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=LY(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),cZ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=LX.calculatePolygonCentroid(e);return cZ(s,r,n)}return null}function dZ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function fZ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=fZ(e,t,s,r,n);CY(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!$Y(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw $(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function pZ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:fZ(e,t,n,(r||{}).unsortableProperties||[],``)}function mZ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=oX(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&xZ(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function hZ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)yZ(e,n);e.isSorted=!0}function gZ(e,t,n){return t[1].localeCompare(n[1],gY(e))}function _Z(e,t){return e[1]-t[1]}function vZ(e,t){return t[1]?-1:1}function yZ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=gZ.bind(null,e.language);break;case`number`:r=_Z.bind(null);break;case`boolean`:r=vZ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function bZ(e){let t=Object.keys(e.sorts);for(let n of t)xZ(e,n)}function xZ(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function Qte(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=oX(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function SZ(e,t,n){if(!e.enabled)throw $(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw $(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return xZ(e,r),hZ(e),t.sort((t,n)=>{let r=a.docs.get(oX(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(oX(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function CZ(e){return e.enabled?e.sortableProperties:[]}function wZ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function TZ(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function EZ(e){if(!e.enabled)return{enabled:!1};bZ(e),hZ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function DZ(){return{create:pZ,insert:mZ,remove:Qte,save:EZ,load:TZ,sortBy:SZ,getSortableProperties:CZ,getSortablePropertiesWithTypes:wZ}}var OZ=192,kZ=383,AZ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function jZ(e){return e<OZ||e>kZ?e:AZ[e-OZ]||e}function MZ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=jZ(e.charCodeAt(n));return String.fromCharCode(...t)}var NZ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},PZ={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},FZ=`[^aeiou]`,IZ=`[aeiouy]`,LZ=FZ+`[^aeiouy]*`;IZ+``;var RZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,zZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,BZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,VZ=`^(`+LZ+`)?[aeiouy]`;function HZ(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(RZ),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(VZ),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+LZ+IZ+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(VZ),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(RZ),t&&r.test(t)&&(e=t+NZ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(RZ),t&&r.test(t)&&(e=t+PZ[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(BZ),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(BZ),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(BZ),i=new RegExp(zZ),a=RegExp(`^`+LZ+IZ+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(BZ),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function UZ(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=MZ(t),n&&this.normalizationCache.set(r,t),t)}function WZ(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function GZ(e,t,n,r=!0){if(t&&t!==this.language)throw $(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=mY[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=WZ(a);return this.allowDuplicates?o:Array.from(new Set(o))}function KZ(e={}){if(!e.language)e.language=`english`;else if(!hY.includes(e.language))throw $(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw $(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=HZ;else throw $(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:GZ,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:UZ,normalizationCache:new Map};return r.tokenize=GZ.bind(r),r.normalizeToken=UZ,r}function qZ(e){return{sharedInternalDocumentStore:e,rules:new Map}}function JZ(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function YZ(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function XZ(e,t){return e.rules.delete(t)}function ZZ(e,t){return e.rules.get(t)}function QZ(e){return Array.from(e.rules.values())}function $Z(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function eQ(e,t){return e?t.conditions.every(t=>$Z(e,t)):!1}function tQ(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())eQ(t,r)&&n.push(r);return n}function nQ(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function rQ(e){return{rules:Array.from(e.rules.entries())}}function iQ(){return{create:qZ,addRule:JZ,updateRule:YZ,removeRule:XZ,getRule:ZZ,getAllRules:QZ,getMatchingRules:tQ,load:nQ,save:rQ}}function aQ(e){let t={formatElapsedTime:qY,getDocumentIndexId:JY,getDocumentProperties:PY,validateSchema:YY};for(let n of xX){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw $(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!bX.includes(t)&&!xX.includes(t))throw $(`UNSUPPORTED_COMPONENT`,t)}function oQ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw $(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=AY();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:KZ(o):KZ({language:n??`english`}),r.tokenizer&&n)throw $(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=rX();s||=oZ(),l||=DZ(),c||=_X(),u||=iQ(),aQ(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:sQ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of vX)g[e]=(g[e]??[]).concat(yX(g,e));let _=g.afterCreate;return _&&EX(_,g),g}function sQ(){return`{{VERSION}}`}function cQ(e){return e.documentsStore.count(e.data.docs)}function lQ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw $(`SCHEMA_VALIDATION_FAILURE`,a);return zY(e.beforeInsert)||zY(e.afterInsert)||zY(e.index.beforeInsert)||zY(e.index.insert)||zY(e.index.afterInsert)?fQ(e,t,n,r,i):pQ(e,t,n,r,i)}var uQ=new Set([`enum`,`enum[]`]),dQ=new Set([`string`,`number`]);async function fQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=oX(e.internalDocumentIDStore,s);if(r||await SX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mQ(n,r,e,t)}return await hQ(e,s,u,f,l,n,t,i),r||await SX(e.afterInsert,e,s,t),s}function pQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=oX(e.internalDocumentIDStore,s);if(r||SX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mQ(n,r,e,t)}return gQ(e,s,u,f,l,n,t,i),r||SX(e.afterInsert,e,s,t),s}function mQ(e,t,n,r){if(!(QY(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!($Y(t)&&Array.isArray(r))&&!(eX(t)&&Array.isArray(r))&&!(uQ.has(t)&&dQ.has(e))&&e!==t)throw $(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function hQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function gQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=oX(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function _Q(e,t,n,r,i,a){return zY(e.afterInsertMultiple)||zY(e.beforeInsertMultiple)||zY(e.index.beforeInsert)||zY(e.index.insert)||zY(e.index.afterInsert)?vQ(e,t,n,r,i,a):yQ(e,t,n,r,i,a)}async function vQ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await lQ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&GY(e)}}})(),i||await CX(e.afterInsertMultiple,e,t),o}function yQ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=lQ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&GY(e)}}}return l(),i||CX(e.afterInsertMultiple,e,t),o}function bQ(e,t){return e[1]-t[1]}function xQ(e,t){return t[1]-e[1]}function SQ(e=`desc`){return e.toLowerCase()===`asc`?bQ:xQ}function CQ(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?FY(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;wQ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=wQ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:TQ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=TQ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw $(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=SQ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function wQ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function TQ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var EQ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},DQ=[`string`,`number`,`boolean`];function OQ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw $(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!DQ.includes(a[t]))throw $(`INVALID_GROUP_BY_PROPERTY`,t,DQ.join(`, `),a[t])}let o=t.map(([t])=>sX(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=FY(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=kQ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=NY(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||EQ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function kQ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=kQ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];CY(n,t),i.push(n)}return i}function AQ(e,t,n,r){let i=tQ(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=oX(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function jQ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw $(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=cQ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},IQ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=NQ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${MQ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?uZ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function MQ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function NQ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function PQ(e,t,n){let r=kY();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=jQ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[oX(e.internalDocumentIDStore,t),n]);else d=d.sort(MY);d=AQ(e,e.data.pinning,d,t.term);let f;u||(f=c?JQ(e,d,s,o,c):YQ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||RY(p,i)),a&&(p.facets=CQ(e,d,t.facets)),t.groupBy&&(p.groups=OQ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(kY()-r),p}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var FQ={k:1.2,b:.75,d:.5};function IQ(e){let t=e??{};return t.k=t.k??FQ.k,t.b=t.b??FQ.b,t.d=t.d??FQ.d,t}function LQ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw $(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw $(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?$(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):$(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function RQ(e,t,n=`english`){let r=kY();function i(){let i=LQ(e,t,n).sort(MY);i=AQ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=CQ(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:sX(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=OQ(e,i,t.groupBy));let f=kY()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:OY(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function zQ(e,t,n){let r=HQ(jQ(e,t,n)),i=LQ(e,t,n),a=t.hybridWeights;return GQ(r,i,t.term??``,a)}function BQ(e,t,n){let r=kY();function i(){let i=zQ(e,t,n);i=AQ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=CQ(e,i,t.facets));let o;t.groupBy&&(o=OQ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=YQ(e,i,s,c).filter(Boolean),u=kY(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:OY(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||RY(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function VQ(e){return e[1]}function HQ(e){let t=Math.max.apply(Math,e.map(VQ));return e.map(([e,n])=>[e,n/t])}function UQ(e,t){return e/t}function WQ(e,t){return(n,r)=>n*e+r*t}function GQ(e,t,n,r){let i=Math.max.apply(Math,e.map(VQ)),a=Math.max.apply(Math,t.map(VQ)),{text:o,vector:s}=r&&r.text&&r.vector?r:KQ(n),c=new Map,l=e.length,u=WQ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(UQ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=UQ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function KQ(e){return{text:.5,vector:.5}}function qQ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return PQ(e,t,n);if(r===`vector`)return RQ(e,t);if(r===`hybrid`)return BQ(e,t);throw $(`INVALID_SEARCH_MODE`,r)}function JQ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=FY(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:sX(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function YQ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:sX(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}new Cy.default;var XQ=new Cy.default;XQ.Diff_Timeout=.25;var ZQ=A({path:k(Pa([E(),D()])),message:E(),issueCode:E()});Ia(`code`,[A({code:M(`SCHEMA_INVALID`),issues:k(ZQ)}),A({code:M(`WRITE_ERROR`),detail:E()})]);function QQ(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function $Q(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var e$=`frontmatter`,t$=[`text`,`number`,`boolean`,`date`,`list`,`object`];j(t$);var n$=Pa([E(),D(),O()]),r$=uo(()=>Pa([n$.transform(e=>String(e)),Ba(E(),i$),k(r$)])),i$=uo(()=>Pa([E(),D(),O(),k(r$),Ba(E(),i$)])),a$=/^\d{4}-\d{2}-\d{2}$/;function o$(e){return typeof e==`string`&&a$.test(e)}function s$(e){return Array.isArray(e)?`list`:typeof e==`object`&&e?`object`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:o$(e)?`date`:`text`}function c$(e){if(Array.isArray(e)){let t=[];for(let n of e)n!==null&&t.push(c$(n));return t}if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=r===null?``:c$(r);return t}return e}var l$=go(c$,Ba(E(),i$)),u$=Ba(E(),Pa([i$,Ta()]));function d$(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}function f$(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!f$(e[n],t[n]))return!1;return!0}if(e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&!Array.isArray(e)&&!Array.isArray(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.hasOwn(t,r)||!f$(e[r],t[r]))return!1;return!0}return!1}var p$=/^---[ \t]*\r?\n([\s\S]*?\r?\n)?---[ \t]*(\r?\n|$)/,m$=/^---[ \t]*$/;function h$(e){let t=e.match(p$);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}function g$(e){if(e===``)return``;let t=e.match(p$);return t?(t[1]??``).replace(/\r?\n$/,``):e}var _$={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function v$(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function y$(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=ko(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(v$(n)){let r=e.createNode(n),i=Eo(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function b$(e){return e===``?``:`---\n${e.endsWith(`
|
|
383
|
+
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function $(e,...t){let n=Error(wY(KY[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function qY(e){return{raw:Number(e),formatted:OY(e)}}function JY(e){if(e.id){if(typeof e.id!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return AY()}function YY(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if($Y(r)){let e=nX(r);if(!Array.isArray(t)||t.length!==e)throw $(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(eX(r)){if(!Array.isArray(t))return n;let e=tX(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=YY(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var XY={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},ZY={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function QY(e){return e===`geopoint`}function $Y(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function eX(e){return typeof e==`string`&&XY[e]}function tX(e){return ZY[e]}function nX(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw $(`INVALID_VECTOR_VALUE`,e);case t<=0:throw $(`INVALID_VECTOR_SIZE`,e);default:return t}}function rX(){return{idToInternalId:new Map,internalIdToId:[],save:iX,load:aX}}function iX(e){return{internalIdToId:e.internalIdToId}}function aX(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function oX(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?oX(e,t.toString()):t}function sX(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function cX(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function lX(e,t){let n=oX(e.sharedInternalDocumentStore,t);return e.docs[n]}function uX(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=oX(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function dX(e){return e.docs}function fX(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function pX(e,t){let n=oX(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function mX(e){return e.count}function hX(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function gX(e){return{docs:e.docs,count:e.count}}function _X(){return{create:cX,get:lX,getMultiple:uX,getAll:dX,store:fX,remove:pX,count:mX,load:hX,save:gX}}var vX=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function yX(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),$(`PLUGIN_CRASHED`)}return n}var bX=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],xX=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function SX(e,t,n,r){if(e.some(zY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function CX(e,t,n){if(e.some(zY))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function wX(e,t,n,r,i){if(e.some(zY))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function TX(e,t,n,r){if(e.some(zY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function EX(e,t){if(e.some(zY))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var DX=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},OX=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new DX(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?DX.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new DX(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new DX(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new DX(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},kX=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function AX(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function jX(e,t,n){let r=AX(e,t,n);return{distance:r,isBounded:r>=0}}var MX=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(jY(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&jX(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(jY(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(jX(e,n,r).isBounded&&(i[n]=[]),jY(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},NX=class e extends MX{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,MX.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},PX=2,FX=6371e3,IX=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},LX=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new IX(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%PX===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=IX.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return FX*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let ee=S*(n*n-i*i)/(i*i),te=1+ee/16384*(4096+ee*(-768+ee*(320-175*ee))),w=ee/1024*(256+ee*(-128+ee*(74-47*ee))),ne=w*v*(C+w/4*(y*(-1+2*C*C)-w/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*te*(b-ne)}},RX=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function zX(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var BX=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=VX(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),HX(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function VX(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function HX(e,t,n,r,i){let a=VX(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function UX(e,t,n,r,i){let a=oX(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function WX(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=oX(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function GX(e,t,n,r){let i=oX(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function KX(e,t,n){e.tokenOccurrences[t][n]--}function qX(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){qX(e,t,o,r,n);continue}if($Y(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new BX(nX(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new RX,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new OX(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new NX,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new kX,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new LX,isArray:e};break;default:throw $(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function JX(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function YX(e,t,n,r,i,a,o,s,c,l,u){if($Y(o))return XX(t,n,a,r,i);let d=JX(e,t,n,i,s,c,l,u);if(!eX(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function XX(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function ZX(e,t,n,r,i,a,o,s,c,l){if($Y(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function QX(e,t,n,r,i,a,o,s,c,l){if(!eX(o))return ZX(e,t,n,r,i,a,o,s,c,l);let u=tX(o),d=a,f=d.length;for(let a=0;a<f;a++)ZX(e,t,n,r,i,d[a],u,s,c,l);return!0}function $X(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=zX(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function eZ(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw $(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw $(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];$X(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function tZ(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:VY(...i.map(n=>tZ(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>tZ(e,t,n,r)).reduce((e,t)=>UY(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return WY(a,tZ(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw $(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=UY(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=LY(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=sZ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=sZ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=dZ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw $(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=UY(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw $(`INVALID_FILTER_OPERATION`,e)}a[o]=UY(a[o],n)}}return VY(...Object.values(a))}function nZ(e){return e.searchableProperties}function rZ(e){return e.searchablePropertiesWithTypes}function iZ(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:NX.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:kX.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:OX.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:LX.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:RX.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:BX.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function aZ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function oZ(){return{create:qX,insert:YX,remove:QX,insertDocumentScoreParameters:UX,insertTokenScoreParameters:WX,removeDocumentScoreParameters:GX,removeTokenScoreParameters:KX,calculateResultScores:$X,search:eZ,searchByWhereClause:tZ,getSearchableProperties:nZ,getSearchablePropertiesWithTypes:rZ,load:iZ,save:aZ}}function sZ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function cZ(e,t,n=!1){let r=n?LX.vincentyDistance:LX.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function lZ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function uZ(e,t){let n=e,r=lZ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=LY(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),cZ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=LX.calculatePolygonCentroid(e);return cZ(s,r,n)}return null}function dZ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function fZ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=fZ(e,t,s,r,n);CY(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!$Y(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw $(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function pZ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:fZ(e,t,n,(r||{}).unsortableProperties||[],``)}function mZ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=oX(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&xZ(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function hZ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)yZ(e,n);e.isSorted=!0}function gZ(e,t,n){return t[1].localeCompare(n[1],gY(e))}function _Z(e,t){return e[1]-t[1]}function vZ(e,t){return t[1]?-1:1}function yZ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=gZ.bind(null,e.language);break;case`number`:r=_Z.bind(null);break;case`boolean`:r=vZ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function bZ(e){let t=Object.keys(e.sorts);for(let n of t)xZ(e,n)}function xZ(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function SZ(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=oX(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function CZ(e,t,n){if(!e.enabled)throw $(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw $(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return xZ(e,r),hZ(e),t.sort((t,n)=>{let r=a.docs.get(oX(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(oX(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function wZ(e){return e.enabled?e.sortableProperties:[]}function TZ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function Qte(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function EZ(e){if(!e.enabled)return{enabled:!1};bZ(e),hZ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function DZ(){return{create:pZ,insert:mZ,remove:SZ,save:EZ,load:Qte,sortBy:CZ,getSortableProperties:wZ,getSortablePropertiesWithTypes:TZ}}var OZ=192,kZ=383,AZ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function jZ(e){return e<OZ||e>kZ?e:AZ[e-OZ]||e}function MZ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=jZ(e.charCodeAt(n));return String.fromCharCode(...t)}var NZ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},PZ={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},FZ=`[^aeiou]`,IZ=`[aeiouy]`,LZ=FZ+`[^aeiouy]*`;IZ+``;var RZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,zZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,BZ=`^(`+LZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,VZ=`^(`+LZ+`)?[aeiouy]`;function HZ(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(RZ),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(VZ),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+LZ+IZ+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(VZ),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(RZ),t&&r.test(t)&&(e=t+NZ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(RZ),t&&r.test(t)&&(e=t+PZ[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(BZ),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(BZ),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(BZ),i=new RegExp(zZ),a=RegExp(`^`+LZ+IZ+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(BZ),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function UZ(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=MZ(t),n&&this.normalizationCache.set(r,t),t)}function WZ(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function GZ(e,t,n,r=!0){if(t&&t!==this.language)throw $(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=mY[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=WZ(a);return this.allowDuplicates?o:Array.from(new Set(o))}function KZ(e={}){if(!e.language)e.language=`english`;else if(!hY.includes(e.language))throw $(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw $(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=HZ;else throw $(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:GZ,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:UZ,normalizationCache:new Map};return r.tokenize=GZ.bind(r),r.normalizeToken=UZ,r}function qZ(e){return{sharedInternalDocumentStore:e,rules:new Map}}function JZ(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function YZ(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function XZ(e,t){return e.rules.delete(t)}function ZZ(e,t){return e.rules.get(t)}function QZ(e){return Array.from(e.rules.values())}function $Z(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function eQ(e,t){return e?t.conditions.every(t=>$Z(e,t)):!1}function tQ(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())eQ(t,r)&&n.push(r);return n}function nQ(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function rQ(e){return{rules:Array.from(e.rules.entries())}}function iQ(){return{create:qZ,addRule:JZ,updateRule:YZ,removeRule:XZ,getRule:ZZ,getAllRules:QZ,getMatchingRules:tQ,load:nQ,save:rQ}}function aQ(e){let t={formatElapsedTime:qY,getDocumentIndexId:JY,getDocumentProperties:PY,validateSchema:YY};for(let n of xX){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw $(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!bX.includes(t)&&!xX.includes(t))throw $(`UNSUPPORTED_COMPONENT`,t)}function oQ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw $(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=AY();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:KZ(o):KZ({language:n??`english`}),r.tokenizer&&n)throw $(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=rX();s||=oZ(),l||=DZ(),c||=_X(),u||=iQ(),aQ(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:sQ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of vX)g[e]=(g[e]??[]).concat(yX(g,e));let _=g.afterCreate;return _&&EX(_,g),g}function sQ(){return`{{VERSION}}`}function cQ(e){return e.documentsStore.count(e.data.docs)}function lQ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw $(`SCHEMA_VALIDATION_FAILURE`,a);return zY(e.beforeInsert)||zY(e.afterInsert)||zY(e.index.beforeInsert)||zY(e.index.insert)||zY(e.index.afterInsert)?fQ(e,t,n,r,i):pQ(e,t,n,r,i)}var uQ=new Set([`enum`,`enum[]`]),dQ=new Set([`string`,`number`]);async function fQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=oX(e.internalDocumentIDStore,s);if(r||await SX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mQ(n,r,e,t)}return await hQ(e,s,u,f,l,n,t,i),r||await SX(e.afterInsert,e,s,t),s}function pQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=oX(e.internalDocumentIDStore,s);if(r||SX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mQ(n,r,e,t)}return gQ(e,s,u,f,l,n,t,i),r||SX(e.afterInsert,e,s,t),s}function mQ(e,t,n,r){if(!(QY(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!($Y(t)&&Array.isArray(r))&&!(eX(t)&&Array.isArray(r))&&!(uQ.has(t)&&dQ.has(e))&&e!==t)throw $(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function hQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function gQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=oX(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function _Q(e,t,n,r,i,a){return zY(e.afterInsertMultiple)||zY(e.beforeInsertMultiple)||zY(e.index.beforeInsert)||zY(e.index.insert)||zY(e.index.afterInsert)?vQ(e,t,n,r,i,a):yQ(e,t,n,r,i,a)}async function vQ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await lQ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&GY(e)}}})(),i||await CX(e.afterInsertMultiple,e,t),o}function yQ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=lQ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&GY(e)}}}return l(),i||CX(e.afterInsertMultiple,e,t),o}function bQ(e,t){return e[1]-t[1]}function xQ(e,t){return t[1]-e[1]}function SQ(e=`desc`){return e.toLowerCase()===`asc`?bQ:xQ}function CQ(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?FY(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;wQ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=wQ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:TQ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=TQ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw $(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=SQ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function wQ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function TQ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var EQ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},DQ=[`string`,`number`,`boolean`];function OQ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw $(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!DQ.includes(a[t]))throw $(`INVALID_GROUP_BY_PROPERTY`,t,DQ.join(`, `),a[t])}let o=t.map(([t])=>sX(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=FY(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=kQ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=NY(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||EQ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function kQ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=kQ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];CY(n,t),i.push(n)}return i}function AQ(e,t,n,r){let i=tQ(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=oX(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function jQ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw $(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=cQ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},IQ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=NQ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${MQ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?uZ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function MQ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function NQ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function PQ(e,t,n){let r=kY();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=jQ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[oX(e.internalDocumentIDStore,t),n]);else d=d.sort(MY);d=AQ(e,e.data.pinning,d,t.term);let f;u||(f=c?JQ(e,d,s,o,c):YQ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||RY(p,i)),a&&(p.facets=CQ(e,d,t.facets)),t.groupBy&&(p.groups=OQ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(kY()-r),p}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var FQ={k:1.2,b:.75,d:.5};function IQ(e){let t=e??{};return t.k=t.k??FQ.k,t.b=t.b??FQ.b,t.d=t.d??FQ.d,t}function LQ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw $(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw $(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?$(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):$(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function RQ(e,t,n=`english`){let r=kY();function i(){let i=LQ(e,t,n).sort(MY);i=AQ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=CQ(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:sX(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=OQ(e,i,t.groupBy));let f=kY()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:OY(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function zQ(e,t,n){let r=HQ(jQ(e,t,n)),i=LQ(e,t,n),a=t.hybridWeights;return GQ(r,i,t.term??``,a)}function BQ(e,t,n){let r=kY();function i(){let i=zQ(e,t,n);i=AQ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=CQ(e,i,t.facets));let o;t.groupBy&&(o=OQ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=YQ(e,i,s,c).filter(Boolean),u=kY(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:OY(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||RY(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await TX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await wX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function VQ(e){return e[1]}function HQ(e){let t=Math.max.apply(Math,e.map(VQ));return e.map(([e,n])=>[e,n/t])}function UQ(e,t){return e/t}function WQ(e,t){return(n,r)=>n*e+r*t}function GQ(e,t,n,r){let i=Math.max.apply(Math,e.map(VQ)),a=Math.max.apply(Math,t.map(VQ)),{text:o,vector:s}=r&&r.text&&r.vector?r:KQ(n),c=new Map,l=e.length,u=WQ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(UQ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=UQ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function KQ(e){return{text:.5,vector:.5}}function qQ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return PQ(e,t,n);if(r===`vector`)return RQ(e,t);if(r===`hybrid`)return BQ(e,t);throw $(`INVALID_SEARCH_MODE`,r)}function JQ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=FY(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:sX(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function YQ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:sX(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}new Cy.default;var XQ=new Cy.default;XQ.Diff_Timeout=.25;var ZQ=A({path:k(Pa([E(),D()])),message:E(),issueCode:E()});Ia(`code`,[A({code:M(`SCHEMA_INVALID`),issues:k(ZQ)}),A({code:M(`WRITE_ERROR`),detail:E()})]);function QQ(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function $Q(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var e$=`frontmatter`,t$=[`text`,`number`,`boolean`,`date`,`list`,`object`];j(t$);var n$=Pa([E(),D(),O()]),r$=uo(()=>Pa([n$.transform(e=>String(e)),Ba(E(),i$),k(r$)])),i$=uo(()=>Pa([E(),D(),O(),k(r$),Ba(E(),i$)])),a$=/^\d{4}-\d{2}-\d{2}$/;function o$(e){return typeof e==`string`&&a$.test(e)}function s$(e){return Array.isArray(e)?`list`:typeof e==`object`&&e?`object`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:o$(e)?`date`:`text`}function c$(e){if(Array.isArray(e)){let t=[];for(let n of e)n!==null&&t.push(c$(n));return t}if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=r===null?``:c$(r);return t}return e}var l$=go(c$,Ba(E(),i$)),u$=Ba(E(),Pa([i$,Ta()]));function d$(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}function f$(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!f$(e[n],t[n]))return!1;return!0}if(e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&!Array.isArray(e)&&!Array.isArray(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.hasOwn(t,r)||!f$(e[r],t[r]))return!1;return!0}return!1}var p$=/^---[ \t]*\r?\n([\s\S]*?\r?\n)?---[ \t]*(\r?\n|$)/,m$=/^---[ \t]*$/;function h$(e){let t=e.match(p$);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}function g$(e){if(e===``)return``;let t=e.match(p$);return t?(t[1]??``).replace(/\r?\n$/,``):e}var _$={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function v$(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function y$(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=ko(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(v$(n)){let r=e.createNode(n),i=Eo(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function b$(e){return e===``?``:`---\n${e.endsWith(`
|
|
384
384
|
`)?e.slice(0,-1):e}\n---\n`}var x$=65536;function S$(e){let t=e.match(p$);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function C$(e){if(e.trim()===``)return{doc:new Bc({}),map:{}};let t;try{t=Xl(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Bc({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=l$.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function w$(e){return e===``?{doc:new Bc({}),map:{}}:C$(g$(e))}function T$(e){let{fenced:t}=S$(e),{map:n,parseError:r}=w$(t);return{map:n??{},parseError:r}}function E$(e){let{fenced:t}=S$(e);if(t===``)return[];let{doc:n,map:r}=w$(t);return r===null?[]:A$(n)}function D$(e){return typeof e==`object`&&!!e&&`key`in e}function O$(e){let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}function k$(e,t){let n=e.key;if(typeof n==`string`){e.key=t;return}if(n&&typeof n==`object`){n.value=t;return}e.key=t}function A$(e){let t=e.contents;if(!t||!(`items`in t)||!Array.isArray(t.items))return[];let n=[];for(let e of t.items){if(!D$(e))continue;let t=O$(e);t!==null&&n.push(t)}return n}function j$(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function M$(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:b$(e.toString(_$))}function N$(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:x$}:null}function P$(e){let t=M$(e),n=N$(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function F$(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:e$}};let{doc:n,map:r}=w$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{j$(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=i$.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,y$(n,n.get(e,!0),t.data))}return P$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function I$(e,t,n,r={}){if(t===`frontmatter`||n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:e$}};let{doc:i,map:a}=w$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(t===n)return{ok:!0,nextFenced:e};let o=i.contents;if(!o||!(`items`in o)||!Array.isArray(o.items))return{ok:!1,error:{kind:`unknown_key`,key:t}};let s=o.items.find(e=>D$(e)&&O$(e)===t);if(!s)return{ok:!1,error:{kind:`unknown_key`,key:t}};if(!r.allowDuplicate&&o.items.some(e=>D$(e)&&e!==s&&O$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return k$(s,n),P$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function L$(e,t){let{doc:n,map:r}=w$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let i=n.contents;if(!i||!(`items`in i)||!Array.isArray(i.items))return{ok:!0,nextFenced:e};let a=A$(n);if(a.length!==t.length||!R$(a,t))return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};try{let e=i.items.filter(D$),r=[];for(let n of t){let i=e.findIndex(e=>O$(e)===n);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};let[o]=e.splice(i,1);o&&r.push(o)}return i.items=r,P$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function R$(e,t){let n=new Map;for(let t of e)n.set(t,(n.get(t)??0)+1);for(let e of t){let t=(n.get(e)??0)-1;if(t<0)return!1;n.set(e,t)}for(let e of n.values())if(e!==0)return!1;return!0}function z$(e){if(e.length===0)return{kind:`invalid_path`,path:[...e],reason:`path must have at least one segment`};for(let t=0;t<e.length;t++){let n=e[t];if(typeof n!=`string`&&typeof n!=`number`)return{kind:`invalid_path`,path:[...e],reason:`path segment at index ${t} must be string or number`};if(typeof n==`number`&&(!Number.isInteger(n)||n<0))return{kind:`invalid_path`,path:[...e],reason:`numeric path segment at index ${t} must be a non-negative integer`}}return e[0]===`frontmatter`?{kind:`reserved_key`,key:e$}:null}function B$(e,t,n){let r=z$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=w$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i$.safeParse(n);if(!o.success)return{ok:!1,error:{kind:`invalid_value`,key:String(t[t.length-1]),reason:o.error.issues[0]?.message??`invalid value`}};try{return j$(i),i.setIn(t,y$(i,i.getIn(t,!0),o.data)),P$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function V$(e,t){let n=z$(t);if(n)return{ok:!1,error:n};let{doc:r,map:i}=w$(e);if(i===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{return r.getIn(t,!0)===void 0?{ok:!0,nextFenced:e}:(r.deleteIn(t),P$(r))}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function H$(e,t){if(t.length===0){let t=e.contents;return Eo(t)?t:null}let n=e.getIn(t,!0);return Eo(n)?n:null}function U$(e,t,n,r={}){let i=z$(t);if(i)return{ok:!1,error:i};let a=t[t.length-1];if(typeof a!=`string`)return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot rename: last path segment must be a string (map key)`}};if(t.length===1&&n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:e$}};let{doc:o,map:s}=w$(e);if(s===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(a===n)return{ok:!0,nextFenced:e};let c=H$(o,t.slice(0,-1));if(!c)return{ok:!1,error:{kind:`unknown_key`,key:a}};let l=c.items.find(e=>D$(e)&&O$(e)===a);if(!l)return{ok:!1,error:{kind:`unknown_key`,key:a}};if(!r.allowDuplicate&&c.items.some(e=>D$(e)&&e!==l&&O$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return k$(l,n),P$(o)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function W$(e,t,n){if(t.length===0)return L$(e,n);let r=z$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=w$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!Eo(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a map`}};let s=[];for(let e of o.items){if(!D$(e))continue;let t=O$(e);t!==null&&s.push(t)}if(s.length!==n.length||!R$(s,n))return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};try{let e=o.items.filter(D$),t=[];for(let r of n){let i=e.findIndex(e=>O$(e)===r);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};let[a]=e.splice(i,1);a&&t.push(a)}return o.items=t,P$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function G$(e,t,n){let r=z$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=w$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!ko(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a sequence`}};let s=o,c=s.items.length,l=Array.from({length:c},(e,t)=>t),u=[...n];if(!K$(u,c))return{ok:!1,error:{kind:`reorder_mismatch`,expected:l.map(String),got:u.map(String)}};try{let e=s.items.slice();return s.items=u.map(t=>e[t]),P$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function K$(e,t){if(e.length!==t)return!1;let n=Array(t).fill(!1);for(let r of e){if(!Number.isInteger(r)||r<0||r>=t||n[r])return!1;n[r]=!0}return!0}var q$=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function J$(e){return{ok:!1,error:e}}function Y$(e){return{ok:!0,...e}}function X$(e){return{ok:!0,...e}}function Z$(e){return{ok:!0,...e}}function Q$(e){return{ok:!0,...e}}function $$(e){switch(e.kind){case`unknown_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`unknown key '${e.key}'`,issueCode:`unknown_key`}]};case`duplicate_target`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`key '${e.key}' already exists`,issueCode:`duplicate_target`}]};case`invalid_value`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:e.reason,issueCode:`invalid_value`}]};case`reserved_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`'${e.key}' is a reserved frontmatter key`,issueCode:`reserved_key`}]};case`reorder_mismatch`:return{code:`WRITE_ERROR`,detail:`reorder list does not match current keys (state changed mid-drag)`};case`region_too_large`:return{code:`SCHEMA_INVALID`,issues:[{path:[],message:`Frontmatter region exceeds ${x$}-byte limit (would be ${e.bytes})`,issueCode:`region_too_large`}]};case`parse_failed`:return{code:`WRITE_ERROR`,detail:`Frontmatter YAML is malformed; fix in source mode to commit (${e.reason})`};case`invalid_path`:return{code:`SCHEMA_INVALID`,issues:[{path:[...e.path],message:e.reason,issueCode:`invalid_path`}]}}}function e1(e,t){if(e.parseError!==t.parseError||e.keys.length!==t.keys.length)return!1;for(let n=0;n<e.keys.length;n++)if(e.keys[n]!==t.keys[n])return!1;for(let n of e.keys)if(!f$(e.map[n],t.map[n]))return!1;return!0}var t1=5;function n1(e){let t=e.toString();return{snapshot:r1(t),raw:t}}function r1(e){let{map:t,parseError:n}=T$(e);return{map:t,keys:E$(e),parseError:n}}function i1(e){return e.startsWith(`---`)}function a1(e){let t=e.document,n=t.getText(`source`),r=new Set,i=n1(n),a=i.snapshot,o=S$(i.raw).fenced,s=i1(i.raw),c=!1;function l(e=!1){if(c)return;let t,i;try{let e=n1(n);t=e.snapshot,i=e.raw}catch(e){console.warn(`[bindFrontmatterDoc] readSnapshotFromYText threw:`,e);return}if(!e&&e1(a,t)){s=i1(i);return}a=t,o=S$(i).fenced,s=i1(i);for(let e of r)try{e(t)}catch(e){console.warn(`[bindFrontmatterDoc] listener threw:`,e)}}let u=e=>{c||o1(e,o.length,s)&&l()};n.observe(u),e.on(`synced`,d);function d(){l(!0)}function f(e){let r;return t.transact(()=>{let{fenced:t}=S$(n.toString());r=e(t),r.ok&&r.nextFenced!==t&&(n.delete(0,t.length),r.nextFenced!==``&&n.insert(0,r.nextFenced))},q$),r??{ok:!1,error:{kind:`parse_failed`,reason:`commit transact produced no result`}}}function p(e){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});if(Object.hasOwn(e,`frontmatter`))return J$({code:`SCHEMA_INVALID`,issues:[{path:[e$],message:`'${e$}' is a reserved frontmatter key`,issueCode:`reserved_key`}]});let t=u$.safeParse(e);if(!t.success)return J$({code:`SCHEMA_INVALID`,issues:t.error.issues.map(QQ)});let n=t.data,r=Object.keys(n),i=f(e=>F$(e,n));return i.ok?Y$({appliedKeys:r}):J$($$(i.error))}function m(e,t,n={}){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>I$(r,e,t,n));return r.ok?X$({oldKey:e,newKey:t}):J$($$(r.error))}function h(e){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>L$(t,e));return t.ok?Z$({orderedKeys:[...e]}):J$($$(t.error))}function g(e,t){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>B$(n,e,t));return n.ok?Q$({path:[...e]}):J$($$(n.error))}function _(e){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>V$(t,e));return t.ok?Q$({path:[...e]}):J$($$(t.error))}function v(e,t,n={}){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>U$(r,e,t,n));return r.ok?Q$({path:[...e]}):J$($$(r.error))}function y(e,t){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>W$(n,e,t));return n.ok?Q$({path:[...e]}):J$($$(n.error))}function b(e,t){if(c)return J$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>G$(n,e,t));return n.ok?Q$({path:[...e]}):J$($$(n.error))}return{current(){return n1(n).snapshot},patch(e){return p(e)},rename(e,t,n){return m(e,t,n)},reorder(e){return h(e)},patchPath(e,t){return g(e,t)},deletePath(e){return _(e)},renamePath(e,t,n){return v(e,t,n)},reorderPath(e,t){return y(e,t)},reorderSeqPath(e,t){return b(e,t)},subscribe(e){return r.add(e),()=>{r.delete(e)}},dispose(){c||(c=!0,n.unobserve(u),e.off(`synced`,d),r.clear())}}}function o1(e,t,n){if(t===0&&n)return!0;let r=t>0?t:t1,i=0;for(let t of e.delta){if(typeof t.retain==`number`){i+=t.retain;continue}if(typeof t.insert==`string`){if(i<r)return!0;i+=t.insert.length;continue}if(t.insert!==void 0){if(i<r)return!0;i+=1;continue}if(typeof t.delete==`number`&&i<r)return!0}return!1}var s1=new Cy.default;s1.Match_Threshold=.5;var c1=`0.0.0-unknown`,l1={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function u1({kind:e,runtimeVersion:t}){return{[l1.protocol]:`1`,[l1.runtime]:t,[l1.kind]:e}}function d1({kind:e,runtimeVersion:t}){return{clientProtocolVersion:1,clientRuntimeVersion:t,clientKind:e}}var f1=`source`;function p1(e){return{ok:!1,error:e}}function m1(e){return{ok:!0,...e}}function h1(){return zu.parse({})}function g1(e,t){let n=e.toString();if(n.length===0)return h1();let r=Xl(n);if(r.errors.length>0)return console.warn(`[bindConfigDoc:${t}] Y.Text contains invalid YAML; returning schema defaults. Errors: ${r.errors.map(e=>e.message).join(`; `)}`),h1();let i=r.toJSON()??{},a=zu.safeParse(i);return a.success?a.data:(console.warn(`[bindConfigDoc:${t}] Y.Text content fails schema validation; returning schema defaults. First issue: ${a.error.issues[0]?.message??`(unknown)`}`),h1())}function _1(e,t,n={}){return Vu(`config.bind`,{"config.scope":t,"config.transport":`ytext`},()=>v1(e,t,n))}function v1(e,t,n){let{ytextKey:r=f1}=n,i=e.document,a=i.getText(r),o=new Set,s=new Set,c=!1,l=!1;function u(){if(c)return;let e=g1(a,t);for(let n of o)try{n(e)}catch(e){console.warn(`[bindConfigDoc:${t}] listener threw:`,e)}}function d(){if(c||(u(),l))return;l=!0;let e=[...s];s.clear();for(let n of e)try{n()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}a.observe(u),e.on(`synced`,d);function f(e){if(c)return p1({code:`WRITE_ERROR`,detail:`ConfigBinding (${t}) has been disposed`});let n=qu(e,t);if(n!==null)return p1(n);let r=Xl(a.toString()),o=r.contents!==null&&!Eo(r.contents);if(r.errors.length>0||o){Hu(`config.corrupt-ytext-reset`,{"config.scope":t,"config.parse.errorCount":r.errors.length,"config.parse.topLevelNonMap":o});let e=r.errors.length>0?r.errors.map(e=>e.message).join(`; `):`top-level YAML is not a mapping`;console.warn(`[bindConfigDoc:${t}] dropping corrupt Y.Text and re-applying patch onto empty doc. Reason: ${e}`),r=Xl(``)}r.contents===null&&(r.contents=r.createNode({}));let s=Yu(r,e),l=r.toJSON()??{},u=Vu(`config.validate`,{"config.scope":t,"config.validation.layer":`L1`},e=>{let t=zu.safeParse(l);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)Hu(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!u.success)return p1({code:`SCHEMA_INVALID`,issues:u.error.issues.map(Xu)});let d=r.toString();return i.transact(()=>{a.length>0&&a.delete(0,a.length),a.insert(0,d)}),m1({effective:u.data,appliedPaths:s})}return{current(){return g1(a,t)},patch(e){return Vu(`config.patch`,{"config.scope":t,"config.transport":`ytext`},t=>{let n=f(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})},subscribe(e){return o.add(e),()=>{o.delete(e)}},hasSynced(){return l},subscribeSynced(e){if(c)return()=>{};if(l){let n=!1;return queueMicrotask(()=>{if(!(n||c))try{e()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}),()=>{n=!0}}return s.add(e),()=>{s.delete(e)}},dispose(){c||(c=!0,a.unobserve(u),e.off(`synced`,d),o.clear(),s.clear())}}}var y1=`source`,b1=800;function x1(e){return{ok:!1,error:e}}function S1(e){return{ok:!0,...e}}function C1(e,t={}){let{ytextKey:n=y1,acceptanceDelayMs:r=b1}=t,i=e.document,a=i.getText(n),o=new Set,s=new Set,c=new Set,l=!1,u=`idle`,d=null;function f(){d!==null&&(clearTimeout(d),d=null)}function p(e){if(!l&&u!==e){u=e;for(let t of c)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] status listener threw:`,e)}}}function m(){if(l)return;let e=a.toString();for(let t of o)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] text listener threw:`,e)}}function h(e){if(!l)for(let t of s)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] rejection listener threw:`,e)}}return a.observe(m),e.on(`synced`,m),{current(){return a.toString()},patch(e){return l?x1({code:`WRITE_ERROR`,detail:`OkignoreBinding has been disposed`}):(i.transact(()=>{a.length>0&&a.delete(0,a.length),e.length>0&&a.insert(0,e)}),f(),p(`pending`),d=setTimeout(()=>{d=null,!l&&u===`pending`&&p(`accepted`)},r),S1({text:e}))},subscribe(e){return o.add(e),()=>{o.delete(e)}},subscribeRejection(e){return s.add(e),()=>{s.delete(e)}},subscribeStatus(e){return c.add(e),()=>{c.delete(e)}},status(){return u},notifyRejection(e){l||(f(),p(`rejected`),h({error:e,text:a.toString()}))},dispose(){l||(l=!0,f(),a.unobserve(m),e.off(`synced`,m),o.clear(),s.clear(),c.clear())}}}function w1(e,t,n){return T1([e,t,n],[])}function T1(e,t){if(t.length>0){let n=Gu(zu,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[1]??e[0]}let n=E1(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>D1(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=T1(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function E1(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function D1(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var O1=2e3;function k1(e){let t=Date.now();for(let[n,r]of e.entries()){let i=r;i.timestamp&&t-i.timestamp>3e4&&e.delete(n)}}function A1(e,t){for(let[,n]of e.entries()){let e=n;if(e.timestamp&&e.timestamp>t)return!0}return!1}var j1=`__system__`,M1=`__config__/project`,N1=`__user__/config.yml`,P1=`__local__/project`,F1=`__config__/okignore`;Object.freeze([M1,P1,N1,F1]);var I1=`__skill__/`,L1=`__template__/`,R1=[`project`,`global`];function z1(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)}var B1=`.ok/skills`;function V1(e){return`${B1}/${e}/SKILL`}var H1=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function U1(e){let t=H1.exec(e);if(!t)return null;let n=t[1],r=t[2];return r===void 0?{name:n,kind:`skill`,rel:null}:{name:n,kind:`reference`,rel:r.slice(11)}}function W1(e,t){return e===`project`?V1(t):`${I1}${e}/${t}`}function G1(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function K1(e){if(e.startsWith(`__skill__/`)){let t=e.slice(10),n=t.indexOf(`/`);if(n<0)return null;let r=t.slice(0,n);if(r!==`global`&&r!==`project`)return null;let i=t.slice(n+1);return i?{kind:`skill`,scope:r,name:G1(i)}:null}if(e.startsWith(`__template__/`)){let t=e.slice(13);if(!t)return null;let n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return r?{kind:`template`,folder:G1(n<0?``:t.slice(0,n)),name:G1(r)}:null}return null}var q1=/^(?:(.+)\/)?\.ok\/templates\/([^/]+?)(?:\.mdx?)?$/;function J1(e){let t=q1.exec(e);if(t){let e=(t[1]??``).replace(/^\/+|\/+$/g,``);return`${L1}${e?`${e}/`:``}${t[2]}`}return null}var Y1=[`invalid-args`,`nested-project`,`target-not-empty`,`mkdir-failed`,`git-init-failed`,`init-failed`,`discovery-failed`],X1=[`.mdx`,`.md`],Z1=`epoch`,Q1=512*1024;function $1(e,t=Q1){return typeof e==`number`&&Number.isFinite(e)&&e>t}var e0=[`claude`,`claude-desktop`,`cursor`,`codex`,`opencode`],t0={claude:`Claude`,"claude-desktop":`Claude Desktop`,cursor:`Cursor`,codex:`Codex`,opencode:`OpenCode`},n0={claude:`.claude/skills`,"claude-desktop":null,cursor:`.cursor/skills`,codex:`.codex/skills`,opencode:`.opencode/skills`},r0=e0.filter(e=>n0[e]!==null);r0.map(e=>({hostDir:(n0[e]??``).split(`/`)[0],editorId:e}));var i0={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function a0(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(i0))if(n.test(e))return t;return null}var o0=[`incoming`,`outgoing`,`both`];function s0(e){return o0.includes(e)}var c0=`open-knowledge`,l0=[{id:`chart`,title:`Chart`,description:`A bar chart whose series colors track the OK chart palette.`,html:`<div style="font-family:system-ui,sans-serif;padding:20px;color:var(--foreground)">
|
|
385
385
|
<h3 style="margin:0 0 14px;font-size:15px;font-weight:600">Revenue by region</h3>
|
|
386
386
|
<div id="bars" style="display:flex;align-items:flex-end;gap:14px;height:170px"></div>
|
|
@@ -465,27 +465,27 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
465
465
|
`)}function g4(e,t,n){return`The selected passage is ${e===t?`line ${e}`:`lines ${e}-${t}`} of @${n}. Read it from @${n} via the OpenKnowledge MCP server before editing.`}function _4(e){let t=e.map(e=>F2(e)).filter(e=>e!==``);return t.length===0?``:[`Also reference:`,``,...t.map(e=>`@${e}`)].join(`
|
|
466
466
|
`)}function v4(e){return e.scope===`doc`?`Let's work on @${F2(e.docRelativePath)} using OpenKnowledge.`:e.scope===`folder`?`Let's work on the @${F2(e.folderRelativePath)} folder using OpenKnowledge.`:`Let's work on this project using OpenKnowledge.`}function y4(e,t,n,r,i){let a=t.trim();if(!(a!==``||n!==``||r!==``))return i===``?e:`${e} ${i}`;let o=[e];return a!==``&&o.push(p4(a)),n!==``&&o.push(n),r!==``&&o.push(r),i!==``&&o.push(i),o.join(`
|
|
467
467
|
|
|
468
|
-
`)}function b4(e,t,n,r,i,a){if(e.kind===`lines`)return g4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return h4(e.markdown,n);let o=m4(e.markdown);return $2(y4(t,``,o,r,i),a)<=G2?o:h4(e.markdown,n)}function x4(e,t,n,r){let{target:i}=e,a=F2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=b4(t,o,a,n,r,i);return y4(o,c4(e.instruction,i,e=>y4(o,e,s,n,r)),s,n,r)}function S4(e){let{target:t}=e,n=e.autoOpen?f4:``,r=_4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return x4(e,e.selection,r,n);let i=v4(e);return y4(i,c4(e.instruction,t,e=>y4(i,e,``,r,n)),``,r,n)}function C4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var w4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${C4(JSON.stringify({enabledMcpjsonServers:[c0]}))}`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`},cursor:{bin:`cursor-agent`,displayName:`Cursor`,docsUrl:`https://cursor.com/docs/cli/overview`,handoffTarget:`cursor`},opencode:{bin:`opencode`,displayName:`OpenCode`,docsUrl:`https://opencode.ai/docs`,handoffTarget:`opencode`,promptFlag:`--prompt`}},T4=[`claude`,`codex`,`opencode`,`cursor`];function E4(e,t,n={}){let r=w4[e],i=n.mcpPreApprove===!0&&r.mcpPreApproveArg?`${r.mcpPreApproveArg} `:``;if(t==null||t.length===0)return`${r.bin} ${i}`.trimEnd();let a=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${i}${a}${C4(t)}`}function D4(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var O4=new Set([`opencode.json`]);function k4(e){return e.split(`/`).some(e=>e.startsWith(`.`))?!0:O4.has(e.slice(e.lastIndexOf(`/`)+1))}function A4(e,t){let n=D4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var j4=E().superRefine(A4).optional(),M4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},N4=E().optional(),P4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ia(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var F4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),I4=Ia(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:F4,branch:E().min(1).optional()}).loose()]),L4=j([`user`,`org`]),R4=A({login:E().min(1),kind:L4,avatarUrl:E().optional()}).loose(),z4=j([`auth-required`,`network`]),B4=Ia(`ok`,[A({ok:M(!0),owners:k(R4)}).loose(),A({ok:M(!1),error:z4}).loose()]),V4=Ia(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:z4}).loose()]),H4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:H4,description:E().optional()}).loose();var U4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),W4=Ia(`ok`,[A({ok:M(!0),ownerLogin:E().min(1),repoName:E().min(1),cloneUrl:E().min(1),defaultBranch:E().min(1)}).loose(),A({ok:M(!1),error:U4}).loose()]);function G4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var K4=e=>e.refine(G4,`invalid branch name`),q4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ia(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Ta(),...q4}).loose(),A({detached:M(!0),currentBranch:Ta(),currentHeadSha:E().min(1),...q4}).loose()]),A({branch:K4(E().min(1)),principalId:E().optional()}).loose();var J4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ia(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:J4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var Y4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Ba(E().min(1),E().min(1)).optional()}).loose(),
|
|
468
|
+
`)}function b4(e,t,n,r,i,a){if(e.kind===`lines`)return g4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return h4(e.markdown,n);let o=m4(e.markdown);return $2(y4(t,``,o,r,i),a)<=G2?o:h4(e.markdown,n)}function x4(e,t,n,r){let{target:i}=e,a=F2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=b4(t,o,a,n,r,i);return y4(o,c4(e.instruction,i,e=>y4(o,e,s,n,r)),s,n,r)}function S4(e){let{target:t}=e,n=e.autoOpen?f4:``,r=_4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return x4(e,e.selection,r,n);let i=v4(e);return y4(i,c4(e.instruction,t,e=>y4(i,e,``,r,n)),``,r,n)}function C4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var w4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${C4(JSON.stringify({enabledMcpjsonServers:[c0]}))}`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`},cursor:{bin:`cursor-agent`,displayName:`Cursor`,docsUrl:`https://cursor.com/docs/cli/overview`,handoffTarget:`cursor`},opencode:{bin:`opencode`,displayName:`OpenCode`,docsUrl:`https://opencode.ai/docs`,handoffTarget:`opencode`,promptFlag:`--prompt`}},T4=[`claude`,`codex`,`opencode`,`cursor`];function E4(e,t,n={}){let r=w4[e],i=n.mcpPreApprove===!0&&r.mcpPreApproveArg?`${r.mcpPreApproveArg} `:``;if(t==null||t.length===0)return`${r.bin} ${i}`.trimEnd();let a=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${i}${a}${C4(t)}`}function D4(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var O4=new Set([`opencode.json`]);function k4(e){return e.split(`/`).some(e=>e.startsWith(`.`))?!0:O4.has(e.slice(e.lastIndexOf(`/`)+1))}function A4(e,t){let n=D4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var j4=E().superRefine(A4).optional(),M4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},N4=E().optional(),P4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ia(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var F4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),I4=Ia(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:F4,branch:E().min(1).optional()}).loose()]),L4=j([`user`,`org`]),R4=A({login:E().min(1),kind:L4,avatarUrl:E().optional()}).loose(),z4=j([`auth-required`,`network`]),B4=Ia(`ok`,[A({ok:M(!0),owners:k(R4)}).loose(),A({ok:M(!1),error:z4}).loose()]),V4=Ia(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:z4}).loose()]),H4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:H4,description:E().optional()}).loose();var U4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),W4=Ia(`ok`,[A({ok:M(!0),ownerLogin:E().min(1),repoName:E().min(1),cloneUrl:E().min(1),defaultBranch:E().min(1)}).loose(),A({ok:M(!1),error:U4}).loose()]);function G4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var K4=e=>e.refine(G4,`invalid branch name`),q4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ia(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Ta(),...q4}).loose(),A({detached:M(!0),currentBranch:Ta(),currentHeadSha:E().min(1),...q4}).loose()]),A({branch:K4(E().min(1)),principalId:E().optional()}).loose();var J4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ia(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:J4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var Y4=A({startedAt:E().min(1),httpListenMs:D().nonnegative().optional(),seedWalkMs:D().nonnegative().optional(),indexesMs:D().nonnegative().optional(),readyMs:D().nonnegative().optional(),fileCount:D().nonnegative().optional()}),X4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Ba(E().min(1),E().min(1)).optional(),boot:Y4.optional()}).loose(),Z4=A({id:E().min(1),display_name:E().min(1),display_email:E(),source:j([`git-config`,`synthesized`]),created_at:E().min(1)}).loose();A({collabUrl:E().nullable(),previewUrl:E().nullable(),port:D(),paneTarget:E().nullable(),singleFile:O().default(!1)}).loose();var Q4=A({type:j(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed`.split(`.`)),title:E().min(1),status:D().int().min(400).max(599),instance:E().regex(P4,`instance must be urn:uuid:<uuid>`).optional(),detail:E().optional()}).loose();A({parentDocName:E().min(1),placement:j([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:E().min(1).optional(),agentName:E().min(1).optional()}).loose();var $4=A({src:E().min(1),path:E().min(1).optional(),deduped:O().optional()}).loose();A({url:E().min(1),dir:E().min(1),branch:E().min(1).refine(G4,`invalid branch name`).optional()}).loose(),A({type:M(`error`),problem:Q4}).loose();var e3=j(R1),t3=Ma({hosts:k(E()),scope:e3,scripts:O(),installedAt:Oi()});Ma({schema:M(1),skills:Ba(E(),t3).default({})});var n3=8192,r3=32768,i3=`…[truncated]`;function a3(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function o3(e){return e.length<=8192?e:`${e.slice(0,n3-12)}${i3}`}var s3=/notionvc:/i,c3=()=>e=>{l3(e)&&(u3(e),d3(e))};function l3(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(s3.test(e))return!0}if(t.type===`element`&&l3(t))return!0}return!1}function u3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&u3(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
469
469
|
`)){t.push(n);continue}let r=e.split(`
|
|
470
|
-
`);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function
|
|
471
|
-
`)}]}]}}function Q3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=Q3(n));return t}var $3=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},e6=[v3,R3,f3,D3,s3,q3,M3,U3,C3];function t6(e){ZF(e,e=>{e.type===`strong`?(e.data??={},e.data.sourceDelimiter=`**`):e.type===`emphasis`?(e.data??={},e.data.sourceDelimiter=`*`):e.type===`inlineCode`?(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=1):e.type===`code`&&(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=3)})}function n6(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new $3(e.length,n);let r=HU().use(YP,{fragment:!0});for(let e of e6)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(XL);let i=r.parse(e),a=r.runSync(i);return t6(a),a}function r6(e){return String(HU().use(NU).use(PU).stringify(e))}function i6(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&a6(e.value.value,t))continue}let o=o6(e,t);r>=0?n[r]=o:n.push(o)}return n}function a6(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function o6(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function s6(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:i6(t,r),children:n.all(t),data:{}}}var c6=/^[A-Za-z0-9]{20,}$/,l6=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function u6(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function d6(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return c6.test(n)?n:null}function f6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!u6(t.hostname))return null;let n=d6(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&l6.test(r)?r:null}}function p6(e){return f6(e)!==null}function m6(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function h6(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:m6(t.hostname)}var g6=/^[A-Za-z0-9_-]{11}$/;function _6(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function v6(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function y6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return g6.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return g6.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function b6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!_6(t.hostname))return null;let n=y6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?v6(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var x6=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],S6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:eu,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],C6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],w6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:tu,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(h6(e.src)||p6(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:eu,hideWhen:e=>typeof e.src==`string`&&(h6(e.src)||p6(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&p6(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(h6(e.src)||p6(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(b6(e.src)!==null||h6(e.src)||p6(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],T6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:nu,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],E6=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],D6=[x6[0],x6[1],x6[4],x6[5],x6[6]],O6=[S6[0],S6[1],S6[7]],k6=[E6[0],E6[1],E6[4],E6[5]],A6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],j6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],M6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],N6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],P6=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],F6=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],I6=[F6[0]],L6=[F6[0]],R6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],z6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],B6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],V6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:ru,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],H6=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],U6=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function W6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function G6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function K6(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}var q6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:x6,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>s6(`Callout`,e,t,x6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:S6,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>s6(`img`,e,t,S6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:w6,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>s6(`video`,e,t,w6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:T6,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>s6(`audio`,e,t,T6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:V6,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>s6(`Pdf`,e,t,V6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:B6,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>s6(`File`,e,t,B6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:C6,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>s6(`Embed`,e,t,C6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:E6,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>s6(`Accordion`,e,t,E6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:N6,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
472
|
-
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>
|
|
473
|
-
`)}\n\n`:``}var
|
|
470
|
+
`);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function d3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!s3.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&d3(t)}}var f3=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),p3=()=>e=>{m3(e)};function m3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&m3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return h3(t)?[]:g3(t)?t.children:[t]})}}function h3(e){if(e.tagName!==`meta`)return!1;let t=e.properties?.name,n=e.properties?.content;return t===`Generator`&&typeof n==`string`&&/Cocoa/i.test(n)}function g3(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>f3.has(String(e))):!1}var _3=`docs-internal-guid-`;function v3(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var y3=()=>e=>{b3(e)};function b3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&b3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(!n||n.type!==`element`){t++;continue}let r=n;if(x3(r)||S3(r)){v3(e,t);continue}t++}}function x3(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(_3)}function S3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.children.filter(e=>e.type===`element`);return t.length===1?t[0]?.tagName===`table`:!1}var C3=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),w3=()=>e=>{T3(e)};function T3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&T3(t);for(let t of e.children)t.type===`element`&&E3(t)}}function E3(e){if(!e.properties)return;for(let t of Object.keys(e.properties))t.startsWith(`dataHovercard`)&&delete e.properties[t];let t=e.properties.className;if(Array.isArray(t)){let n=t.filter(e=>!C3.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var D3=/^gmail_/,O3=()=>e=>{k3(e)};function k3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&k3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(n.type!==`element`){t++;continue}let r=n;if(r.tagName===`div`&&A3(r,`gmail_quote`)&&(r.tagName=`blockquote`),j3(r),M3(r)){e.children.splice(t,1,...r.children);continue}t++}}function A3(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function j3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!D3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function M3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.properties?.className;return t!=null&&!(Array.isArray(t)&&t.length===0)?!1:e.children.filter(e=>e.type===`element`).length<=1}var N3=()=>e=>{P3(e)};function P3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&P3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return t.tagName===`google-sheets-html-origin`?t.children:t.tagName===`style`?[]:(F3(t),[t])})}}function F3(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var I3=[`o:`,`w:`,`m:`,`v:`,`u1:`],L3=/^Mso[A-Z]/,R3=/^\s*\[if\s+[^\]]*\]/,z3=()=>e=>{B3(e)};function B3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&B3(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return R3.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return V3(t)?[]:(H3(t),[t])})}}function V3(e){return I3.some(t=>e.tagName.startsWith(t))}function H3(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!L3.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&L3.test(n)&&delete t.className;let r=t.style;typeof r==`string`&&/mso-/i.test(r)&&delete t.style;for(let e of Object.keys(t))if(e.startsWith(`xmlns:`)){let n=e.slice(6);I3.some(e=>e===`${n}:`)&&delete t[e]}}var U3=/^c-(message_kit__|message__|compose|timestamp)/,W3=()=>e=>{G3(e)};function G3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&G3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return K3(t)?[]:(q3(t),[t])})}}function K3(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function q3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!U3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var J3=()=>e=>{Y3(e)};function Y3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&Y3(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;X3(r)&&(e.children[t]=Q3(r))}}}function X3(e){if(e.tagName!==`div`)return!1;let t=e.children.filter(e=>e.type===`element`&&e.tagName===`div`);return t.length<2?!1:t.some(e=>Z3(e))}function Z3(e){for(let t of e.children){if(t.type!==`element`)continue;let e=t,n=e.properties?.style;if(typeof n==`string`&&/color\s*:/i.test(n)||Z3(e))return!0}return!1}function Q3(e){return{type:`element`,tagName:`pre`,properties:{},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:e.children.filter(e=>e.type===`element`&&e.tagName===`div`).map(e=>$3(e)).join(`
|
|
471
|
+
`)}]}]}}function $3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=$3(n));return t}var e6=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},t6=[y3,z3,p3,O3,c3,J3,N3,W3,w3];function n6(e){QF(e,e=>{e.type===`strong`?(e.data??={},e.data.sourceDelimiter=`**`):e.type===`emphasis`?(e.data??={},e.data.sourceDelimiter=`*`):e.type===`inlineCode`?(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=1):e.type===`code`&&(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=3)})}function r6(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new e6(e.length,n);let r=HU().use(XP,{fragment:!0});for(let e of t6)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(ZL);let i=r.parse(e),a=r.runSync(i);return n6(a),a}function i6(e){return String(HU().use(NU).use(PU).stringify(e))}function a6(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&o6(e.value.value,t))continue}let o=s6(e,t);r>=0?n[r]=o:n.push(o)}return n}function o6(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function s6(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function c6(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:a6(t,r),children:n.all(t),data:{}}}var l6=/^[A-Za-z0-9]{20,}$/,u6=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function d6(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function f6(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return l6.test(n)?n:null}function p6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!d6(t.hostname))return null;let n=f6(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&u6.test(r)?r:null}}function m6(e){return p6(e)!==null}function h6(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function g6(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:h6(t.hostname)}var _6=/^[A-Za-z0-9_-]{11}$/;function v6(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function y6(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function b6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return _6.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return _6.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function x6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!v6(t.hostname))return null;let n=b6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?y6(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var S6=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],C6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:eu,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],w6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],T6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:tu,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(g6(e.src)||m6(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:eu,hideWhen:e=>typeof e.src==`string`&&(g6(e.src)||m6(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&m6(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(g6(e.src)||m6(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(x6(e.src)!==null||g6(e.src)||m6(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],E6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:nu,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],D6=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],O6=[S6[0],S6[1],S6[4],S6[5],S6[6]],k6=[C6[0],C6[1],C6[7]],A6=[D6[0],D6[1],D6[4],D6[5]],j6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],M6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],N6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],P6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],F6=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],I6=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],L6=[I6[0]],R6=[I6[0]],z6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],B6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],V6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],H6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:ru,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],U6=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],W6=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function G6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function K6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function q6(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}var J6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:S6,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>c6(`Callout`,e,t,S6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:C6,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>c6(`img`,e,t,C6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:T6,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>c6(`video`,e,t,T6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:E6,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>c6(`audio`,e,t,E6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:H6,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>c6(`Pdf`,e,t,H6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:V6,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>c6(`File`,e,t,V6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:w6,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>c6(`Embed`,e,t,w6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:D6,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>c6(`Accordion`,e,t,D6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:P6,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
472
|
+
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>c6(`Tabs`,e,t,P6)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:F6,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>c6(`Tab`,e,t,F6)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:I6,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>c6(`Math`,e,t,I6)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:z6,icon:`Workflow`,category:`content`,displayName:`Mermaid`,description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:U6,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>c6(`Mirror`,e,t,U6)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:W6,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>c6(`MirrorSource`,e,t,W6)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:O6,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:k6,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:j6,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:q6},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:M6,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:q6},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:N6,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:q6},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:B6,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:q6},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:A6,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${G6(n.name)}"`:``,a=n?.id?` id="${G6(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${K6(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:L6,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:R6,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],Y6={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>c6(e.attrs.componentName||`*`,e,t)};function X6(){let e=new Map;e.set(`*`,Y6);for(let t of J6)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}var Z6={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function Q6(){Z6.parseFallback.blockLevel++}function $6(){Z6.parseFallback.wholeDoc++}function e8(){Z6.parseFallback.wholeDocBudget++}function t8(e){Z6.jsxRenderFailure[e]=(Z6.jsxRenderFailure[e]??0)+1}function n8(e){Z6.jsxAutoConvertFailed[e]=(Z6.jsxAutoConvertFailed[e]??0)+1}function r8(e){Z6.jsxAutoConvertSucceeded[e]=(Z6.jsxAutoConvertSucceeded[e]??0)+1}function i8(e){Z6.jsxPropDropped[e]=(Z6.jsxPropDropped[e]??0)+1}function a8(e){Z6.jsxMoveFailed[e]=(Z6.jsxMoveFailed[e]??0)+1}function o8(e){Z6.jsxStuckCopyFailed[e]=(Z6.jsxStuckCopyFailed[e]??0)+1}function s8(e){Z6.jsxStuckDeleteFailed[e]=(Z6.jsxStuckDeleteFailed[e]??0)+1}function c8(e){Z6.jsxPopoverCloseRestoreFailed[e]=(Z6.jsxPopoverCloseRestoreFailed[e]??0)+1}function l8(e){Z6.jsxKeyboardDeleteFailed[e]=(Z6.jsxKeyboardDeleteFailed[e]??0)+1}function u8(e){Z6.blockGripClickSelectFailed[e]=(Z6.blockGripClickSelectFailed[e]??0)+1}function d8(e){Z6.jsxArrowNodeSelectFailed[e]=(Z6.jsxArrowNodeSelectFailed[e]??0)+1}var f8=/^(`{3,}|~{3,})/gm;function p8(e){let t=[],n=null;for(let r of e.matchAll(f8)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function m8(e,t){return t.some(([t,n])=>e>=t&&e<n)}var h8=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function g8(e){let t=p8(e),n=[];for(let r of e.matchAll(h8))m8(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
473
|
+
`)}\n\n`:``}var _8=500,v8=1e3;function y8(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return C8(e,t.parse,0,n)}function b8(e){return e.calls>=v8?!0:(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=_8}var x8=500;function S8(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,x8),stack:e.stack?.split(`
|
|
474
474
|
`).slice(0,4).join(`
|
|
475
|
-
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,
|
|
476
|
-
`||n===`\r`||n==="`")return!1;if(n!==`[`&&n!==`]`)continue;let r=0;for(let n=e-1;n>=0&&t[n]===`\\`;n--)r++;if(r%2!=1){if(n===`]`||t[e+1]===`^`||t[e-1]===`]`)return!1;i=!0;break}}if(!i)return!1;let o=!1,s=-1,c=Math.min(t.length,e+1
|
|
477
|
-
`||e===`\r`||e===
|
|
475
|
+
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,x8)}}function C8(e,t,n,r){if(n>20)return $6(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),N8(e);if(r){if(b8(r))return e8(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),N8(e);r.calls+=1}try{return t(e)}catch(i){let a=w8(i),o=S8(i);if(a===void 0){if(n===0){let n=M8(e,t,i,r);if(n)return n}return $6(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),N8(e)}Q6(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=A8(e,a),s=e.slice(0,i.start),c=e.slice(i.start,i.end),l=e.slice(i.end),u=s.trim()?C8(s,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?C8(g8(s)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:c?[{type:`text`,text:c}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){$6();let n=S8(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),N8(e)}}}function w8(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function T8(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function E8(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}var D8=32*1024;function O8(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(m8(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+D8),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function k8(e){let t=O8(e,p8(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=E8(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=E8(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function A8(e,t){let n=k8(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:T8(e,t)??0,end:E8(e,t)??e.length}}function j8(e){let t=p8(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;m8(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function M8(e,t,n,r){let i=j8(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&b8(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=g8(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){Q6();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function N8(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}var P8=``,F8=``,I8=``,L8=``,R8=``,z8=[[P8,``],[F8,``],[I8,``],[L8,``],[R8,``]],B8=/[\uE000-\uE004]/,V8=/[\uE005-\uE009]/;z8.map(([e,t])=>({from:e,to:t}));var H8=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,U8=/<!--[\s\S]*?-->/g,W8=/<\/([a-z][a-z0-9]*)\s*>/g,G8=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,K8=new Set([`img`,`video`,`audio`]),q8=new Set([`mark`]),J8=/<\/([A-Z][A-Za-z0-9.]*)>/g;function Y8(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function X8(e){let t=new Map,n=new RegExp(J8.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function Z8(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function Q8(e){let t=[],n=e.indexOf(`/>`);for(;n!==-1;)t.push(n),n=e.indexOf(`/>`,n+2);return t}function $8(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}var e5=1024;function t5(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-e5);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
|
|
476
|
+
`||n===`\r`||n==="`")return!1;if(n!==`[`&&n!==`]`)continue;let r=0;for(let n=e-1;n>=0&&t[n]===`\\`;n--)r++;if(r%2!=1){if(n===`]`||t[e+1]===`^`||t[e-1]===`]`)return!1;i=!0;break}}if(!i)return!1;let o=!1,s=-1,c=Math.min(t.length,e+1+e5);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
|
|
477
|
+
`||e===`\r`||e===P8||e===F8||e===I8||e===L8||e===R8)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function n5(e,t,n,r){let i=Y8(n,e);if(i>=n.length)return!1;let a=n[i],o=Y8(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function r5(e){let t=e;if(B8.test(t))for(let[e,n]of z8)t=t.replaceAll(e,n);t=t.replace(U8,e=>e.replace(/</g,P8).replace(/>/g,F8)),t=t.replace(H8,(e,t)=>`${P8}${t.replaceAll(`:`,I8).replaceAll(`@`,L8)}${F8}`),t=t.replace(W8,(e,t)=>q8.has(t)?e:e.replace(/</g,P8).replace(/>/g,F8)),t=t.replace(G8,(e,t)=>K8.has(t)&&e.endsWith(`/>`)||q8.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,P8).replace(/>/g,F8):e),t=t.replace(/<>/g,`${P8}${F8}`);let n=X8(t),r=Z8(t),i=Q8(t),a=$8(t);t=t.replace(/</g,(e,o)=>{if(t5(o,t))return e;let s=t.slice(o,o+256);if(s[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(s)?e:P8;let c=/^<([a-z][a-z0-9]*)/.exec(s);if(c&&K8.has(c[1])&&n5(o,t,a,r))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(s);if(l&&q8.has(l[1])){let n=l[1];return s.startsWith(`<${n}/>`)||t.indexOf(`</${n}>`,o)!==-1?e:P8}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(s);if(!u)return P8;let d=u[1],f=Y8(r,o),p=Y8(i,f<r.length?r[f]:t.length);if(p>0){let n=i[p-1];if(n>o){let r=o+u[0].length-1;if(!t.slice(r,n).replace(/"[^"]*"|'[^']*'/g,``).includes(`/`))return e}}let m=n.get(d);return m&&Y8(m,o)<m.length?e:P8});{let e=[],n=[];for(let r=0;r<t.length;r++){if(t[r]===`
|
|
478
478
|
`){let i=t[r+1];if(i===`
|
|
479
479
|
`||i===`>`){if(e.push(...n),n.length=0,i===`
|
|
480
480
|
`)for(;t[r+1]===`
|
|
481
|
-
`;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=
|
|
482
|
-
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(
|
|
483
|
-
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function
|
|
484
|
-
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return
|
|
485
|
-
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!u7.test(e)))return!1;return n}function
|
|
481
|
+
`;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=R8;t=n.join(``)}}return t}function i5(e){return B8.test(e)||V8.test(e)}function a5(){return e=>{QF(e,e=>{let t=e;typeof t.value==`string`&&i5(t.value)&&(t.value=o5(t.value)),typeof t.url==`string`&&i5(t.url)&&(t.url=o5(t.url)),typeof t.title==`string`&&i5(t.title)&&(t.title=o5(t.title)),typeof t.alt==`string`&&i5(t.alt)&&(t.alt=o5(t.alt)),typeof t.lang==`string`&&i5(t.lang)&&(t.lang=o5(t.lang)),typeof t.meta==`string`&&i5(t.meta)&&(t.meta=o5(t.meta))})}}function o5(e){let t=e.replaceAll(P8,`<`).replaceAll(F8,`>`).replaceAll(I8,`:`).replaceAll(L8,`@`).replaceAll(R8,`{`);if(V8.test(t))for(let[e,n]of z8)t=t.replaceAll(n,e);return t}var s5=``,c5=``,l5=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function u5(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function d5(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||u5(e,r)%2==1?t:n(t))}function f5(e){return l5.lastIndex=0,e.replace(l5,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return uB(t.slice(e?2:1),e?16:10)}let n=lB(t);return n===!1?e:n})}function p5(e){return d5(e,l5,e=>`${s5}${e.slice(1,-1)}${c5}`)}var m5=RegExp(`${s5}([^${c5}]+)${c5}`,`g`);function h5(e){if(!e.includes(s5))return{value:e,spans:[]};let t=[],n=``,r=0;m5.lastIndex=0;let i=m5.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=m5.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function g5(){return e=>{QF(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(s5)){let{value:n,spans:r}=h5(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(s5)&&(t[e]=h5(n).value)}})}}var _5=``,v5=/\\</g;function y5(e){return d5(e,v5,e=>`${_5}${e.slice(1)}`)}function b5(){return e=>{QF(e,e=>{let t=e;typeof t.value==`string`&&t.value.includes(_5)&&(t.value=t.value.split(_5).join(``));for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(_5)&&(t[e]=n.split(_5).join(``))}})}}var x5=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),S5={note:`note`,tip:`tip`,important:`important`,warning:`warning`,caution:`caution`,abstract:`abstract`,info:`info`,todo:`todo`,success:`success`,question:`question`,failure:`failure`,danger:`danger`,bug:`bug`,example:`example`,quote:`quote`,summary:`abstract`,tldr:`abstract`,check:`success`,done:`success`,help:`question`,faq:`question`,fail:`failure`,missing:`failure`,error:`danger`,cite:`quote`,idea:`tip`,hint:`tip`,warn:`warning`,attention:`warning`},C5=`ok-alert`,w5=RegExp(`(?:^|\\s)${C5}-(\\w+)(?:\\s|$)`),T5=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function E5(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
|
|
482
|
+
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(T5);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function D5(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(w5);return n?n[1].toLowerCase():null}function O5(e){return S5[e.toLowerCase()]??null}function k5(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&A5(o[0],s)?o.slice(1):o,position:e.position}}function A5(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function j5(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${C5}-title`)}function M5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;QF(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=D5(e);if(!i)return;let a=O5(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=E5(n,e.position.start.offset),s&&(o=s.title,a||=O5(s.rawType)));let c=a??`note`,l=s&&x5.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=E5(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!j5(e.children[0]))return;let f=k5(e,c,o,l,d);r.children[t]=f})}}var N5=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`,P5={markers:`*`,classPrefix:C5,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>N5})};function F5(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;)e[i]===`\\`&&i+1<e.length&&n[a]===e[i+1]?(i+=2,a+=1):(i+=1,a+=1);return i}function I5(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
|
|
483
|
+
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function L5(e,t,n){return{start:I5(e,t),end:I5(e,n)}}function R5(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return L5(e,F5(e,i,t.value,n),F5(e,i,t.value,r))}var z5=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,B5=/<!--([\s\S]*?)-->/g;function V5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;U5(e),QF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=H5(i);if(a.length===0)return;let o=[],s=0;for(let t of a){if(t.start>s){let r={type:`text`,value:i.slice(s,t.start)},a=R5(n,e,s,t.start);a&&(r.position=a),o.push(r)}let r={type:`comment`,children:[{type:`text`,value:t.body}],data:{sourceForm:t.sourceForm}},a=R5(n,e,t.start,t.end);a&&(r.position=a),o.push(r),s=t.end}if(s<i.length){let t={type:`text`,value:i.slice(s)},r=R5(n,e,s,i.length);r&&(t.position=r),o.push(t)}return r.children.splice(t,1,...o),[YF,t+o.length]})}}function H5(e){let t=[];z5.lastIndex=0;let n;for(;(n=z5.exec(e))!==null;)n[1].trim().length!==0&&t.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:`percent`});B5.lastIndex=0;let r;for(;(r=B5.exec(e))!==null;){let e=r[1].trim();e!==``&&t.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:`html`})}t.sort((e,t)=>e.start-t.start);let i=[],a=-1;for(let e of t)e.start<a||(i.push(e),a=e.end);return i}function U5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type===`paragraph`){let r=W5(e);if(r!==null){let e=G5(r);if(e!==null){let r={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:e}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,1,r),n+=1;continue}let i=K5(r);if(i!==null){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:i}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}let i=q5(e);if(i!==null){let e={type:`commentBlock`,children:[i],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}let a=J5(e);if(a!==null){let e={type:`commentBlock`,children:[a],data:{sourceForm:`percent`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}if(e.type===`paragraph`&&X5(e)){let e=n+1;for(;e<t.length;){let n=t[e];if(n.type===`paragraph`&&X5(n))break;e+=1}if(e<t.length&&e>n+1){let r={type:`commentBlock`,children:t.slice(n+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,e-n+1,r),n+=1;continue}}n+=1}}function W5(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function G5(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function K5(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function q5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`<!--`))return null;let i=n.value.trimEnd();if(!i.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(Y5(r,`<!--`)>1||Y5(r,`-->`)>0)return null}else if(t===e.children.length-1){if(Y5(r,`<!--`)>0||Y5(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let a=r.slice(4);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-3);o.endsWith(` `)&&(o=o.slice(0,-1));let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function J5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`%%`)||r.startsWith(`%%%`))return null;let i=n.value.trimEnd();if(!i.endsWith(`%%`)||i.endsWith(`%%%`))return null;let a=r.slice(2);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-2);if(o.endsWith(` `)&&(o=o.slice(0,-1)),a.indexOf(`%%`)!==-1||o.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type===`text`?e.value.trim().length>0:!0)||a.trim().length>0||o.trim().length>0))return null;let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function Y5(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function X5(e){let t=W5(e);return t===null?!1:t.trim()===`%%`}var Z5=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,Q5=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function $5(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
|
|
484
|
+
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return Q5.test(i)}return!1}function e7(e){if(!e.includes(`</`))return e;let t=p8(e),n=!1,r=e.replace(Z5,(r,i,a,o,s)=>m8(s,t)||!$5(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}var t7=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,$te=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,ene=/^\s*<\/details>\s*$/;function n7(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function r7(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function i7(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function a7(e){return e.children[0].value??``}function tne(e){if(!i7(e))return null;let t=a7(e).match(t7);if(!t)return null;let{defaultOpen:n,name:r,id:i}=n7(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:r7({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function nne(e,t){let n=e[t];if(!i7(n))return null;let r=a7(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match($te);if(!i)return null;let{defaultOpen:a,name:o,id:s}=n7(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!i7(t))continue;let r=a7(t);if(ene.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function rne(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(i7(e)){let r=tne(e);if(r){t[n]=r,n++;continue}let i=nne(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:r7(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function ine(){return e=>{QF(e,e=>{`children`in e&&Array.isArray(e.children)&&rne(e)})}}var o7=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function ane(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function s7(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?s7(e.children[0]):null}function c7(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return c7(t[t.length-1])}return null}function one(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type!==`text`){n++;continue}let r=e.value,i=-1;for(let e=0;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61||e>0&&r.charCodeAt(e-1)===61)continue;let a;if(e+2<r.length)a=r.charAt(e+2);else{let e=t[n+1];if(!e)continue;a=s7(e)}if(!(a===null||/\s/.test(a))){i=e;break}}if(i===-1){n++;continue}let a=-1,o=-1,s=!1;for(let e=i+3;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61)continue;let i=r.charAt(e-1);if(/[\s=]/.test(i))continue;let o;if(e+2<r.length)o=r.charAt(e+2);else{let e=t[n+1];o=e?e.type===`text`?e.value[0]??null:s7(e):null}if(o!==`=`){a=-2;break}}if(a===-2){n++;continue}for(let e=n+1;e<t.length;e++){let n=t[e];if(n.type===`text`){for(let r=0;r<=n.value.length-2;r++){if(n.value.charCodeAt(r)!==61||n.value.charCodeAt(r+1)!==61)continue;let i;if(r>0)i=n.value.charAt(r-1);else{let n=t[e-1];i=c7(n)}if(i===null||/[\s=]/.test(i))continue;let c;if(r+2<n.value.length)c=n.value.charAt(r+2);else{let n=t[e+1];c=n?n.type===`text`?n.value[0]??null:s7(n):null}if(c!==`=`){a=e,o=r,s=!0;break}}if(a>=0)break}else if(!ane(n))break}if(a<0){n++;continue}let c=t[a],l=r.slice(0,i),u=r.slice(i+2),d=c.value.slice(0,o),f=c.value.slice(o+2),p=[];u.length>0&&p.push({type:`text`,value:u});for(let e=n+1;e<a;e++)p.push(t[e]);if(d.length>0&&p.push({type:`text`,value:d}),!s){n++;continue}let m={type:`mark`,children:p},h=[];l.length>0&&h.push({type:`text`,value:l}),h.push(m),f.length>0&&h.push({type:`text`,value:f}),t.splice(n,a-n+1,...h),n+=+(l.length>0)+1}}function l7(e){if(`children`in e&&Array.isArray(e.children)){one(e);for(let t of e.children)l7(t)}}function sne(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;QF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;o7.lastIndex=0;let a=[],o;for(;(o=o7.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=R5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`text`,value:t[1]},l=R5(n,e,r+2,a-2);l&&(o.position=l);let u={type:`mark`,children:[o]},d=R5(n,e,r,a);d&&(u.position=d),s.push(u),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=R5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[YF,t+s.length]}),l7(e),QF(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function cne(){return e=>{QF(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(!r||r.type!==`image`)return;let i=lne(r,e);n.children[t]=i})}}function lne(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}var u7=/^( {4}|\t)/;function une(e){let t=e.split(`
|
|
485
|
+
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!u7.test(e)))return!1;return n}function dne(e){return e.split(`
|
|
486
486
|
`).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
|
|
487
|
-
`)}function
|
|
488
|
-
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!u7.test(o))return null;let s=t.slice(a,i);if(!
|
|
487
|
+
`)}function fne(e,t){let n=e.position;if(!n||typeof n.start.offset!=`number`||typeof n.end.offset!=`number`)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let a=r;for(;a>0&&t[a-1]!==`
|
|
488
|
+
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!u7.test(o))return null;let s=t.slice(a,i);if(!une(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:dne(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}var pne=function(){return(e,t)=>{let n=String(t.value??``);n&&QF(e,`paragraph`,(e,t,r)=>{if(!r||r.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=fne(e,n);a&&(r.children[t]=a)})}};function d7(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function mne(){return e=>{QF(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=d7(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),QF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=d7(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}var f7=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function hne(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;f7.lastIndex=0;let a=[],o=0;for(;;){let n=f7.exec(e);if(n===null)break;let s=n[0],c=n[1],l=n.index;if(l>o){let n={type:`text`,value:e.slice(o,l)},r=R5(t,i,o,l);r&&(n.position=r),a.push(n)}let u={type:`text`,value:c},d=R5(t,i,l+1,l+1+c.length);d&&(u.position=d);let f={type:`link`,url:c,title:null,children:[u],data:{sourceStyle:`autolink`}},p=R5(t,i,l,l+s.length);p&&(f.position=p),a.push(f),o=l+s.length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=R5(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}var gne=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function p7(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length&&e[r+1]===`|`){n+=`${i}|`,r++;continue}if(i===`|`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function _ne(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||typeof i.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let a=i.start.offset,o=i.end?.offset??a;if(a<0||o>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${a} end=${o} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(a,o),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&gne.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}n.endsWith(`\\`)&&r.endsWith(`\\`)&&(e.data.sourceRaw=n);break}case`emphasis`:{let n=t[a];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(a,a+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:{let n=t[a],i=t.slice(a,o);if(n===`#`){if(e.data.sourceStyle=`atx`,r?.type===`root`){let n=a;for(;n>0&&t[n-1]!==`
|
|
489
489
|
`;)n--;let r=t.slice(n,a);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceLeadingIndent=r.length)}let n=/^#+( {2,})[^ ]/.exec(i);n&&(e.data.sourceInteriorSpacing=n[1].length);let o=/^.*?[ \t](#+)[ \t]*$/.exec(i);o&&(e.data.sourceTrailingHashes=o[1].length)}else{let t=/\n(=+)[ \t]*$/.exec(i),n=/\n(-+)[ \t]*$/.exec(i),r=t??n;r?(e.data.sourceStyle=`setext`,e.data.sourceUnderlineLength=r[1].length):e.data.sourceStyle=`atx`}break}case`blockquote`:{let n=a;for(;n>0&&t[n-1]!==`
|
|
490
490
|
`;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
|
|
491
491
|
`),s=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.length===0)continue;if(r&&e>0)break;let n=t.replace(/^ {1,3}/,``);if(n[0]===`>`&&n.slice(1).trimEnd()!==``)if(n[1]===` `)s.push(1);else{let e=0;for(;n[1+e]===` `;)e++;s.push(e)}}s.length>0&&(e.data.sourceMarkerSpacings=s);break}case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`listItem`:{let n=t.slice(a,o),r=/^(?:([-+*])|(\d{1,9})[.)])( *)/.exec(n);if(!r)break;let s=r[1]?1:(r[2]?.length??0)+1,c=r[3].length;c>=2&&c<=4&&(e.data.sourceMarkerSpacing=c),r[2]&&(e.data.sourceOrdinal=Number.parseInt(r[2],10)),e.checked!=null&&/^\[([xX])\] /.exec(n.slice(s+Math.max(c,1)))?.[1]===`X`&&(e.data.sourceCheckboxChar=`X`);let l=s+(c>=2&&c<=4?c:1),u=a;for(;u>0&&t[u-1]!==`
|
|
@@ -499,9 +499,9 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
499
499
|
`).filter(e=>e.trim().length>0);if(t.length>=2){let n=t.map(e=>e.trimStart().startsWith(`|`)),r=t.map(e=>/(^|[^\\])\|$/.test(e.trimEnd())),i=n.every(e=>e===n[0]),a=r.every(e=>e===r[0]);if(i&&a){let t=n[0],i=r[0];(!t||!i)&&(e.data.sourceOuterPipes={leading:t,trailing:i})}}}for(let n of e.children??[]){if(n.type!==`tableRow`||!n.position)continue;let e=n.position.start.offset,r=n.position.end.offset;if(typeof e!=`number`||typeof r!=`number`)continue;let i=t.slice(e,r),a=i.indexOf(`
|
|
500
500
|
`);a!==-1&&(i=i.slice(0,a));let o=p7(i);o.length>0&&o[0]===``&&i.startsWith(`|`)&&o.shift(),o.length>0&&o[o.length-1]===``&&i.endsWith(`|`)&&o.pop();let s=n.children??[],c=Math.min(s.length,o.length);for(let e=0;e<c;e++){let t=s[e];if(t.type!==`tableCell`)continue;let n=o[e],r=0;for(;r<n.length&&n[r]===` `;)r++;let i=0;for(;i<n.length-r&&n[n.length-1-i]===` `;)i++;t.data||={},t.data.sourcePadding={left:r,right:i}}}break}case`link`:case`linkReference`:if(`children`in e&&e.children.length===0&&(e.data.sourceRaw=t.slice(a,o)),e.type===`link`){let n=t[a];if(n!==`[`&&n!==`<`&&!e.title)e.data.sourceStyle=`gfm-autolink`;else if(n===`[`){let n=t.slice(a,o),r=n.lastIndexOf(`](`);if(r!==-1){let t=r+2;for(;t<n.length&&(n[t]===` `||n[t]===` `);)t++;if(n[t]===`<`&&(e.data.sourceUrlForm=`angle-bracketed`),e.title!==void 0&&e.title!==null&&n[n.length-1]===`)`){let t=n.length-2;for(;t>r+1&&(n[t]===` `||n[t]===` `||n[t]===`
|
|
501
501
|
`);)t--;n[t]===`"`?e.data.sourceTitleMarker=`double`:n[t]===`'`?e.data.sourceTitleMarker=`single`:n[t]===`)`&&(e.data.sourceTitleMarker=`paren`)}}}}break;case`definition`:{let n=t.slice(a,o);if(e.data.sourceLayout=n.includes(`
|
|
502
|
-
`)?`multiline`:`inline`,typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}var
|
|
502
|
+
`)?`multiline`:`inline`,typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}var vne=`(^|\\s)#([a-zA-Z][\\w/-]*)`;function yne(){return new RegExp(vne,`g`)}var m7=yne(),bne=/^[a-zA-Z][\w/-]*$/;function xne(e,t){if(t<=0||e[t-1]!==`\\`)return!1;let n=t-1,r=0;for(;n>=0&&e[n]===`\\`;)r++,n--;return r%2==1}function Sne(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=typeof i.position?.start?.offset==`number`?i.position?.start?.offset??0:0;m7.lastIndex=0;let o=[],s=0;for(;;){let n=m7.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(t&&a>=0){let n=a,r=0,i=-1;for(;r<=u&&n<t.length;){let a=t[n]===`\\`&&n+1<t.length&&e[r]===t[n+1],o=a?n+1:n;if(r===u){i=o;break}n=a?n+2:n+1,r+=1}if(i>=0&&xne(t,i))continue}if(u>s){let n={type:`text`,value:e.slice(s,u)},r=R5(t,i,s,u);r&&(n.position=r),o.push(n)}let d={type:`tag`,value:l},f=R5(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}if(o.length===0)n.push(i);else{if(s<e.length){let n={type:`text`,value:e.slice(s)},r=R5(t,i,s,e.length);r&&(n.position=r),o.push(n)}n.push(...o)}}r&&(e.children=n)}var Cne=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.wikiLinkEmbed.tag.math.inlineMath.mark.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function h7(e,t){if(!e||typeof e!=`object`)return null;if(typeof e.offset==`number`)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if(typeof n!=`number`||typeof r!=`number`||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf(`
|
|
503
503
|
`,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
|
|
504
|
-
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function Cne(e,t){if(!e)return null;let n=h7(e.start,t),r=h7(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function wne(e,t){let n=Cne(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function Tne(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;ZF(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!Sne.has(e.type)){let r=wne(e,n);return i.children[t]=r,JF}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(mne(t,n),xne(t,n))}if(gne(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`&&e.data?.sourceStyle===`setext`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function Ene(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function Dne(){return e=>{ZF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=Ene(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function One(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var kne=(e,t)=>{if(One(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0},g7=Dq(),_7=BK(),v7=VK();function y7(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===g7)||t.push(g7);let n=e.fromMarkdownExtensions;n.some(e=>e===_7)||n.push(_7);let r=e.toMarkdownExtensions;r.some(e=>e===v7)||r.push(v7)}var b7=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function Ane(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ZF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;b7.lastIndex=0;let a=[],o;for(;(o=b7.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=L5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=L5(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=L5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[JF,t+s.length]})}}var x7={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function jne(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===x7)||e.toMarkdownExtensions.push(x7)}var S7=33,C7=91,w7=93,T7=124,E7=35,Mne={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===C7?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===C7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===E7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===T7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===T7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===w7?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===w7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},Nne={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===S7?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===C7?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===C7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===E7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===T7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===T7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===w7?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===w7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function Pne(){return{text:{[C7]:Mne,[S7]:Nne}}}function Fne(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function Ine(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function D7(e){return e.stack[e.stack.length-1]}function Lne(e){let t=D7(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function Rne(e){let t=D7(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function zne(e){let t=D7(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function O7(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function Bne(e){O7(D7(this)),this.exit(e)}function Vne(e){O7(D7(this)),this.exit(e)}var k7={enter:{wikiLink:Fne,wikiLinkEmbed:Ine},exit:{wikiLinkTarget:Lne,wikiLinkAnchor:Rne,wikiLinkAlias:zne,wikiLink:Bne,wikiLinkEmbed:Vne}};function A7(e,t){return typeof e==`string`&&e.trim()===t?e:t}var j7={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${A7(t.data?.sourceTarget,n)}`;return r&&(a+=`#${A7(t.data?.sourceAnchor,r)}`),i&&(a+=`|${A7(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},M7=Pne();function N7(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===M7)||e.micromarkExtensions.push(M7),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===k7)||e.fromMarkdownExtensions.push(k7),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===j7)||e.toMarkdownExtensions.push(j7)}function Hne(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var Une=[{name:`remark-parse`,plugin:BG},{name:`remark-mdx-agnostic`,plugin:y7},{name:`remark-gfm`,plugin:NU},{name:`remark-math`,plugin:tG,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:N7},{name:`remark-github-alerts`,plugin:UW,options:N5},{name:`callout-transformer`,plugin:j5},{name:`restore-from-mdx`,plugin:i5},{name:`restore-entity-refs`,plugin:h5},{name:`restore-backslash-escapes`,plugin:y5},{name:`details-accordion-promoter`,plugin:rne},{name:`image-promoter`,plugin:sne},{name:`indented-code-promoter`,plugin:fne},{name:`math-promoter`,plugin:pne},{name:`single-dollar-math-promoter`,plugin:Ane},{name:`highlight-promoter`,plugin:one},{name:`mermaid-promoter`,plugin:Dne},{name:`comment-promoter`,plugin:B5},{name:`merged-post-parse-walker`,plugin:Tne},{name:`ensure-non-empty-doc`,plugin:()=>Hne}];function Wne(e){let t=HU();for(let e of Une)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(mW,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Gne(e){let t=HU().use(zW,[`yaml`]).use(NU,{tablePipeAlign:!1}).use(tG,{singleDollarTextMath:!1}).use(y7).use(N7).use(jne).use(PU,{bullet:`-`,fences:!0,rule:`-`,join:[kne],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function P7(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var F7=3,I7=/^\n+$/,L7=/^\n{2,}$/;function R7(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);I7.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);L7.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{${F7},}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function Kne(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&I7.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&L7.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=F7-1)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function qne(e,t){let{source:n,hadBom:r}=P7(e),i=$5(n),a=new MP(f5(n5(v5(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a),c=R7(s,i,r),l=t.stringify(s);return c?l.type.create({...l.attrs,sourceDocBoundary:c},l.content,l.marks):l}function Jne(e,t){let{source:n,hadBom:r}=P7(e),i=$5(n),a=new MP(f5(n5(v5(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a);return R7(s,i,r),s}function Yne(e,t,n){let r=gW(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers}),i=Kne(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function Xne(){return!1}function Zne(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Qne(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function z7(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!j0(e))return e;let n=Qne(Zne(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Xne()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}var $ne=Object.assign(ure,{peek:()=>`$`}),ere=Object.assign(dre,{peek:()=>`~`}),tre=(()=>{for(let e of v7.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),nre={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&o2(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=W7(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=W7(n,t.slice(o),{...r,before:r.before+a})),a}return W7(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:U7(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(H7(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(U7(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
|
|
504
|
+
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function wne(e,t){if(!e)return null;let n=h7(e.start,t),r=h7(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function Tne(e,t){let n=wne(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function Ene(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;QF(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!Cne.has(e.type)){let r=Tne(e,n);return i.children[t]=r,YF}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(hne(t,n),Sne(t,n))}if(_ne(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`&&e.data?.sourceStyle===`setext`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function Dne(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function One(){return e=>{QF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=Dne(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function kne(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var Ane=(e,t)=>{if(kne(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0},g7=Dq(),_7=BK(),v7=VK();function y7(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===g7)||t.push(g7);let n=e.fromMarkdownExtensions;n.some(e=>e===_7)||n.push(_7);let r=e.toMarkdownExtensions;r.some(e=>e===v7)||r.push(v7)}var b7=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function jne(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;QF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;b7.lastIndex=0;let a=[],o;for(;(o=b7.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=R5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=R5(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=R5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[YF,t+s.length]})}}var x7={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function Mne(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===x7)||e.toMarkdownExtensions.push(x7)}var S7=33,C7=91,w7=93,T7=124,E7=35,Nne={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===C7?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===C7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===E7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===T7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===T7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===w7?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===w7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},Pne={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===S7?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===C7?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===C7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===E7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===T7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===T7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===C7?n(t):t===w7?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===w7?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===w7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function Fne(){return{text:{[C7]:Nne,[S7]:Pne}}}function Ine(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function Lne(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function D7(e){return e.stack[e.stack.length-1]}function Rne(e){let t=D7(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function zne(e){let t=D7(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function Bne(e){let t=D7(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function O7(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function Vne(e){O7(D7(this)),this.exit(e)}function Hne(e){O7(D7(this)),this.exit(e)}var k7={enter:{wikiLink:Ine,wikiLinkEmbed:Lne},exit:{wikiLinkTarget:Rne,wikiLinkAnchor:zne,wikiLinkAlias:Bne,wikiLink:Vne,wikiLinkEmbed:Hne}};function A7(e,t){return typeof e==`string`&&e.trim()===t?e:t}var j7={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${A7(t.data?.sourceTarget,n)}`;return r&&(a+=`#${A7(t.data?.sourceAnchor,r)}`),i&&(a+=`|${A7(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},M7=Fne();function N7(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===M7)||e.micromarkExtensions.push(M7),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===k7)||e.fromMarkdownExtensions.push(k7),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===j7)||e.toMarkdownExtensions.push(j7)}function Une(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var Wne=[{name:`remark-parse`,plugin:BG},{name:`remark-mdx-agnostic`,plugin:y7},{name:`remark-gfm`,plugin:NU},{name:`remark-math`,plugin:tG,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:N7},{name:`remark-github-alerts`,plugin:UW,options:P5},{name:`callout-transformer`,plugin:M5},{name:`restore-from-mdx`,plugin:a5},{name:`restore-entity-refs`,plugin:g5},{name:`restore-backslash-escapes`,plugin:b5},{name:`details-accordion-promoter`,plugin:ine},{name:`image-promoter`,plugin:cne},{name:`indented-code-promoter`,plugin:pne},{name:`math-promoter`,plugin:mne},{name:`single-dollar-math-promoter`,plugin:jne},{name:`highlight-promoter`,plugin:sne},{name:`mermaid-promoter`,plugin:One},{name:`comment-promoter`,plugin:V5},{name:`merged-post-parse-walker`,plugin:Ene},{name:`ensure-non-empty-doc`,plugin:()=>Une}];function Gne(e){let t=HU();for(let e of Wne)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(mW,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Kne(e){let t=HU().use(zW,[`yaml`]).use(NU,{tablePipeAlign:!1}).use(tG,{singleDollarTextMath:!1}).use(y7).use(N7).use(Mne).use(PU,{bullet:`-`,fences:!0,rule:`-`,join:[Ane],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function P7(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var F7=3,I7=/^\n+$/,L7=/^\n{2,}$/;function R7(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);I7.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);L7.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{${F7},}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function qne(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&I7.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&L7.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=F7-1)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function Jne(e,t){let{source:n,hadBom:r}=P7(e),i=e7(n),a=new NP(p5(r5(y5(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a),c=R7(s,i,r),l=t.stringify(s);return c?l.type.create({...l.attrs,sourceDocBoundary:c},l.content,l.marks):l}function Yne(e,t){let{source:n,hadBom:r}=P7(e),i=e7(n),a=new NP(p5(r5(y5(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a);return R7(s,i,r),s}function Xne(e,t,n){let r=gW(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers}),i=qne(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function Zne(){return!1}function Qne(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function $ne(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function z7(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!j0(e))return e;let n=$ne(Qne(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Zne()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}var ere=Object.assign(dre,{peek:()=>`$`}),tre=Object.assign(fre,{peek:()=>`~`}),nre=(()=>{for(let e of v7.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),rre={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&o2(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=W7(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=W7(n,t.slice(o),{...r,before:r.before+a})),a}return W7(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:U7(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(H7(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(U7(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
|
|
505
505
|
`:` `;l+=s.move(u);let d=String(e.url??``);if(!d||/[\0- ]/.test(d)){let e=n.enter(`destinationLiteral`);l+=s.move(`<`),l+=s.move(n.safe(d,{before:l,after:`>`,...s.current()})),l+=s.move(`>`),e()}else{let e=n.enter(`destinationRaw`);l+=s.move(U7(d)),e()}if(e.title){let t=i===`multiline`?`
|
|
506
506
|
`:` `;l+=s.move(H7(e.title,a,t))}return o(),l},thematicBreak(e){return e.data?.sourceRaw??`---`},break(e){return e.data?.sourceStyle===`backslash`?`\\
|
|
507
507
|
`:`
|
|
@@ -511,7 +511,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
511
511
|
`)}let n=e.data?.sourceFenceChar===`~`?`~`:"`",r=Math.max(3,e.data?.sourceFenceLength??3),i=RegExp(`^ {0,3}(\\${n}+)[ \\t]*$`);for(let e of t.split(`
|
|
512
512
|
`)){let t=i.exec(e);t&&t[1].length>=r&&(r=t[1].length+1)}let a=e.data?.sourceClosingFenceLength,o=typeof a==`number`&&a>r?a:r,s=e.data?.sourceFenceIndent,c=typeof s==`number`&&s>=1&&s<=3?` `.repeat(s):``,l=e.data?.sourceInfoPadding,u=n.repeat(r),d=e.lang??``,f=`${u}${d&&typeof l==`number`&&l>=1?` `.repeat(l):``}${d}${e.meta?` ${e.meta}`:``}\n${t}\n${n.repeat(o)}`;return c?f.split(`
|
|
513
513
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
514
|
-
`):f},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath
|
|
514
|
+
`):f},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath:ere,delete:tre,heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
|
|
515
515
|
`,after:`
|
|
516
516
|
`}),i=e.data?.sourceUnderlineLength,o=typeof i==`number`&&i>=1?i:Math.max(t.length,3);return`${t}\n${(a===1?`=`:`-`).repeat(o)}`}let o=e.data?.sourceLeadingIndent,s=typeof o==`number`&&o>=1&&o<=3?` `.repeat(o):``,c=e.data?.sourceInteriorSpacing,l=typeof c==`number`&&c>=2?` `.repeat(c):` `,u=`#`.repeat(a),d=n.containerPhrasing(e,{...r,before:`${u} `,after:`
|
|
517
517
|
`}),f=e.data?.sourceTrailingHashes;if(typeof f==`number`&&f>0){let e=`#`.repeat(f);return d?`${s}${u}${l}${d} ${e}`:`${s}${u} ${e}`}return d?`${s}${u}${l}${d}`:`${s}${u}`},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=o.data?.sourceOrdinal,f=typeof s==`number`&&s>=0?s:d+t,p=a?`${f}${u}`:e.data?.bulletMarker??i,m=o.data?.sourceMarkerSpacing,h=typeof m==`number`&&m>=2&&m<=4?m:1,g=` `.repeat(h),_=p;o.checked===!0?_+=`${g}[${o.data?.sourceCheckboxChar===`X`?`X`:`x`}]`:o.checked===!1&&(_+=`${g}[ ]`);let v=o.data?.sourceContinuationIndent,y=p.length+h,b=typeof v==`number`&&v>=y&&v<=y+3?v:y,x=` `.repeat(b),S=o.checked===null||o.checked===void 0?g:` `,C=n.containerFlow(o,r).split(`
|
|
@@ -520,5 +520,5 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
520
520
|
|
|
521
521
|
`:`
|
|
522
522
|
`;return l.join(f)},table(e,t,n,r){let i=n.enter(`table`),a=[],o=[],s=e.children??[];for(let e of s){let t=e.children??[],i=[],s=[];for(let e of t){let t=n.enter(`tableCell`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,{...r,before:` `,after:` `});a(),t(),i.push(o);let c=e.data?.sourcePadding;s.push(c&&typeof c.left==`number`&&typeof c.right==`number`?{left:c.left,right:c.right}:null)}a.push(i),o.push(s)}i();let c=e.align??[],l=e.data?.sourceDashCounts,u=a[0]?.length??0,d=a.slice(1).reduce((e,t)=>Math.max(e,t.length),0),f=Math.max(u,d,c.length),p=[];for(let e=0;e<f;e++){let t=c[e],n=``,r=``;t===`center`?(n=`:`,r=`:`):t===`left`?n=`:`:t===`right`&&(r=`:`);let i=l?.[e],a=typeof i==`number`&&i>=1?i:1;p.push(n+`-`.repeat(a)+r)}let m=(e,t)=>{let n=[];for(let r=0;r<f;r++){let i=e[r]??``,a=t[r]??{left:1,right:1};n.push(` `.repeat(a.left)+i+` `.repeat(a.right))}let r=v&&!v.leading?``:`|`,i=v&&!v.trailing?``:`|`;return`${r}${n.join(`|`)}${i}`},h=e.data?.sourceAlignmentPadding,g=Array.from({length:f},(e,t)=>{let n=h?.[t];return n&&typeof n.left==`number`&&typeof n.right==`number`?n:null}),_=e.data?.sourceOuterPipes,v=_&&f>=2&&a.every(e=>{let t=(e[0]??``).trim(),n=(e[f-1]??``).trim();return(_.leading||t.length>0)&&(_.trailing||n.length>0&&!n.endsWith(`\\`))})?_:null;if(a.length===0)return m(p,g);let y=[];y.push(m(a[0],o[0]??[])),y.push(m(p,g));for(let e=1;e<a.length;e++)y.push(m(a[e],o[e]??[]));return y.join(`
|
|
523
|
-
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=B7(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:
|
|
524
|
-
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function lre(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&cre(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=sre(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function q7(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);J7(i.charCodeAt(i.length-1),s,r)&&(o=Y7(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return J7(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+Y7(c)),o}function J7(e,t,n){return!(Sz(t)!==G7||n===`_`&&Sz(e)===void 0)}function Y7(e){return`&#x${e.toString(16).toUpperCase()};`}function ure(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!fre(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function dre(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function fre(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function X7(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var pre=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=dx(e.extensions),this.handlers=yre(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=bre(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Wne({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Gne({toMarkdownHandlers:nre})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return qne(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Jne(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?v8(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return Yne(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},Z7=Y6();function mre(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function hre(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function gre(e){return e.attrs.sourceDirty||hre(e)}function _re(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function Q7(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function $7(e,t){if(e.length===0)return Q7({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return Q7({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[$7(n.children,t)]}}return Q7({type:`inlineCode`,value:e9(e)},t)}function e9(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=e9(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var vre=iu;function yre(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=dW(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=dW(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=z7(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&i2(t.raw)!==null&&t2(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset).replaceAll(`\xA0`,` `);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=i2(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u).replaceAll(`\xA0`,` `);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=fW(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=fW(r.highlight)),r.comment&&(i.comment=fW(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=dW(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=fW(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=fW(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=dW(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=dW(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=dW(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=Z7.getOrWildcard(o),c=mre(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=z7(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=x2(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&vre.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&au.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&su.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&cu.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:X7(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=dW(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function bre(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=_W(`paragraph`)),r.blockquote&&(t.blockquote=_W(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=_W(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=_W(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&_re(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),r.tableRow&&(t.tableRow=_W(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=_W(`tableCell`,a)),r.tableHeader&&(t.tableHeader=_W(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!gre(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:Z7.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:Z7,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=vW(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=vW(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return $7(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=vW(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return i.highlight&&(n.highlight=vW(`mark`)),i.comment&&(n.comment=vW(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=_W(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=_W(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return o2(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var xre=/\p{M}+/gu,Sre=/[^\p{L}\p{N}]+/gu,Cre=/^-+|-+$/g;function t9(e){return e.trim().normalize(`NFKD`).replace(xre,``).toLowerCase().replace(Sre,`-`).replace(Cre,``)}function wre(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Tre(e,t){let n=t9(e);return n?wre(n,t):``}function n9(e,t){let n=t9(e);return t?`#${n}-${t9(t)}`:`#${n}`}var r9=new Set([`img`,`video`,`audio`,`mark`]),Ere=new Map(q6.flatMap(e=>e.surface===`compat`&&r9.has(e.rendersAs)?[[e.name,e]]:[]));function i9(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function a9(e){let t=e.name;if(!t||!r9.has(t))return null;let n=i9(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function o9(e){let t=e.name;if(!t)return null;let n=Ere.get(t);if(!n)return null;let r=i9(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Dre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:n9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Ore=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:n9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},kre=(e,t)=>{let n=t,r=a9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=o9(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},Are=(e,t)=>{let n=t,r=a9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=o9(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},jre=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Mre=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function s9(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(s9).join(``):``}var c9={wikiLink:Dre,wikiLinkEmbed:Ore,mdxJsxFlowElement:kre,mdxJsxTextElement:Are,rawMdxFallback:jre,mark:Mre,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:s9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:s9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Nre=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Pre=/\bexpression\s*\(/i,Fre=1e4;function Ire(e){return!(e.length>Fre||Nre.test(e)||Pre.test(e))}function l9(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!A0(e.split(/\s+/)[0]??``))return!1}return!0}var Lre={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Rre=new Set([`href`,`src`]),zre=CV(`<>`),u9=()=>e=>{ZF(e,`element`,e=>{let t=Lre[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?d5(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Rre.has(e))if(t===`<>`||t===zre)r=``;else{let e=d5(t);r=e===t?t:CV(e)}else r=d5(t);r!==t&&(n[e]=r)}})},d9=()=>e=>{ZF(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!A0(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!A0(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!A0(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!l9(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!l9(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!A0(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!Ire(r)&&delete n.style})};function Bre(e){let t=HU().use(fY,{handlers:c9}).use(u9).use(d9).use(TJ),n=t.runSync(e);return String(t.stringify(n))}function Vre(e){let t=HU().use(BG).use(zW,[`yaml`]).use(y7).use(NU).use(N7).use(fY,{handlers:c9}).use(u9).use(d9).use(TJ);return String(t.processSync(e))}Dq(),BK(),VK(),A({docName:j4,summary:N4,content:E().optional(),...M4}).loose(),A({docName:j4,summary:N4,markdown:E(),position:j([`append`,`prepend`,`replace`]).optional(),extension:j(X1).optional(),...M4}).loose(),A({docName:j4,summary:N4,find:E().min(1),replace:E(),offset:D().int().nonnegative().optional(),...M4}).loose(),A({docName:j4,connectionId:E().min(1),scope:j([`last`,`session`,`file`]).optional(),...M4}).loose();var f9=A({value:E(),truncatedFrom:D().int().nonnegative().optional(),hint:E().optional()}).loose(),Hre=Ia(`kind`,[A({kind:M(`inline`),content:E()}),A({kind:M(`truncated`),byteLength:D().int().nonnegative(),hint:E()})]),p9=A({kind:M(`content-divergence`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),divergenceType:E().optional(),currentState:Hre.optional(),hint:E().optional()}).loose(),Ure=A({type:M(`orphan`),parentCandidates:k(E()),message:E()}).loose(),m9=A({kind:M(`disk-edit-reconciled`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),mergeOutcome:E().optional(),hint:E().optional()}).loose(),h9=Ia(`kind`,[p9,m9]),g9=k(Ia(`kind`,[p9,m9,A({kind:M(`mermaid-parse-error`),fenceIndex:D().int().positive(),fenceFirstLine:E(),message:E(),line:D().int().positive().optional()}).loose()])).min(1),_9=k(A({href:E(),resolvedTo:E().nullable(),reason:j([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose());A({timestamp:E().min(1),summary:f9.optional(),warning:h9.optional(),warnings:g9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),hints:k(Ure).optional(),summary:f9.optional(),warning:h9.optional(),warnings:g9.optional(),brokenLinks:_9}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),summary:f9.optional(),warning:h9.optional(),warnings:g9.optional(),brokenLinks:_9}).loose(),A({docName:E().min(1),scope:j([`last`,`session`]),undone:O()}).loose(),A({docName:j4,patch:Ba(E(),Pa([i$,Ta()])),types:Ba(E(),j(t$)).optional(),summary:N4,...M4}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),appliedKeys:k(E()),summary:f9.optional(),warning:h9.optional(),warnings:g9.optional(),brokenLinks:_9}).loose(),A({entries:k(A({level:j([`info`,`warn`,`error`]),message:E().max(t3),event:E().optional(),fields:Ba(E(),Da()).optional(),ts:D().optional(),sourceId:E().optional(),lineNumber:D().optional()}).loose()).max(100)}).loose(),A({accepted:D().int().min(0)}).loose();var Wre=A({status:E().min(1),reason:E()}).loose();A({docName:E().min(1),content:E(),lifecycle:Wre.nullable()}).loose();var v9=A({kind:j([`document`,`asset`,`folder`,`file`]).default(`document`),docName:E().min(1).optional(),docExt:E().min(1).default(`.md`),size:D().int().nonnegative(),modified:E().min(1),isSymlink:O().default(!1),canonicalDocName:E().nullable().default(null),targetPath:E().nullable().default(null),path:E().min(1).optional(),assetExt:E().min(1).optional(),mediaKind:j([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:k(E().min(1)).optional(),hasChildren:O().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Gre=A({documents:k(v9),truncated:O().optional()}).loose(),Kre=A({source:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),qre=A({docName:E().min(1),backlinks:k(Kre)}).loose();A({counts:Ba(E().min(1),D().int().nonnegative())}).loose();var Jre=Ia(`kind`,[A({kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),A({kind:M(`external`),url:E().min(1),title:E(),snippet:E().nullable()}).loose()]),Yre=A({docName:E().min(1),forwardLinks:k(Jre)}).loose(),Xre=Ia(`kind`,[A({id:E().min(1),kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),label:E(),cluster:E().nullable(),category:E().nullable(),tags:k(E()).nullable()}).loose(),A({id:E().min(1),kind:M(`external`),url:E().min(1),label:E()}).loose()]),Zre=A({source:E().min(1),target:E().min(1)}).loose(),Qre=A({nodes:k(Xre),links:k(Zre)}).loose(),$re=A({ts:D().int().min(0),url:E(),method:E(),ua:E().optional(),origin:E().optional(),referer:E().optional(),host:E().optional(),remote:E().optional(),secChUa:E().optional(),secChUaMobile:E().optional(),secChUaPlatform:E().optional(),secFetchSite:E().optional(),secFetchDest:E().optional(),secFetchMode:E().optional(),secFetchUser:E().optional()}).loose(),eie=A({app:Pa([M(`cursor`),M(`codex`),M(`claude`),Ta()]),signals_fired:k(E())}).loose();A({entries:k($re),count:D().int().min(0),detection:eie}).loose(),A({writers:k(A({id:E().min(1),name:E().optional(),email:E().optional()}).loose()).optional(),summary:N4,...M4}).loose(),A({checkpointRef:E().min(1)}).loose();var tie=A({v:D().int().optional(),id:E().min(1),name:E().min(1),colorSeed:E().optional(),docs:k(E()),summaries:k(E()).optional()}).loose();A({entries:k(A({sha:E().min(1),timestamp:E().min(1),author:E(),authorEmail:E(),type:j([`checkpoint`,`wip`,`upstream`,`park`]),message:E(),contributors:k(tie),checkpoint:Da().nullable()}).loose()),total:D().int().nonnegative().optional(),truncated:O().optional(),hasMore:O().optional()}).loose(),A({sha:E().regex(/^[0-9a-f]{40}$/i),content:E(),timestamp:E(),author:E()}).loose();var nie=A({contentDir:E().min(1),pathSeparator:j([`/`,`\\`]),symlinkResolved:O()}).loose();k(Ia(`source`,[A({docName:E().min(1),timestamp:E().min(1),size:D().int().nonnegative(),source:M(`flat`)}).loose(),A({docName:E().min(1),timestamp:E().min(1),source:M(`timeline`),sha:E().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var rie=A({orphans:k(A({docName:E().min(1),title:E()}).loose())}).loose(),iie=A({hubs:k(A({docName:E().min(1),title:E(),count:D().int().nonnegative()}).loose())}).loose(),aie=A({source:E().min(1),title:E(),snippet:E().nullable()}).loose();A({deadLinks:k(A({target:E().min(1),sources:k(aie)}).loose())}).loose(),A({target:A({docName:E().min(1),title:E(),aliases:k(E())}).loose(),mentions:k(A({source:E().min(1),excerpt:E(),offset:D().int().nonnegative()}).loose()),truncated:O()}).loose(),A({projectPath:E().min(1)}).loose();var oie=j([`not-a-git-worktree`,`init-failed`]);Ia(`ok`,[A({ok:M(!0),projectPath:E().min(1)}).loose(),A({ok:M(!1),reason:oie,message:E().min(1)}).loose()]),A({host:E().min(1).optional()}).loose(),A({key:E().min(1)}).loose(),A({keyPresent:O()}).loose(),A({name:E().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:E().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),A({authenticated:O()}).loose(),A({}).loose();var sie=A({stackIndex:D().int().min(0),ts:D().int().min(0),additions:D().int().min(0),deletions:D().int().min(0)}).loose(),cie=A({docName:E().min(1),additionsTotal:D().int().min(0),deletionsTotal:D().int().min(0),lastTs:D().int().min(0),bursts:k(sie)}).loose(),lie=A({displayName:E().min(1),color:E().min(1),icon:E().optional(),connectionId:E().min(1)}).loose(),uie=A({sessionAlive:O(),agent:lie.nullable(),files:k(cie)}).loose(),die=A({diff:E(),generatedAt:D().int().min(0)}).loose();A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose();var fie=A({displayName:E().min(1),icon:E(),color:E().min(1),currentDoc:E().nullable(),mode:j([`idle`,`writing`]),ts:D().int().min(0)}).loose();A({presence:Ba(E().min(1),fie)}).loose(),Ba(E().min(1),O()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),A({path:E().min(1,`path must be non-empty`)}).loose(),A({}).loose();var pie=A({fromDocName:E().min(1),toDocName:E().min(1)}).loose(),mie=A({fromPath:E().min(1),toPath:E().min(1)}).loose();A({}).loose(),A({path:E().min(1),...M4,summary:N4}).loose();var hie=A({docName:E().min(1)}).loose();A({path:E().min(1),...M4,summary:N4}).loose();var gie=A({path:E().min(1)}).loose();A({kind:j([`file`,`folder`]),path:E().min(1),...M4,summary:N4}).loose();var _ie=A({kind:j([`file`,`folder`]),path:E().min(1),duplicatedDocNames:k(E().min(1))}).loose(),vie=A({pages:k(A({docName:E().min(1),title:E(),docExt:E().min(1),size:D().int().nonnegative(),modified:E().min(1),icon:E().min(1).max(2048).optional()}).loose())}).loose(),yie=A({level:D().int().min(1).max(6),text:E(),slug:E()}).loose(),bie=A({docName:E().min(1),headings:k(yie)}).loose(),xie=A({docName:E().min(1),rewrites:D().int().nonnegative()}).loose();A({kind:j([`file`,`folder`,`asset`]),fromPath:E().min(1),toPath:E().min(1),...M4,summary:N4}).loose();var Sie=A({renamed:k(pie),renamedAssets:k(mie),rewrittenDocs:k(xie).optional(),summary:f9.optional()}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...M4}).loose();var Cie=A({deletedDocNames:k(E().min(1))}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...M4,summary:N4}).loose();var wie=A({deletedDocNames:k(E().min(1))}).loose();A({docName:E().min(1),commitSha:E().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:N4,...M4}).loose(),A({restoredFrom:E().min(1),timestamp:E().min(1),summary:f9.optional(),warning:p9.optional(),warnings:g9.optional()}).loose();var Tie=j([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Eie=A({label:E().min(1),webUrl:ia().nullable()}).loose(),Die=Ia(`checkStatus`,[A({checkStatus:M(`allowed`)}).loose(),A({checkStatus:M(`denied`),deniedReason:j([`no-collaborator`,`private-no-access`,`repo-not-found`])}).loose(),A({checkStatus:M(`unknown`),unknownError:j([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`]).optional()}).loose()]),y9=j([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]);A({state:Tie,lastSyncUtc:E().nullable(),lastFetchUtc:E().nullable(),lastPushedSha:E().nullable(),ahead:D().int().min(0),behind:D().int().min(0),consecutiveFailures:D().int().min(0),conflictCount:D().int().min(0),hasRemote:O(),syncEnabled:O(),identityUnresolved:O(),remote:Eie.nullable().optional(),pushError:E().optional(),pushErrorCode:y9.optional(),pullError:E().optional(),pullErrorCode:y9.optional(),pausedReason:E().optional(),pushPermission:Die.optional()}).loose(),A({op:j([`sync`,`push`,`pull`]).optional()}).loose(),A({op:j([`sync`,`push`,`pull`])}).loose(),A({conflicts:k(A({file:E().min(1),detectedAt:E().min(1),oursSha:E().optional(),theirsSha:E().optional(),baseSha:E().optional()}).loose())}).loose(),A({file:E().min(1),strategy:j([`mine`,`theirs`,`content`,`delete`]),content:E().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),A({}).loose(),A({file:E().min(1),base:E(),ours:E(),theirs:E(),kind:j([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:E().nullable()}).loose(),A({plan:po(e=>e!==void 0,{message:`plan is required`})}).loose(),A({plan:po(e=>e!==void 0,{message:`plan is required`})}).loose(),A({result:po(e=>e!==void 0,{message:`result is required`})}).loose();var Oie=A({path:E().min(1),summary:E().min(1)}).loose(),kie=A({files:D().int().nonnegative(),folders:D().int().nonnegative()}).loose();A({packs:k(A({id:E().min(1),name:E().min(1),description:E().min(1),defaultSubfolder:E().optional(),folders:k(Oie),entryCounts:kie}).loose())}).loose(),A({noOpen:O().optional(),out:E().min(1).optional()}).loose();var Aie=A({reason:j([`unsupported-platform`,`spawn-error`]),message:E()}).loose();Ia(`status`,[A({status:M(`installed`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E()}).loose(),A({status:M(`built`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E(),handoffError:Aie.optional()}).loose(),A({status:M(`failed`),buildError:E()}).loose(),A({status:M(`skip-current`),skillVersion:E(),recordedAt:E().optional()}).loose()]);var b9=j(r0);Ma({schema:M(1),targets:k(b9).default([])}),A({tags:k(A({name:E().min(1),count:D().int().nonnegative(),isLeaf:O()}).loose())}).loose();var jie=A({docName:E().min(1),title:E(),matchingTags:k(E().min(1)),snippet:E().nullable()}).loose();A({name:E().min(1),docs:k(jie)}).loose(),A({folder:Da(),frontmatter_local:Ba(E(),Da()).nullable()}).loose(),A({path:E(),frontmatter:Ba(E(),Da()).optional()}).loose(),A({applied:Da()}).loose();var x9=Ba(E(),Da()).meta({description:`Free-form frontmatter map embedded in template payloads.`});A({template:A({name:E().min(1),folder:E(),scope:j([`local`,`inherited`]),path:E().min(1),frontmatter:x9,body:E()}).strict()}).strict();var Mie=A({templates:k(A({name:E().min(1),title:E().optional(),description:E().optional(),path:E().min(1),source_folder:E()}).strict()),truncated:O()}).strict();A({folder:E(),name:E(),body:E().optional(),frontmatter:x9.optional(),...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({fromFolder:E(),fromName:E(),toFolder:E(),toName:E(),body:E().optional(),frontmatter:x9.optional(),...M4,summary:N4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict();var S9=j(R1),Nie=/^[a-z0-9-]+$/,Pie=/^[A-Za-z0-9_-]+$/,C9=A({name:E(),description:E()}).strict();A({skill:A({name:E().min(1),scope:S9,path:E().min(1),frontmatter:C9,body:E(),files:k(A({path:E().min(1),text:E().nullable()})).optional()}).strict()}).strict();var Fie=A({skills:k(A({name:E().min(1),description:E().optional(),scope:S9,path:E().min(1),absolutePath:E().min(1).optional(),installed:O(),hosts:k(E()),installedVersion:E().optional(),bundledVersion:E().optional(),updateAvailable:O().optional()}).strict()),truncated:O()}).strict();A({scope:S9.default(`project`),name:E(),body:E().optional(),frontmatter:C9,...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({scope:S9.default(`project`),name:E(),...M4,summary:N4}).strict(),A({name:E().min(1),version:E().min(1),previousVersion:E().optional(),checkpointRef:E().optional()}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({scope:S9.default(`project`),fromName:E(),toName:E(),body:E().optional(),frontmatter:C9.optional(),...M4,summary:N4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict();var w9=j([`reference`,`script`]);A({scope:S9.default(`project`),name:E(),path:E().min(1),content:E(),...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),kind:w9,content:O()}).strict(),A({path:E().min(1),kind:w9,text:E()}).strict(),A({path:E().min(1),existed:O(),kind:w9}).strict(),A({scope:S9.default(`project`),name:E(),targets:k(b9).optional().meta({description:`Explicit editor ids to install into; omit to use project-configured editors.`}),...M4,summary:N4}).strict(),A({name:E().min(1),hosts:k(E()),scripts:O(),warnings:k(E()),warningCodes:k(j([`no-targets`,`scripts-present`]))}).strict(),A({scope:S9.default(`project`),name:E()}).strict(),A({name:E().min(1),uninstalled:O()}).strict();var Iie=A({targets:k(b9),configured:O()}).strict();A({targets:k(b9)}).strict(),A({targets:k(b9),reprojected:k(A({name:E(),hosts:k(E())}).strict()),bundleHosts:k(E()),removedFrom:k(E())}).strict(),A({scope:S9.default(`project`),name:E(),version:E().regex(/^[0-9a-f]{40}$/i),...M4,summary:N4}).strict(),A({name:E().min(1),version:E(),restoredFiles:k(E()),warnings:k(E())}).strict(),A({query:E().optional(),intent:j([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:j([`navigation`,`relevance`]).optional(),scopes:k(j([`page`,`folder`,`content`,`file`])).optional(),scope:E().optional(),limit:D().int().nonnegative().optional(),semantic:O().optional(),source:j([`omnibar`,`mcp`,`http`]).optional()}).loose();var Lie=A({kind:j([`page`,`folder`,`content`,`file`]),path:E().min(1),title:E(),score:D(),signals:Ba(E(),Da()),snippet:E().optional()}).loose(),Rie=A({capable:O(),applied:O(),coverage:A({embedded:D().int().nonnegative(),total:D().int().nonnegative()})}).loose();A({enabled:O(),keyPresent:O(),keySource:j([`file`,`env`]).nullable(),keyHint:E().nullable(),ready:O(),capable:O(),embedded:D().int().nonnegative(),total:D().int().nonnegative()}).loose(),A({query:E(),intent:j([`autocomplete`,`full_text`,`omnibar`]),results:k(Lie),elapsedMs:D().nonnegative(),semantic:Rie.optional(),truncated:O().optional(),ready:O().optional()}).loose();var zie=A({version:E().min(1),recordedAt:E().min(1)}).loose();A({currentVersion:E().min(1),targets:Ba(E(),zie.nullable())}).loose();var Bie=`server-info`,Vie=`branch-switched`,Hie=`disk-ack`,Uie=`config-validation-rejected`,Wie=`config-ignore-nested-error`,T9=j([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),Gie=A({v:M(1),ch:M(Bie),seq:D(),serverInstanceId:E().min(1),currentBranch:E().min(1).optional()}).loose(),Kie=A({v:M(1),ch:M(Vie),seq:D(),branch:E().min(1)}).loose(),qie=A({v:M(1),ch:T9,seq:D()}).loose(),Jie=A({v:M(1),ch:M(Hie),seq:D(),docName:E().min(1),sv:E().min(1)}).loose(),Yie=A({v:M(1),ch:M(Uie),seq:D(),docName:E().min(1),error:rd}).loose(),Xie=A({v:M(1),ch:M(Wie),seq:D(),path:E().min(1),error:E().min(1)}).loose(),Zie=100,Qie=500,$ie=450,eae={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},E9=new WeakMap;function tae(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function D9(e){return e.trim().toLowerCase()}var nae=/\.(?:md|mdx)$/;function rae(e,t){if(t!==`page`)return e;let n=e.replace(nae,``);return n.length>0?n:e}function O9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function iae(e){let t=O9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function k9(e){let t=oQ({schema:eae});return e.length>0&&_Q(t,e),t}function aae(e){let t={documents:e};return E9.set(t,k9(e)),t}function oae(e){let t=E9.get(e);if(t)return t;let n=k9(e.documents);return E9.set(e,n),n}function sae(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function A9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function cae(e,t){let n=D9(t);if(!n)return 0;let r=rae(n,e.kind),i=D9(e.title),a=D9(e.name),o=D9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var lae=.5;function j9(e,t){let n=cae(e,t);return n<=0?n:k4(e.path)?n*lae:n}var uae=60;function dae(e){return e===`file`?-uae:0}var fae=1e3,M9=50,pae=1,mae=1,hae=.001;function gae(e,t,n,r,i){let a=i>0?t/i:0,o=M9>0?n/M9:0,s=r===`file`?-hae:0,c=pae*a+mae*o+s;return e*fae+c}function N9(e,t,n,r){return e+t*20+n+dae(r)}function P9(e,t,n,r,i,a){return e===`relevance`?N9(t,n,r,i):gae(t,n,r,i,a)}function _ae(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function F9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function vae(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function yae(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function bae(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function xae(e,t){return D9(t).length<4?0:+(e===`full_text`)}function Sae(e){let{lexical:t,fullText:n}=e.signals;return t>=Qie?`lexical`:t===$ie&&n<=0?`pathOnly`:`body`}function Cae(e){let t=[],n=[],r=[];for(let i of e){let e=Sae(i);e===`lexical`?t.length<Zie&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function I9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Cae(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function wae(e,t,n={}){let r=n.intent??`omnibar`,i=_ae(r,n.ranking),a=tae(n.limit),o=new Set(n.scopes??sae(r)),s=e.documents.filter(e=>A9(e,o)),c=D9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=qQ(oae(e),{term:c,properties:yae(r),boost:bae(r),tolerance:xae(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>A9(e.document,o)).map(e=>[e.document.id,e.score])),d=vae(s),f=new Map;for(let e of s)j9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)A9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=F9(f.values(),u);return I9([...f.values()].map(t=>{let n=Math.max(0,j9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:P9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return I9(Tae({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function L9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Tae(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=F9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,j9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?P9(o,t,n,s,e.kind,m):N9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=L9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=L9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function Eae(e){return`https://github.com/${e.owner}/${e.repo}.git`}function Dae(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var R9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),z9=globalThis;z9[R9]===void 0&&(z9[R9]=fr());var B9=z9[R9],V9=Ma({version:E().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(B9,{description:`Recorded skill version for this target.`}),recordedAt:Oi().register(B9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:j([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(B9,{description:`Install-source surface that recorded this entry.`}).optional()});Ma({schema:M(1).register(B9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ma({"claude-cowork":V9.optional(),"cli-hosts":V9.optional()}).register(B9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var H9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function Oae(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??U9,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new H9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function U9(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function kae(){let e=!1,t=``,n=0;return r=>{let i=Aae(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function Aae(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function jae(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Mae(e){if(typeof e!=`string`||e.length===0)return e;let t=b6(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(h6(e)){let t=jae(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=f6(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Nae=`https://api.github.com/repos/inkeep/open-knowledge`;async function Pae(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Nae,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var Fae=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Iae={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Lae={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Rae(e,t=Fae){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function zae(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Bae(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Vae={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Hae(e){return e?Vae[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Uae(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function Wae(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Gae(e){let[t]=Uae(e);return Wae(t,45,32)}var Kae=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],qae=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function Jae(){return`${q9(Kae)} ${q9(qae)}`}function Yae(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function Xae(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=Jae(),Y9(G9,n)),r||(r=Yae(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function Zae(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function Qae(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function $ae(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=Zae(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=Z9(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function eoe(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function toe(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function noe(e,t,n=null,r=`.md`){let i=Q9(e);i.pop();let a=Q9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${l}${r}${n?`#${n}`:``}`}function roe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function ioe(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{r0 as $,r6 as $n,yb as $r,U2 as $t,O1 as A,$l as Ai,n8 as An,Bte as Ar,C2 as At,T0 as B,E as Bi,$9 as Bn,ES as Br,j2 as Bt,Q1 as C,zu as Ci,y2 as Cn,t9 as Cr,w4 as Ct,Gre as D,iu as Di,l8 as Dn,L2 as Dr,wie as Dt,v9 as E,cu as Ei,Hae as En,n9 as Er,Mie as Et,W9 as F,Lu as Fi,e8 as Fn,iE as Fr,a1 as Ft,R1 as G,h as Gi,s0 as Gn,YS as Gr,$ae as Gt,F0 as H,Ke as Hi,k4 as Hn,uC as Hr,Eae as Ht,$3 as I,Wu as Ii,a8 as In,IE as Ir,C1 as It,R2 as J,E2 as Jn,dx as Jr,d1 as Jt,pre as K,j0 as Kn,Hb as Kr,eoe as Kt,iie as L,ea as Li,o8 as Ln,HE as Lr,O2 as Lt,D2 as M,sd as Mi,i8 as Mn,ck as Mr,S4 as Mt,T2 as N,id as Ni,s8 as Nn,sk as Nr,Qae as Nt,_ie as O,au as Oi,u8 as On,O9 as Or,Q4 as Ot,Yre as P,Eu as Pi,r8 as Pn,CE as Pr,_1 as Pt,u0 as Q,Bre as Qn,XS as Qr,W2 as Qt,yne as R,M as Ri,s$ as Rn,NE as Rr,E4 as Rt,hie as S,su as Si,Xae as Sn,C0 as Sr,Pie as St,T9 as T,du as Ti,n6 as Tn,g$ as Tr,f2 as Tt,Qre as U,ze as Ui,p6 as Un,dC as Ur,Oae as Ut,Z1 as V,We as Vi,d$ as Vn,Nx as Vr,noe as Vt,L1 as W,g as Wi,z1 as Wn,cC as Wr,Dae as Wt,rie as X,J1 as Xn,mx as Xr,Rae as Xt,o0 as Y,h6 as Yn,px as Yr,_0 as Yt,l0 as Z,Vre as Zn,Px as Zr,d4 as Zt,N1 as _,jf as _i,X7 as _n,wae as _r,B4 as _t,die as a,xy as ai,zae as an,f6 as ar,t3 as at,d0 as b,F as bi,Pae as bn,W1 as br,Iie as bt,Xie as c,cy as ci,aae as cn,i3 as cr,Sie as ct,Jie as d,_m as di,a0 as dn,V1 as dr,B1 as dt,Xy as ei,B2 as en,w1 as er,bie as et,Gie as f,bm as fi,k1 as fn,E$ as fr,Nie as ft,P1 as g,Yf as gi,v0 as gn,ioe as gr,V4 as gt,M1 as h,L as hi,$Q as hn,Mae as hr,I4 as ht,uie as i,WS as ii,z2 as in,U1 as ir,n3 as it,m$ as j,Au as ji,c8 as jn,ak as jr,nie as jt,t0 as k,pu as ki,t8 as kn,Wte as kr,b2 as kt,Yie as l,rm as li,iae as ln,v2 as lr,D0 as lt,F1 as m,Qp as mi,Z9 as mn,toe as mr,Y4 as mt,Lae as n,Ix as ni,l4 as nn,z7 as nr,X4 as nt,qre as o,Tv as oi,kae as on,K1 as or,e$ as ot,c1 as p,I as pi,x2 as pn,T$ as pr,j1 as pt,G0 as q,A0 as qn,nx as qr,u1 as qt,e0 as r,sC as ri,V2 as rn,_2 as rr,Z4 as rt,Kie as s,Ov as si,Y6 as sn,roe as sr,K0 as st,Iae as t,tx as ti,H2 as tn,g0 as tr,vie as tt,qie as u,R as ui,Gae as un,b6 as ur,k0 as ut,Y1 as v,P as vi,Bae as vn,w2 as vr,W4 as vt,Cie as w,fu as wi,A1 as wn,a3 as wr,T4 as wt,gie as x,eu as xi,Tre as xn,h$ as xr,Fie as xt,H9 as y,zd as yi,f$ as yn,C4 as yr,b9 as yt,w0 as z,A as zi,$1 as zn,VS as zr,k2 as zt};
|
|
523
|
+
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=B7(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:nre({...i,attributes:(i.attributes??[]).map(ire)},t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=q7(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=B7(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>{if(n)return`>`;let r=s?.[c++];return r===`none`||r===0?`>${e}`:typeof r==`number`&&r>=2&&!e.startsWith(` `)?`>${` `.repeat(r)}${e}`:`> ${e}`})}};function B7(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){n.value.includes(`"`)?t.push(`${e}={${V7(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function V7(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function ire(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:V7(e.value)}}:e}function H7(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function U7(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function are(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>ore(t)?e:`\\${e}`)}function ore(e){if(e.charCodeAt(0)!==35)return!1;let t=e[1]===`x`||e[1]===`X`?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return t===9||t===10||t===11||t===12||t===13||t===32}function W7(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character==="`"||(e.character===`*`||e.character===`_`||e.character===`~`)&&e.inConstruct===`phrasing`||e.character===`=`&&e.atBreak===!0||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return are(ure(i,n))}var G7=1,sre=2;function K7(e){if(Number.isNaN(e))return`ws`;let t=Cz(e);return t===G7?`ws`:t===sre?`punct`:`other`}function cre(e,t,n){let r=K7(t),i=K7(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function lre(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
|
|
524
|
+
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function ure(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&lre(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=cre(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function q7(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);J7(i.charCodeAt(i.length-1),s,r)&&(o=Y7(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return J7(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+Y7(c)),o}function J7(e,t,n){return!(Cz(t)!==G7||n===`_`&&Cz(e)===void 0)}function Y7(e){return`&#x${e.toString(16).toUpperCase()};`}function dre(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!pre(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function fre(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=q7(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function pre(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function X7(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var mre=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=dx(e.extensions),this.handlers=bre(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=xre(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Gne({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Kne({toMarkdownHandlers:rre})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Jne(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Yne(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?y8(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return Xne(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},Z7=X6();function hre(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function gre(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function _re(e){return e.attrs.sourceDirty||gre(e)}function vre(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function Q7(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function $7(e,t){if(e.length===0)return Q7({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return Q7({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[$7(n.children,t)]}}return Q7({type:`inlineCode`,value:e9(e)},t)}function e9(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=e9(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var yre=iu;function bre(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=dW(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=dW(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=z7(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&i2(t.raw)!==null&&t2(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset).replaceAll(`\xA0`,` `);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=i2(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u).replaceAll(`\xA0`,` `);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=fW(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=fW(r.highlight)),r.comment&&(i.comment=fW(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=dW(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=fW(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=fW(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=dW(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=dW(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=dW(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=Z7.getOrWildcard(o),c=hre(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=z7(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=x2(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&yre.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&au.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&su.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&cu.has(l)&&n.jsxComponent&&Z7.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:X7(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=dW(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function xre(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=_W(`paragraph`)),r.blockquote&&(t.blockquote=_W(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=_W(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=_W(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&vre(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),r.tableRow&&(t.tableRow=_W(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=_W(`tableCell`,a)),r.tableHeader&&(t.tableHeader=_W(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!_re(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:Z7.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:Z7,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=vW(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=vW(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return $7(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=vW(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return i.highlight&&(n.highlight=vW(`mark`)),i.comment&&(n.comment=vW(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=_W(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=_W(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return o2(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var Sre=/\p{M}+/gu,t9=/[^\p{L}\p{N}]+/gu,Cre=/^-+|-+$/g;function n9(e){return e.trim().normalize(`NFKD`).replace(Sre,``).toLowerCase().replace(t9,`-`).replace(Cre,``)}function wre(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Tre(e,t){let n=n9(e);return n?wre(n,t):``}function r9(e,t){let n=n9(e);return t?`#${n}-${n9(t)}`:`#${n}`}var i9=new Set([`img`,`video`,`audio`,`mark`]),Ere=new Map(J6.flatMap(e=>e.surface===`compat`&&i9.has(e.rendersAs)?[[e.name,e]]:[]));function a9(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function o9(e){let t=e.name;if(!t||!i9.has(t))return null;let n=a9(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function s9(e){let t=e.name;if(!t)return null;let n=Ere.get(t);if(!n)return null;let r=a9(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Dre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:r9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Ore=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:r9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},kre=(e,t)=>{let n=t,r=o9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=s9(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},Are=(e,t)=>{let n=t,r=o9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=s9(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},jre=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Mre=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function c9(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(c9).join(``):``}var l9={wikiLink:Dre,wikiLinkEmbed:Ore,mdxJsxFlowElement:kre,mdxJsxTextElement:Are,rawMdxFallback:jre,mark:Mre,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:c9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:c9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Nre=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Pre=/\bexpression\s*\(/i,Fre=1e4;function Ire(e){return!(e.length>Fre||Nre.test(e)||Pre.test(e))}function u9(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!A0(e.split(/\s+/)[0]??``))return!1}return!0}var Lre={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Rre=new Set([`href`,`src`]),zre=wV(`<>`),d9=()=>e=>{QF(e,`element`,e=>{let t=Lre[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?f5(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Rre.has(e))if(t===`<>`||t===zre)r=``;else{let e=f5(t);r=e===t?t:wV(e)}else r=f5(t);r!==t&&(n[e]=r)}})},f9=()=>e=>{QF(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!A0(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!A0(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!A0(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!u9(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!u9(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!A0(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!Ire(r)&&delete n.style})};function Bre(e){let t=HU().use(fY,{handlers:l9}).use(d9).use(f9).use(TJ),n=t.runSync(e);return String(t.stringify(n))}function Vre(e){let t=HU().use(BG).use(zW,[`yaml`]).use(y7).use(NU).use(N7).use(fY,{handlers:l9}).use(d9).use(f9).use(TJ);return String(t.processSync(e))}Dq(),BK(),VK(),A({docName:j4,summary:N4,content:E().optional(),...M4}).loose(),A({docName:j4,summary:N4,markdown:E(),position:j([`append`,`prepend`,`replace`]).optional(),extension:j(X1).optional(),...M4}).loose(),A({docName:j4,summary:N4,find:E().min(1),replace:E(),offset:D().int().nonnegative().optional(),...M4}).loose(),A({docName:j4,connectionId:E().min(1),scope:j([`last`,`session`,`file`]).optional(),...M4}).loose();var p9=A({value:E(),truncatedFrom:D().int().nonnegative().optional(),hint:E().optional()}).loose(),Hre=Ia(`kind`,[A({kind:M(`inline`),content:E()}),A({kind:M(`truncated`),byteLength:D().int().nonnegative(),hint:E()})]),m9=A({kind:M(`content-divergence`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),divergenceType:E().optional(),currentState:Hre.optional(),hint:E().optional()}).loose(),Ure=A({type:M(`orphan`),parentCandidates:k(E()),message:E()}).loose(),h9=A({kind:M(`disk-edit-reconciled`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),mergeOutcome:E().optional(),hint:E().optional()}).loose(),g9=Ia(`kind`,[m9,h9]),_9=k(Ia(`kind`,[m9,h9,A({kind:M(`mermaid-parse-error`),fenceIndex:D().int().positive(),fenceFirstLine:E(),message:E(),line:D().int().positive().optional()}).loose()])).min(1),v9=k(A({href:E(),resolvedTo:E().nullable(),reason:j([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose());A({timestamp:E().min(1),summary:p9.optional(),warning:g9.optional(),warnings:_9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),hints:k(Ure).optional(),summary:p9.optional(),warning:g9.optional(),warnings:_9.optional(),brokenLinks:v9}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),summary:p9.optional(),warning:g9.optional(),warnings:_9.optional(),brokenLinks:v9}).loose(),A({docName:E().min(1),scope:j([`last`,`session`]),undone:O()}).loose(),A({docName:j4,patch:Ba(E(),Pa([i$,Ta()])),types:Ba(E(),j(t$)).optional(),summary:N4,...M4}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),appliedKeys:k(E()),summary:p9.optional(),warning:g9.optional(),warnings:_9.optional(),brokenLinks:v9}).loose(),A({entries:k(A({level:j([`info`,`warn`,`error`]),message:E().max(n3),event:E().optional(),fields:Ba(E(),Da()).optional(),ts:D().optional(),sourceId:E().optional(),lineNumber:D().optional()}).loose()).max(100)}).loose(),A({accepted:D().int().min(0)}).loose();var Wre=A({status:E().min(1),reason:E()}).loose();A({docName:E().min(1),content:E(),lifecycle:Wre.nullable()}).loose();var y9=A({kind:j([`document`,`asset`,`folder`,`file`]).default(`document`),docName:E().min(1).optional(),docExt:E().min(1).default(`.md`),size:D().int().nonnegative(),modified:E().min(1),isSymlink:O().default(!1),canonicalDocName:E().nullable().default(null),targetPath:E().nullable().default(null),path:E().min(1).optional(),assetExt:E().min(1).optional(),mediaKind:j([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:k(E().min(1)).optional(),hasChildren:O().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Gre=A({documents:k(y9),truncated:O().optional()}).loose(),Kre=A({source:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),qre=A({docName:E().min(1),backlinks:k(Kre)}).loose();A({counts:Ba(E().min(1),D().int().nonnegative())}).loose();var Jre=Ia(`kind`,[A({kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),A({kind:M(`external`),url:E().min(1),title:E(),snippet:E().nullable()}).loose()]),Yre=A({docName:E().min(1),forwardLinks:k(Jre)}).loose(),Xre=Ia(`kind`,[A({id:E().min(1),kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),label:E(),cluster:E().nullable(),category:E().nullable(),tags:k(E()).nullable()}).loose(),A({id:E().min(1),kind:M(`external`),url:E().min(1),label:E()}).loose()]),Zre=A({source:E().min(1),target:E().min(1)}).loose(),Qre=A({nodes:k(Xre),links:k(Zre)}).loose(),$re=A({ts:D().int().min(0),url:E(),method:E(),ua:E().optional(),origin:E().optional(),referer:E().optional(),host:E().optional(),remote:E().optional(),secChUa:E().optional(),secChUaMobile:E().optional(),secChUaPlatform:E().optional(),secFetchSite:E().optional(),secFetchDest:E().optional(),secFetchMode:E().optional(),secFetchUser:E().optional()}).loose(),eie=A({app:Pa([M(`cursor`),M(`codex`),M(`claude`),Ta()]),signals_fired:k(E())}).loose();A({entries:k($re),count:D().int().min(0),detection:eie}).loose(),A({writers:k(A({id:E().min(1),name:E().optional(),email:E().optional()}).loose()).optional(),summary:N4,...M4}).loose(),A({checkpointRef:E().min(1)}).loose();var tie=A({v:D().int().optional(),id:E().min(1),name:E().min(1),colorSeed:E().optional(),docs:k(E()),summaries:k(E()).optional()}).loose();A({entries:k(A({sha:E().min(1),timestamp:E().min(1),author:E(),authorEmail:E(),type:j([`checkpoint`,`wip`,`upstream`,`park`]),message:E(),contributors:k(tie),checkpoint:Da().nullable()}).loose()),total:D().int().nonnegative().optional(),truncated:O().optional(),hasMore:O().optional()}).loose(),A({sha:E().regex(/^[0-9a-f]{40}$/i),content:E(),timestamp:E(),author:E()}).loose();var nie=A({contentDir:E().min(1),pathSeparator:j([`/`,`\\`]),symlinkResolved:O()}).loose();k(Ia(`source`,[A({docName:E().min(1),timestamp:E().min(1),size:D().int().nonnegative(),source:M(`flat`)}).loose(),A({docName:E().min(1),timestamp:E().min(1),source:M(`timeline`),sha:E().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var rie=A({orphans:k(A({docName:E().min(1),title:E()}).loose())}).loose(),iie=A({hubs:k(A({docName:E().min(1),title:E(),count:D().int().nonnegative()}).loose())}).loose(),aie=A({source:E().min(1),title:E(),snippet:E().nullable()}).loose();A({deadLinks:k(A({target:E().min(1),sources:k(aie)}).loose())}).loose(),A({target:A({docName:E().min(1),title:E(),aliases:k(E())}).loose(),mentions:k(A({source:E().min(1),excerpt:E(),offset:D().int().nonnegative()}).loose()),truncated:O()}).loose(),A({projectPath:E().min(1)}).loose();var oie=j([`not-a-git-worktree`,`init-failed`]);Ia(`ok`,[A({ok:M(!0),projectPath:E().min(1)}).loose(),A({ok:M(!1),reason:oie,message:E().min(1)}).loose()]),A({host:E().min(1).optional()}).loose(),A({key:E().min(1)}).loose(),A({keyPresent:O()}).loose(),A({name:E().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:E().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),A({authenticated:O()}).loose(),A({}).loose();var sie=A({stackIndex:D().int().min(0),ts:D().int().min(0),additions:D().int().min(0),deletions:D().int().min(0)}).loose(),cie=A({docName:E().min(1),additionsTotal:D().int().min(0),deletionsTotal:D().int().min(0),lastTs:D().int().min(0),bursts:k(sie)}).loose(),lie=A({displayName:E().min(1),color:E().min(1),icon:E().optional(),connectionId:E().min(1)}).loose(),uie=A({sessionAlive:O(),agent:lie.nullable(),files:k(cie)}).loose(),die=A({diff:E(),generatedAt:D().int().min(0)}).loose();A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose();var fie=A({displayName:E().min(1),icon:E(),color:E().min(1),currentDoc:E().nullable(),mode:j([`idle`,`writing`]),ts:D().int().min(0)}).loose();A({presence:Ba(E().min(1),fie)}).loose(),Ba(E().min(1),O()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),A({path:E().min(1,`path must be non-empty`)}).loose(),A({}).loose();var pie=A({fromDocName:E().min(1),toDocName:E().min(1)}).loose(),mie=A({fromPath:E().min(1),toPath:E().min(1)}).loose();A({}).loose(),A({path:E().min(1),...M4,summary:N4}).loose();var hie=A({docName:E().min(1)}).loose();A({path:E().min(1),...M4,summary:N4}).loose();var gie=A({path:E().min(1)}).loose();A({kind:j([`file`,`folder`]),path:E().min(1),...M4,summary:N4}).loose();var _ie=A({kind:j([`file`,`folder`]),path:E().min(1),duplicatedDocNames:k(E().min(1))}).loose(),vie=A({pages:k(A({docName:E().min(1),title:E(),docExt:E().min(1),size:D().int().nonnegative(),modified:E().min(1),icon:E().min(1).max(2048).optional()}).loose())}).loose(),yie=A({level:D().int().min(1).max(6),text:E(),slug:E()}).loose(),bie=A({docName:E().min(1),headings:k(yie)}).loose(),xie=A({docName:E().min(1),rewrites:D().int().nonnegative()}).loose();A({kind:j([`file`,`folder`,`asset`]),fromPath:E().min(1),toPath:E().min(1),...M4,summary:N4}).loose();var Sie=A({renamed:k(pie),renamedAssets:k(mie),rewrittenDocs:k(xie).optional(),summary:p9.optional()}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...M4}).loose();var Cie=A({deletedDocNames:k(E().min(1))}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...M4,summary:N4}).loose();var wie=A({deletedDocNames:k(E().min(1))}).loose();A({docName:E().min(1),commitSha:E().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:N4,...M4}).loose(),A({restoredFrom:E().min(1),timestamp:E().min(1),summary:p9.optional(),warning:m9.optional(),warnings:_9.optional()}).loose();var Tie=j([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Eie=A({label:E().min(1),webUrl:ia().nullable()}).loose(),Die=Ia(`checkStatus`,[A({checkStatus:M(`allowed`)}).loose(),A({checkStatus:M(`denied`),deniedReason:j([`no-collaborator`,`private-no-access`,`repo-not-found`])}).loose(),A({checkStatus:M(`unknown`),unknownError:j([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`]).optional()}).loose()]),b9=j([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]);A({state:Tie,lastSyncUtc:E().nullable(),lastFetchUtc:E().nullable(),lastPushedSha:E().nullable(),ahead:D().int().min(0),behind:D().int().min(0),consecutiveFailures:D().int().min(0),conflictCount:D().int().min(0),hasRemote:O(),syncEnabled:O(),identityUnresolved:O(),remote:Eie.nullable().optional(),pushError:E().optional(),pushErrorCode:b9.optional(),pullError:E().optional(),pullErrorCode:b9.optional(),pausedReason:E().optional(),pushPermission:Die.optional()}).loose(),A({op:j([`sync`,`push`,`pull`]).optional()}).loose(),A({op:j([`sync`,`push`,`pull`])}).loose(),A({conflicts:k(A({file:E().min(1),detectedAt:E().min(1),oursSha:E().optional(),theirsSha:E().optional(),baseSha:E().optional()}).loose())}).loose(),A({file:E().min(1),strategy:j([`mine`,`theirs`,`content`,`delete`]),content:E().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),A({}).loose(),A({file:E().min(1),base:E(),ours:E(),theirs:E(),kind:j([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:E().nullable()}).loose(),A({plan:po(e=>e!==void 0,{message:`plan is required`})}).loose(),A({plan:po(e=>e!==void 0,{message:`plan is required`})}).loose(),A({result:po(e=>e!==void 0,{message:`result is required`})}).loose();var Oie=A({path:E().min(1),summary:E().min(1)}).loose(),kie=A({files:D().int().nonnegative(),folders:D().int().nonnegative()}).loose();A({packs:k(A({id:E().min(1),name:E().min(1),description:E().min(1),defaultSubfolder:E().optional(),folders:k(Oie),entryCounts:kie}).loose())}).loose(),A({noOpen:O().optional(),out:E().min(1).optional()}).loose();var Aie=A({reason:j([`unsupported-platform`,`spawn-error`]),message:E()}).loose();Ia(`status`,[A({status:M(`installed`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E()}).loose(),A({status:M(`built`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E(),handoffError:Aie.optional()}).loose(),A({status:M(`failed`),buildError:E()}).loose(),A({status:M(`skip-current`),skillVersion:E(),recordedAt:E().optional()}).loose()]);var x9=j(r0);Ma({schema:M(1),targets:k(x9).default([])}),A({tags:k(A({name:E().min(1),count:D().int().nonnegative(),isLeaf:O()}).loose())}).loose();var jie=A({docName:E().min(1),title:E(),matchingTags:k(E().min(1)),snippet:E().nullable()}).loose();A({name:E().min(1),docs:k(jie)}).loose(),A({folder:Da(),frontmatter_local:Ba(E(),Da()).nullable()}).loose(),A({path:E(),frontmatter:Ba(E(),Da()).optional()}).loose(),A({applied:Da()}).loose();var S9=Ba(E(),Da()).meta({description:`Free-form frontmatter map embedded in template payloads.`});A({template:A({name:E().min(1),folder:E(),scope:j([`local`,`inherited`]),path:E().min(1),frontmatter:S9,body:E()}).strict()}).strict();var Mie=A({templates:k(A({name:E().min(1),title:E().optional(),description:E().optional(),path:E().min(1),source_folder:E()}).strict()),truncated:O()}).strict();A({folder:E(),name:E(),body:E().optional(),frontmatter:S9.optional(),...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({fromFolder:E(),fromName:E(),toFolder:E(),toName:E(),body:E().optional(),frontmatter:S9.optional(),...M4,summary:N4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict();var C9=j(R1),Nie=/^[a-z0-9-]+$/,Pie=/^[A-Za-z0-9_-]+$/,w9=A({name:E(),description:E()}).strict();A({skill:A({name:E().min(1),scope:C9,path:E().min(1),frontmatter:w9,body:E(),files:k(A({path:E().min(1),text:E().nullable()})).optional()}).strict()}).strict();var Fie=A({skills:k(A({name:E().min(1),description:E().optional(),scope:C9,path:E().min(1),absolutePath:E().min(1).optional(),installed:O(),hosts:k(E()),installedVersion:E().optional(),bundledVersion:E().optional(),updateAvailable:O().optional()}).strict()),truncated:O()}).strict();A({scope:C9.default(`project`),name:E(),body:E().optional(),frontmatter:w9,...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({scope:C9.default(`project`),name:E(),...M4,summary:N4}).strict(),A({name:E().min(1),version:E().min(1),previousVersion:E().optional(),checkpointRef:E().optional()}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({scope:C9.default(`project`),fromName:E(),toName:E(),body:E().optional(),frontmatter:w9.optional(),...M4,summary:N4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict();var T9=j([`reference`,`script`]);A({scope:C9.default(`project`),name:E(),path:E().min(1),content:E(),...M4,summary:N4}).strict(),A({path:E().min(1),created:O(),kind:T9,content:O()}).strict(),A({path:E().min(1),kind:T9,text:E()}).strict(),A({path:E().min(1),existed:O(),kind:T9}).strict(),A({scope:C9.default(`project`),name:E(),targets:k(x9).optional().meta({description:`Explicit editor ids to install into; omit to use project-configured editors.`}),...M4,summary:N4}).strict(),A({name:E().min(1),hosts:k(E()),scripts:O(),warnings:k(E()),warningCodes:k(j([`no-targets`,`scripts-present`]))}).strict(),A({scope:C9.default(`project`),name:E()}).strict(),A({name:E().min(1),uninstalled:O()}).strict();var Iie=A({targets:k(x9),configured:O()}).strict();A({targets:k(x9)}).strict(),A({targets:k(x9),reprojected:k(A({name:E(),hosts:k(E())}).strict()),bundleHosts:k(E()),removedFrom:k(E())}).strict(),A({scope:C9.default(`project`),name:E(),version:E().regex(/^[0-9a-f]{40}$/i),...M4,summary:N4}).strict(),A({name:E().min(1),version:E(),restoredFiles:k(E()),warnings:k(E())}).strict(),A({query:E().optional(),intent:j([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:j([`navigation`,`relevance`]).optional(),scopes:k(j([`page`,`folder`,`content`,`file`])).optional(),scope:E().optional(),limit:D().int().nonnegative().optional(),semantic:O().optional(),source:j([`omnibar`,`mcp`,`http`]).optional()}).loose();var Lie=A({kind:j([`page`,`folder`,`content`,`file`]),path:E().min(1),title:E(),score:D(),signals:Ba(E(),Da()),snippet:E().optional()}).loose(),Rie=A({capable:O(),applied:O(),coverage:A({embedded:D().int().nonnegative(),total:D().int().nonnegative()})}).loose();A({enabled:O(),keyPresent:O(),keySource:j([`file`,`env`]).nullable(),keyHint:E().nullable(),ready:O(),capable:O(),embedded:D().int().nonnegative(),total:D().int().nonnegative()}).loose(),A({query:E(),intent:j([`autocomplete`,`full_text`,`omnibar`]),results:k(Lie),elapsedMs:D().nonnegative(),semantic:Rie.optional(),truncated:O().optional(),ready:O().optional()}).loose();var zie=A({version:E().min(1),recordedAt:E().min(1)}).loose();A({currentVersion:E().min(1),targets:Ba(E(),zie.nullable())}).loose();var Bie=`server-info`,Vie=`branch-switched`,Hie=`disk-ack`,Uie=`config-validation-rejected`,Wie=`config-ignore-nested-error`,E9=j([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),Gie=A({v:M(1),ch:M(Bie),seq:D(),serverInstanceId:E().min(1),currentBranch:E().min(1).optional()}).loose(),Kie=A({v:M(1),ch:M(Vie),seq:D(),branch:E().min(1)}).loose(),qie=A({v:M(1),ch:E9,seq:D()}).loose(),Jie=A({v:M(1),ch:M(Hie),seq:D(),docName:E().min(1),sv:E().min(1)}).loose(),Yie=A({v:M(1),ch:M(Uie),seq:D(),docName:E().min(1),error:rd}).loose(),Xie=A({v:M(1),ch:M(Wie),seq:D(),path:E().min(1),error:E().min(1)}).loose(),Zie=100,Qie=500,$ie=450,eae={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},D9=new WeakMap;function tae(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function O9(e){return e.trim().toLowerCase()}var nae=/\.(?:md|mdx)$/;function rae(e,t){if(t!==`page`)return e;let n=e.replace(nae,``);return n.length>0?n:e}function k9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function iae(e){let t=k9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function A9(e){let t=oQ({schema:eae});return e.length>0&&_Q(t,e),t}function aae(e){let t={documents:e};return D9.set(t,A9(e)),t}function oae(e){let t=D9.get(e);if(t)return t;let n=A9(e.documents);return D9.set(e,n),n}function sae(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function j9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function cae(e,t){let n=O9(t);if(!n)return 0;let r=rae(n,e.kind),i=O9(e.title),a=O9(e.name),o=O9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var lae=.5;function M9(e,t){let n=cae(e,t);return n<=0?n:k4(e.path)?n*lae:n}var uae=60;function dae(e){return e===`file`?-uae:0}var fae=1e3,N9=50,pae=1,mae=1,hae=.001;function gae(e,t,n,r,i){let a=i>0?t/i:0,o=N9>0?n/N9:0,s=r===`file`?-hae:0,c=pae*a+mae*o+s;return e*fae+c}function P9(e,t,n,r){return e+t*20+n+dae(r)}function F9(e,t,n,r,i,a){return e===`relevance`?P9(t,n,r,i):gae(t,n,r,i,a)}function _ae(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function I9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function vae(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function yae(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function bae(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function xae(e,t){return O9(t).length<4?0:+(e===`full_text`)}function Sae(e){let{lexical:t,fullText:n}=e.signals;return t>=Qie?`lexical`:t===$ie&&n<=0?`pathOnly`:`body`}function Cae(e){let t=[],n=[],r=[];for(let i of e){let e=Sae(i);e===`lexical`?t.length<Zie&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function L9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Cae(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function wae(e,t,n={}){let r=n.intent??`omnibar`,i=_ae(r,n.ranking),a=tae(n.limit),o=new Set(n.scopes??sae(r)),s=e.documents.filter(e=>j9(e,o)),c=O9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=qQ(oae(e),{term:c,properties:yae(r),boost:bae(r),tolerance:xae(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>j9(e.document,o)).map(e=>[e.document.id,e.score])),d=vae(s),f=new Map;for(let e of s)M9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)j9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=I9(f.values(),u);return L9([...f.values()].map(t=>{let n=Math.max(0,M9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:F9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return L9(Tae({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function R9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Tae(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=I9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,M9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?F9(o,t,n,s,e.kind,m):P9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=R9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=R9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function Eae(e){return`https://github.com/${e.owner}/${e.repo}.git`}function Dae(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var z9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),B9=globalThis;B9[z9]===void 0&&(B9[z9]=fr());var V9=B9[z9],H9=Ma({version:E().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(V9,{description:`Recorded skill version for this target.`}),recordedAt:Oi().register(V9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:j([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(V9,{description:`Install-source surface that recorded this entry.`}).optional()});Ma({schema:M(1).register(V9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ma({"claude-cowork":H9.optional(),"cli-hosts":H9.optional()}).register(V9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var U9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function Oae(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??kae,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new U9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function kae(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Aae(){let e=!1,t=``,n=0;return r=>{let i=jae(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function jae(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function Mae(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Nae(e){if(typeof e!=`string`||e.length===0)return e;let t=x6(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(g6(e)){let t=Mae(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=p6(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Pae=`https://api.github.com/repos/inkeep/open-knowledge`;async function Fae(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Pae,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var Iae=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Lae={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Rae={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function zae(e,t=Iae){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Bae(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Vae(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Hae={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Uae(e){return e?Hae[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Wae(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function Gae(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Kae(e){let[t]=Wae(e);return Gae(t,45,32)}var qae=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],Jae=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function Yae(){return`${q9(qae)} ${q9(Jae)}`}function Xae(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function Zae(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=Yae(),Y9(G9,n)),r||(r=Xae(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function Qae(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function $ae(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function eoe(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=Qae(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=Z9(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function toe(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function noe(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function roe(e,t,n=null,r=`.md`){let i=Q9(e);i.pop();let a=Q9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${l}${r}${n?`#${n}`:``}`}function ioe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function aoe(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{r0 as $,i6 as $n,yb as $r,U2 as $t,O1 as A,$l as Ai,r8 as An,Bte as Ar,C2 as At,T0 as B,E as Bi,$9 as Bn,ES as Br,j2 as Bt,Q1 as C,zu as Ci,y2 as Cn,n9 as Cr,w4 as Ct,Gre as D,iu as Di,u8 as Dn,L2 as Dr,wie as Dt,y9 as E,cu as Ei,Uae as En,r9 as Er,Mie as Et,W9 as F,Lu as Fi,t8 as Fn,iE as Fr,a1 as Ft,R1 as G,h as Gi,s0 as Gn,YS as Gr,eoe as Gt,F0 as H,Ke as Hi,k4 as Hn,uC as Hr,Eae as Ht,e6 as I,Wu as Ii,o8 as In,IE as Ir,C1 as It,R2 as J,E2 as Jn,dx as Jr,d1 as Jt,mre as K,j0 as Kn,Hb as Kr,toe as Kt,iie as L,ea as Li,s8 as Ln,HE as Lr,O2 as Lt,D2 as M,sd as Mi,a8 as Mn,ck as Mr,S4 as Mt,T2 as N,id as Ni,c8 as Nn,sk as Nr,$ae as Nt,_ie as O,au as Oi,d8 as On,k9 as Or,$4 as Ot,Yre as P,Eu as Pi,i8 as Pn,CE as Pr,_1 as Pt,u0 as Q,Bre as Qn,XS as Qr,W2 as Qt,bne as R,M as Ri,s$ as Rn,NE as Rr,E4 as Rt,hie as S,su as Si,Zae as Sn,C0 as Sr,Pie as St,E9 as T,du as Ti,r6 as Tn,g$ as Tr,f2 as Tt,Qre as U,ze as Ui,m6 as Un,dC as Ur,Oae as Ut,Z1 as V,We as Vi,d$ as Vn,Nx as Vr,roe as Vt,L1 as W,g as Wi,z1 as Wn,cC as Wr,Dae as Wt,rie as X,J1 as Xn,mx as Xr,zae as Xt,o0 as Y,g6 as Yn,px as Yr,_0 as Yt,l0 as Z,Vre as Zn,Px as Zr,d4 as Zt,N1 as _,jf as _i,X7 as _n,wae as _r,B4 as _t,die as a,xy as ai,Bae as an,p6 as ar,n3 as at,d0 as b,F as bi,Fae as bn,W1 as br,Iie as bt,Xie as c,cy as ci,aae as cn,a3 as cr,Sie as ct,Jie as d,_m as di,a0 as dn,V1 as dr,B1 as dt,Xy as ei,B2 as en,w1 as er,bie as et,Gie as f,bm as fi,k1 as fn,E$ as fr,Nie as ft,P1 as g,Yf as gi,v0 as gn,aoe as gr,V4 as gt,M1 as h,L as hi,$Q as hn,Nae as hr,I4 as ht,uie as i,WS as ii,z2 as in,U1 as ir,r3 as it,m$ as j,Au as ji,l8 as jn,ak as jr,nie as jt,t0 as k,pu as ki,n8 as kn,Wte as kr,b2 as kt,Yie as l,rm as li,iae as ln,v2 as lr,D0 as lt,F1 as m,Qp as mi,Z9 as mn,noe as mr,X4 as mt,Rae as n,Ix as ni,l4 as nn,z7 as nr,Z4 as nt,qre as o,Tv as oi,Aae as on,K1 as or,e$ as ot,c1 as p,I as pi,x2 as pn,T$ as pr,j1 as pt,G0 as q,A0 as qn,nx as qr,u1 as qt,e0 as r,sC as ri,V2 as rn,_2 as rr,Q4 as rt,Kie as s,Ov as si,X6 as sn,ioe as sr,K0 as st,Lae as t,tx as ti,H2 as tn,g0 as tr,vie as tt,qie as u,R as ui,Kae as un,x6 as ur,k0 as ut,Y1 as v,P as vi,Vae as vn,w2 as vr,W4 as vt,Cie as w,fu as wi,A1 as wn,o3 as wr,T4 as wt,gie as x,eu as xi,Tre as xn,h$ as xr,Fie as xt,U9 as y,zd as yi,f$ as yn,C4 as yr,x9 as yt,w0 as z,A as zi,$1 as zn,VS as zr,k2 as zt};
|