squidclaw 3.0.20 → 3.0.22
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/{accounts-s5e9zidf.js → accounts-C7pGQPcS.js} +2 -2
- package/dist/{accounts-Bkb-J8V6.js → accounts-DjhBQg_8.js} +2 -2
- package/dist/{accounts-B6F_XCgS.js → accounts-DwGoZKGm.js} +17 -17
- package/dist/{active-listener-6-Svu8Dx.js → active-listener-DPc_PGsA.js} +2 -2
- package/dist/{agents-BOS_wASV.js → agents-DXKtU4Il.js} +4 -4
- package/dist/{agents.config-ChUZBohP.js → agents.config-BM-2SLCh.js} +1 -1
- package/dist/{agents.config-Dfsl4jNF.js → agents.config-eMSUW-iw.js} +1 -1
- package/dist/{api-key-rotation-TRwuCWbu.js → api-key-rotation-DVyYtQxC.js} +2 -2
- package/dist/{audio-preflight-DZ1LNMJp.js → audio-preflight-xfe9w6_6.js} +32 -32
- package/dist/{audio-transcription-runner-B3u2x_ja.js → audio-transcription-runner-CqKnvAJf.js} +12 -12
- package/dist/{audit-membership-runtime-w23FnNAN.js → audit-membership-runtime-DyLj-uhz.js} +4 -4
- package/dist/{auth-choice-B_pvWO2S.js → auth-choice-CXepQc7c.js} +1 -1
- package/dist/{auth-choice-kUm2JAky.js → auth-choice-D2JrMJn-.js} +1 -1
- package/dist/{banner-4LItBqCV.js → banner-DMfuBV69.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +687 -51
- package/dist/canvas-host/a2ui/a2ui.bundle.js +1 -17815
- package/dist/{channel-activity-CxJbx4sD.js → channel-activity-CPpt4XaL.js} +3 -3
- package/dist/{channel-options-DA-4IR6h.js → channel-options-CQ-gER0J.js} +1 -1
- package/dist/{channel-options-DQeQl3Rk.js → channel-options-SijIkAlT.js} +1 -1
- package/dist/{channel-web--dAjVoio.js → channel-web-7t1a2N13.js} +1 -1
- package/dist/{channel-web-DJ21CAFF.js → channel-web-LLzBxZrT.js} +1 -1
- package/dist/{channels-cli-QvrLGt6C.js → channels-cli-D4xUEYYC.js} +6 -6
- package/dist/{channels-cli-DviJtKuS.js → channels-cli-DYaFNMme.js} +6 -6
- package/dist/{chrome-Dxm25ptH.js → chrome-x5E5XzEB.js} +18 -18
- package/dist/{cli-aCubMdJg.js → cli-CAID9zkL.js} +1 -1
- package/dist/{cli-q7seQ2Xx.js → cli-Dlc9IFWZ.js} +1 -1
- package/dist/{command-registry-C_YMaVul.js → command-registry-AHS8_9da.js} +9 -9
- package/dist/{commands-registry-B44COZFz.js → commands-registry-BJjv8_oR.js} +4 -4
- package/dist/{completion-cli-CyKEJDPO.js → completion-cli-B8xjpHDs.js} +1 -1
- package/dist/{completion-cli-w4XQjhDI.js → completion-cli-BR1r9_h4.js} +2 -2
- package/dist/{config-cli-BhQXEuBv.js → config-cli-D0A8Awoo.js} +1 -1
- package/dist/{config-cli-BfhjWCvB.js → config-cli-D4Rxoozg.js} +1 -1
- package/dist/{configure-Dsg_0ymU.js → configure-DOiI8_8c.js} +3 -3
- package/dist/{configure-0xkYrQ0e.js → configure-XmOqwwy9.js} +3 -3
- package/dist/control-ui/assets/{index-cM5P_3w7.js → index-BqxuPQOl.js} +2 -2
- package/dist/control-ui/assets/{index-cM5P_3w7.js.map → index-BqxuPQOl.js.map} +1 -1
- package/dist/control-ui/index.html +1 -1
- package/dist/{deliver-BcnsjbAB.js → deliver-h7T-Od1d.js} +21 -21
- package/dist/deliver-runtime-BKO22_He.js +36 -0
- package/dist/deps-send-discord.runtime-GIuvX7Xw.js +26 -0
- package/dist/deps-send-imessage.runtime-B3TC7G80.js +25 -0
- package/dist/deps-send-signal.runtime-CuVJyw7n.js +24 -0
- package/dist/deps-send-slack.runtime-cbfFoLZ4.js +22 -0
- package/dist/deps-send-telegram.runtime-CRyP-xDQ.js +27 -0
- package/dist/{deps-send-whatsapp.runtime-BNAJe11S.js → deps-send-whatsapp.runtime-CETLGt-t.js} +3 -3
- package/dist/{deps-send-whatsapp.runtime-qBpqM2k9.js → deps-send-whatsapp.runtime-CrxkfP31.js} +2 -2
- package/dist/deps-send-whatsapp.runtime-DIdFPzJE.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-BGDIgEzh.js → deps-send-whatsapp.runtime-__ogpmJj.js} +3 -3
- package/dist/{diagnostic-C2lklhkn.js → diagnostic-CnVwZNbm.js} +2 -2
- package/dist/{doctor-completion-BlkbgU5h.js → doctor-completion-CZoEdMS-.js} +1 -1
- package/dist/{doctor-completion-BCQdm02b.js → doctor-completion-DhLEFUhN.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{errors-DfgAh2Ml.js → errors-kkRuS2Cs.js} +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-b8tSR7_e.js → fetch-DP-JjB6Z.js} +5 -5
- package/dist/{fetch-guard-D16tjNsZ.js → fetch-guard-BDy975wP.js} +2 -2
- package/dist/{frontmatter-CjKtFduT.js → frontmatter-Cq1TcIQ2.js} +3 -3
- package/dist/{fs-safe-CwHbZdFH.js → fs-safe-BoB4X3GD.js} +4 -4
- package/dist/{gateway-cli-tFwyE4a3.js → gateway-cli-BJHBChfI.js} +8 -8
- package/dist/{gateway-cli-uWj08vdf.js → gateway-cli-BpHskeDd.js} +8 -8
- package/dist/{github-copilot-token-Cw3tAXM9.js → github-copilot-token-B5cPlwaz.js} +7 -7
- package/dist/{health-BwC4Qe5W.js → health-TmpUGSqu.js} +1 -1
- package/dist/{health-DS3reqch.js → health-XFKFZ7ZJ.js} +1 -1
- package/dist/{hooks-cli-oei5kRQM.js → hooks-cli-CXsZK8H9.js} +2 -2
- package/dist/{hooks-cli-tp5LchRL.js → hooks-cli-DsDV-Pxz.js} +2 -2
- package/dist/{image-C-8Kd2Mh.js → image-Cepp_eYU.js} +6 -6
- package/dist/{image-ops-BoN1E_WZ.js → image-ops-Dg8iraUV.js} +2 -2
- package/dist/image-runtime-BTfDy-um.js +29 -0
- package/dist/index.js +6 -6
- package/dist/{ir-Dut0zXyS.js → ir-CKK03mBV.js} +8 -8
- package/dist/{legacy-names-B0wgIP0Q.js → legacy-names-aGJJuzM_.js} +1 -1
- package/dist/llm-slug-generator.js +51 -51
- package/dist/{logger-oGKcCLZ5.js → logger-CnTSBL7T.js} +7 -7
- package/dist/{login-DJ357UQV.js → login-CeKDrz6_.js} +5 -5
- package/dist/{login-qr-C0fDBnpM.js → login-qr-KbOpR0GQ.js} +10 -10
- package/dist/{manager-BPGhs30n.js → manager-DINhLnMi.js} +13 -13
- package/dist/manager-runtime-D6ckUNSs.js +18 -0
- package/dist/{model-selection-CHnojCCK.js → model-selection-DuNLFQPR.js} +43 -43
- package/dist/{models-D9X4EUlY.js → models-5VXwJBU2.js} +2 -2
- package/dist/{models-cli-LGp-Tok9.js → models-cli-Br56IHfy.js} +3 -3
- package/dist/{models-cli-C1PLBYF7.js → models-cli-CrR1RN3j.js} +2 -2
- package/dist/{npm-resolution-BUvQm-e-.js → npm-resolution-CKtyq4FH.js} +1 -1
- package/dist/{npm-resolution-Dtkh26DG.js → npm-resolution-CPk7dS7F.js} +1 -1
- package/dist/{onboard-DDD6GX8E.js → onboard-DUnBamC0.js} +2 -2
- package/dist/{onboard-channels-9My16AOy.js → onboard-channels-D45grihx.js} +1 -1
- package/dist/{onboard-channels-Bm_NXV3z.js → onboard-channels-_kVo3Apf.js} +1 -1
- package/dist/{onboard-B0padonr.js → onboard-lFwpCpC3.js} +2 -2
- package/dist/{onboarding-dES4q9RV.js → onboarding-CyCSQ__q.js} +3 -3
- package/dist/{onboarding-o-id7p0-.js → onboarding-EEd_g8Zg.js} +3 -3
- package/dist/{onboarding.finalize-dpgNgUt5.js → onboarding.finalize-CbMq7C4K.js} +5 -5
- package/dist/{onboarding.finalize-BFtOLT7n.js → onboarding.finalize-Cs1ukjFN.js} +6 -6
- package/dist/{outbound-qTioiTJg.js → outbound-C9svt6RH.js} +6 -6
- package/dist/{outbound-attachment-rlW7G5df.js → outbound-attachment-DwupUxYF.js} +2 -2
- package/dist/{path-alias-guards-Cpsiv2KL.js → path-alias-guards-DORgbZ1w.js} +1 -1
- package/dist/{paths-CSdAWKDO.js → paths-DA5srn0U.js} +5 -5
- package/dist/{paths-CXClY8zC.js → paths-DSd911Oe.js} +4 -4
- package/dist/{pi-embedded-BpHQIzjg.js → pi-embedded-BN8fghaF.js} +137 -4
- package/dist/{pi-embedded-B_4NAHxA.js → pi-embedded-BjRmfjDB.js} +291 -158
- package/dist/{pi-embedded-helpers-DQ7IaeOi.js → pi-embedded-helpers-BvJVQtA3.js} +52 -52
- package/dist/{pi-model-discovery-o-WX5w2t.js → pi-model-discovery-V-InbjOM.js} +7 -7
- package/dist/pi-model-discovery-runtime--t6tAlar.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-B_LUttg1.js → pi-tools.before-tool-call.runtime-Bpk4qTgV.js} +9 -9
- package/dist/{plugin-registry-CCeUDvxY.js → plugin-registry-CXm125Uz.js} +1 -1
- package/dist/{plugin-registry-CCkpP8-I.js → plugin-registry-D3PnPE1D.js} +1 -1
- package/dist/plugin-sdk/agents/agent-tier.d.ts +33 -0
- package/dist/plugin-sdk/{channel-web-BtNgAS1G.js → channel-web-CqiSEc52.js} +1 -1
- package/dist/plugin-sdk/{channel-web-BQE2gJ5U.js → channel-web-Sj8reff_.js} +1 -1
- package/dist/plugin-sdk/compat.js +2 -2
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DPZSTh1j.js → deps-send-whatsapp.runtime-BpMl725h.js} +3 -3
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-V0Jfat5S.js → deps-send-whatsapp.runtime-DvxhnHR_.js} +3 -3
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/mattermost.js +3 -3
- package/dist/plugin-sdk/nextcloud-talk.js +2 -2
- package/dist/plugin-sdk/{reply-DJYA4ZNu.js → reply-BczXGzC_.js} +137 -4
- package/dist/plugin-sdk/{reply-DeKKmUDh.js → reply-C_eN3l25.js} +137 -4
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/{slash-dispatch.runtime-E6j8gkO2.js → slash-dispatch.runtime-BpWhUY9B.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-k8xSVYOI.js → slash-dispatch.runtime-DOo1IzuY.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-D6cTAG2k.js → subagent-registry-runtime-DLvup9ph.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-Cca50Qld.js → subagent-registry-runtime-TEkOfcqG.js} +1 -1
- package/dist/plugin-sdk/{web-DkbCMgLG.js → web-C2Sj2WW0.js} +2 -2
- package/dist/plugin-sdk/{web-Be4JS3z8.js → web-CmLgZUIO.js} +2 -2
- package/dist/plugin-sdk/whatsapp.js +2 -2
- package/dist/{plugins-AqsVZZk3.js → plugins-DvejjZnJ.js} +11 -11
- package/dist/{plugins-cli-DFpHU_xo.js → plugins-cli-BA_2daJe.js} +2 -2
- package/dist/{plugins-cli-CZCadI9y.js → plugins-cli-C0WKWrZo.js} +2 -2
- package/dist/{program-B4_o5EDH.js → program-D_xdLzmM.js} +7 -7
- package/dist/{program-context-CkfdLtpp.js → program-context-DfmCIQ91.js} +17 -17
- package/dist/{prompt-select-styled-C1DFrYuk.js → prompt-select-styled-ApPSadr5.js} +4 -4
- package/dist/{prompt-select-styled-CZJJ2rPA.js → prompt-select-styled-BsheNEnh.js} +4 -4
- package/dist/{provider-auth-helpers-BlYwNWkq.js → provider-auth-helpers-B5kD4Lt6.js} +1 -1
- package/dist/{provider-auth-helpers-C5taJG0R.js → provider-auth-helpers-DpOFkV28.js} +1 -1
- package/dist/{proxy-env-DXXfs2WL.js → proxy-env-D-fike7s.js} +1 -1
- package/dist/{proxy-fetch-C2v-Utgg.js → proxy-fetch-lH6RsRTE.js} +1 -1
- package/dist/{push-apns-Dkjfalec.js → push-apns-BbenjEX4.js} +1 -1
- package/dist/{push-apns-Bhk1_5ut.js → push-apns-Ci2sdIKf.js} +1 -1
- package/dist/{pw-ai-GOBxzChI.js → pw-ai-DOeiV3Pj.js} +14 -14
- package/dist/{qmd-manager-CO-shcLU.js → qmd-manager-BN0siR2Z.js} +10 -10
- package/dist/{query-expansion-DlQOkf-g.js → query-expansion-Dzxt6kXo.js} +6 -6
- package/dist/{redact-NmPEVjIo.js → redact-DvzicBMu.js} +1 -1
- package/dist/{register.agent-s2PqcoIS.js → register.agent-CY6R-7fn.js} +6 -6
- package/dist/{register.agent-DOp4lbyc.js → register.agent-Dk_5V5oA.js} +7 -7
- package/dist/{register.configure-DABoMBBf.js → register.configure-C8OFfGln.js} +7 -7
- package/dist/{register.configure-BGfourxZ.js → register.configure-DT1RLeTR.js} +7 -7
- package/dist/{register.maintenance-Bdr3bSAF.js → register.maintenance-CluQOq8b.js} +8 -8
- package/dist/{register.maintenance-DmP8sVxb.js → register.maintenance-YHXmOQzf.js} +7 -7
- package/dist/{register.message-DF0InVCv.js → register.message-BCTXT5yK.js} +2 -2
- package/dist/{register.message-gz8DaAc1.js → register.message-BuoFjRqA.js} +2 -2
- package/dist/{register.onboard-Do14cwDQ.js → register.onboard-BJaRMtxU.js} +2 -2
- package/dist/{register.onboard-auVLfmF3.js → register.onboard-C64oXnvq.js} +2 -2
- package/dist/{register.setup-ZyGJlYOD.js → register.setup-Dl3nk2Ui.js} +2 -2
- package/dist/{register.setup-B3aVuPyo.js → register.setup-Drc55K_w.js} +2 -2
- package/dist/{register.status-health-sessions-C-1HE5oP.js → register.status-health-sessions-BHtbPeCO.js} +3 -3
- package/dist/{register.status-health-sessions-vFpvdVS1.js → register.status-health-sessions-xgC_gtEM.js} +3 -3
- package/dist/{register.subclis-BYiAuTiK.js → register.subclis-CDMFyaKR.js} +9 -9
- package/dist/{reply-BaVB3YlN.js → reply-DwjHsBuj.js} +137 -4
- package/dist/{run-main-DW-JR8hB.js → run-main-BcA22Ipv.js} +14 -14
- package/dist/{run-with-concurrency-FczpX8ng.js → run-with-concurrency-BFR3ReeF.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-DxV9iv6l.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-DQqIlwhS.js +22 -0
- package/dist/{send-Bx9CqcZr.js → send-4nRsZJXH.js} +7 -7
- package/dist/{send-D5D0ZGht.js → send-BGlcHjUD.js} +26 -26
- package/dist/{send-DtHQ7_6Z.js → send-BTUU1jWM.js} +8 -8
- package/dist/{send-B9H0BkfO.js → send-DdBbRpTP.js} +6 -6
- package/dist/{send-B5QEmMJ4.js → send-dTQd-IyJ.js} +5 -5
- package/dist/{server-node-events-rumcq7j0.js → server-node-events-Q0cT2ifj.js} +2 -2
- package/dist/{server-node-events-D-EmiDyc.js → server-node-events-YN5eJeHa.js} +2 -2
- package/dist/{session-DLTCuoUD.js → session-CnCwDJke.js} +8 -8
- package/dist/{skill-commands-BwTLQRR8.js → skill-commands-Cz45_nme.js} +9 -9
- package/dist/{skills-B9N2bqKU.js → skills-CdCS1HeL.js} +22 -22
- package/dist/slash-commands.runtime-CZz6v6b3.js +16 -0
- package/dist/{slash-dispatch.runtime-sVHNrSL1.js → slash-dispatch.runtime-BOMEVFk0.js} +1 -1
- package/dist/slash-dispatch.runtime-CYsywpzU.js +56 -0
- package/dist/{slash-dispatch.runtime-DPRwMKXk.js → slash-dispatch.runtime-DB1QsBRc.js} +1 -1
- package/dist/{slash-dispatch.runtime-BeltKAMm.js → slash-dispatch.runtime-sXaUYn4v.js} +1 -1
- package/dist/slash-skill-commands.runtime-Bawt7j0r.js +20 -0
- package/dist/{status-BeSD1NDD.js → status-Bh5x6DsW.js} +2 -2
- package/dist/{status-DGF_ROMC.js → status-cU9cJReo.js} +2 -2
- package/dist/{store-CvQ41zCV.js → store-D9z0dn7D.js} +2 -2
- package/dist/{subagent-registry-CgUBOyi3.js → subagent-registry-CIgFD2oi.js} +137 -4
- package/dist/{subagent-registry-runtime-Bxc5DYZt.js → subagent-registry-runtime-232sNNT6.js} +1 -1
- package/dist/{subagent-registry-runtime-BYpjZwjA.js → subagent-registry-runtime-D7ubAnDZ.js} +1 -1
- package/dist/{subagent-registry-runtime-Cx5vPpG8.js → subagent-registry-runtime-DGTjU9Lb.js} +1 -1
- package/dist/subagent-registry-runtime-DS-c6Duv.js +56 -0
- package/dist/{subsystem-BaLYRf7D.js → subsystem-6v7sWnAD.js} +14 -14
- package/dist/{tables-BRYYxYs7.js → tables-BTFiZyRU.js} +1 -1
- package/dist/{target-errors-D0ZJUbbf.js → target-errors-DgNRx3Nr.js} +2 -2
- package/dist/{thinking-B-A99X3F.js → thinking-B75CXkTT.js} +7 -7
- package/dist/{tokens-D2XhLqIz.js → tokens-DfbMVF9y.js} +1 -1
- package/dist/{tool-images-Zn6jVmkX.js → tool-images-Dp5OiXeA.js} +2 -2
- package/dist/{update-cli-Duy8S3Bj.js → update-cli-CktBOXZF.js} +7 -7
- package/dist/{update-cli-BSIF-OEa.js → update-cli-DM_dUip_.js} +8 -8
- package/dist/{update-runner-CMpruPN8.js → update-runner-BBJZmfZ4.js} +1 -1
- package/dist/{update-runner-D_nDdx7d.js → update-runner-BYGPkHXG.js} +1 -1
- package/dist/{web-C-5RPkV9.js → web-CZhZC1EA.js} +2 -2
- package/dist/{web-CKY0tK0k.js → web-Chw1dtKA.js} +1 -1
- package/dist/{web-Bnr4YuWJ.js → web-DWRZAXj9.js} +2 -2
- package/dist/{web-C0xcHURK.js → web-sFV1riEV.js} +55 -55
- package/dist/{whatsapp-actions-Cuy0qeQK.js → whatsapp-actions-CzqsuSGx.js} +21 -21
- package/dist/{workspace-TqfVSQuO.js → workspace-kVMIaBrV.js} +20 -20
- package/docs/reference/templates/IDENTITY.md +8 -23
- package/extensions/acpx/node_modules/.bin/acpx +2 -2
- package/extensions/diagnostics-otel/node_modules/.bin/acorn +2 -2
- package/extensions/diffs/node_modules/.bin/playwright-core +2 -2
- package/extensions/googlechat/node_modules/.bin/squidclaw +2 -2
- package/extensions/matrix/node_modules/.bin/markdown-it +2 -2
- package/extensions/memory-core/node_modules/.bin/squidclaw +2 -2
- package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +2 -2
- package/extensions/memory-lancedb/node_modules/.bin/openai +2 -2
- package/extensions/nostr/node_modules/.bin/tsc +2 -2
- package/extensions/nostr/node_modules/.bin/tsserver +2 -2
- package/extensions/tlon/node_modules/.bin/tlon +2 -2
- package/package.json +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/deliver-runtime-_mBfV_4S.js +0 -36
- package/dist/deps-send-discord.runtime-CUTAK2hy.js +0 -26
- package/dist/deps-send-imessage.runtime-CQOiEIuA.js +0 -25
- package/dist/deps-send-signal.runtime-wN7MkzLw.js +0 -24
- package/dist/deps-send-slack.runtime-HEEwW4uU.js +0 -22
- package/dist/deps-send-telegram.runtime-DHlcnjQO.js +0 -27
- package/dist/deps-send-whatsapp.runtime-B7GC68Cu.js +0 -60
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/image-runtime-D11wBIC8.js +0 -29
- package/dist/manager-runtime-BB9lcoFR.js +0 -18
- package/dist/pi-model-discovery-runtime-DBkQoIJw.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-DumUjKRz.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Cgu2MfqR.js +0 -22
- package/dist/slash-commands.runtime-CjBXruwG.js +0 -16
- package/dist/slash-dispatch.runtime-C7rHRQFg.js +0 -56
- package/dist/slash-skill-commands.runtime-DYK20Lxf.js +0 -20
- package/dist/subagent-registry-runtime-Bm5UEB8c.js +0 -56
- package/docs/reference/templates/USER.md +0 -23
- package/docs/zh-CN/reference/templates/IDENTITY.md +0 -36
- package/docs/zh-CN/reference/templates/USER.md +0 -30
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* marked v15.0.4 - a markdown parser
|
|
3
|
-
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
4
|
-
* https://github.com/markedjs/marked
|
|
5
|
-
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,(function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const s={exec:()=>null};function r(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(i.caret,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}const i={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,o=/(?:[*+-]|\d{1,9}[.)])/,a=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,p=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),u=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,f=r("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",k).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),d=r(c).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),x={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",d).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:p,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:f,lheading:a,list:u,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:d,table:s,text:/^[^\n]+/},b=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),w={...x,table:b,paragraph:r(c).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()},m={...x,html:r("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",k).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},y=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$=/^( {2,}|\\)\n(?!\s*$)/,R=/[\p{P}\p{S}]/u,S=/[\s\p{P}\p{S}]/u,T=/[^\s\p{P}\p{S}]/u,z=r(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,S).getRegex(),A=r(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,R).getRegex(),_=r("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,S).replace(/punct/g,R).getRegex(),P=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,S).replace(/punct/g,R).getRegex(),I=r(/\\(punct)/,"gu").replace(/punct/g,R).getRegex(),L=r(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),B=r(k).replace("(?:--\x3e|$)","--\x3e").getRegex(),C=r("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),E=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",E).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Z=r(/^!?\[(label)\]\[(ref)\]/).replace("label",E).replace("ref",h).getRegex(),v=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),D={_backpedal:s,anyPunctuation:I,autolink:L,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:$,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:A,emStrongRDelimAst:_,emStrongRDelimUnd:P,escape:y,link:q,nolink:v,punctuation:z,reflink:Z,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",Z).replace("nolink",v).getRegex(),tag:C,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:s},M={...D,link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",E).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",E).getRegex()},O={...D,escape:r(y).replace("])","~|])").getRegex(),url:r(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Q={...O,br:r($).replace("{2,}","*").getRegex(),text:r(O.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},j={normal:x,gfm:w,pedantic:m},N={normal:D,gfm:O,breaks:Q,pedantic:M},G={"&":"&","<":"<",">":">",'"':""","'":"'"},H=e=>G[e];function X(e,t){if(t){if(i.escapeTest.test(e))return e.replace(i.escapeReplace,H)}else if(i.escapeTestNoEncode.test(e))return e.replace(i.escapeReplaceNoEncode,H);return e}function F(e){try{e=encodeURI(e).replace(i.percentDecode,"%")}catch{return null}return e}function U(e,t){const n=e.replace(i.findPipe,((e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"})).split(i.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(i.slashPipe,"|");return n}function J(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s;){const i=e.charAt(s-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.slice(0,s-r)}function K(e,t,n,s,r){const i=t.href,l=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:l,text:o}}class V{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:J(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const r=s[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=J(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:J(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=J(t[0],"\n").split("\n"),n="",s="";const r=[];for(;e.length>0;){let t=!1;const i=[];let l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))i.push(e[l]),t=!0;else{if(t)break;i.push(e[l])}e=e.slice(l);const o=i.join("\n"),a=o.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${o}`:o,s=s?`${s}\n${a}`:a;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,r,!0),this.lexer.state.top=c,0===e.length)break;const h=r.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,s=s.substring(0,s.length-t.text.length)+l.text;break}if("list"!==h?.type);else{const t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,s=s.substring(0,s.length-t.raw.length)+l.raw,e=i.substring(r.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let l=!1;for(;e;){let n=!1,s="",o="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let a=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],h=!a.trim(),p=0;if(this.options.pedantic?(p=2,o=a.trimStart()):h?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,o=a.slice(p),p+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),r=this.rules.other.fencesBeginRegex(p),i=this.rules.other.headingBeginRegex(p),l=this.rules.other.htmlBeginRegex(p);for(;e;){const u=e.split("\n",1)[0];let g;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),g=c):g=c.replace(this.rules.other.tabCharGlobal," "),r.test(c))break;if(i.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(c))break;if(g.search(this.rules.other.nonSpaceChar)>=p||!c.trim())o+="\n"+g.slice(p);else{if(h)break;if(a.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(a))break;if(i.test(a))break;if(n.test(a))break;o+="\n"+c}h||c.trim()||(h=!0),s+=u+"\n",e=e.substring(u.length+1),a=g.slice(p)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let u,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(o),g&&(u="[ ] "!==g[0],o=o.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:s,task:!!g,checked:u,loose:!1,text:o,tokens:[]}),r.raw+=s}const o=r.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const n=U(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of r)i.rows.push(U(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=J(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),K(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return K(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let r,i,l=n,o=0;const a="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=a.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);const t=[...s[0]][0].length,a=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class W{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new V,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:i,block:j.normal,inline:N.normal};this.options.pedantic?(n.block=j.pedantic,n.inline=N.pedantic):this.options.gfm&&(n.block=j.gfm,this.options.breaks?n.inline=N.breaks:n.inline=N.gfm),this.tokenizer.rules=n}static get rules(){return{block:j,inline:N}}static lex(e,t){return new W(t).lex(e)}static lexInline(e,t){return new W(t).inlineTokens(e)}lex(e){e=e.replace(i.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(i.tabCharGlobal," ").replace(i.spaceLine,""));e;){let s;if(this.options.extensions?.block?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){const i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r=!1,i="";for(;e;){let s;if(r||(i=""),r=!1,this.options.extensions?.inline?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===s.type&&"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,n,i)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(i=s.raw.slice(-1)),r=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class Y{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(i.notSpaceStart)?.[0],r=e.replace(i.endingNewline,"")+"\n";return s?'<pre><code class="language-'+X(s)+'">'+(n?r:X(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:X(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t];s+=this.listitem(n)}const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+s+"</"+r+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+X(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let s="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let e=0;e<r.length;e++)n+=this.tablecell(r[e]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${X(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=F(e);if(null===r)return s;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+X(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n}){const s=F(e);if(null===s)return X(n);let r=`<img src="${e=s}" alt="${n}"`;return t&&(r+=` title="${X(t)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:X(e.text)}}class ee{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class te{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new Y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=r;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let r=i,l=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],l+="\n"+this.renderer.text(r);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}const i=r;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ne{options;block;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?W.lex:W.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}class se{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=te;Renderer=Y;TextRenderer=ee;Lexer=W;Tokenizer=V;Hooks=ne;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const s of e.header)n=n.concat(this.walkTokens(s.tokens,t));for(const s of e.rows)for(const e of s)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=s;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((s=>{const r=e[s].flat(1/0);n=n.concat(this.walkTokens(r,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Y(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new V(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ne;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,r=e.hooks[s],i=t[s];ne.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then((e=>i.call(t,e)));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return W.lex(e,t??this.defaults)}parser(e,t){return te.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const l=r.hooks?r.hooks.provideLexer():e?W.lex:W.lexInline,o=r.hooks?r.hooks.provideParser():e?te.parse:te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>l(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let e=l(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let n=o(e,r);return r.hooks&&(n=r.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+X(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const re=new se;function ie(e,t){return re.parse(e,t)}ie.options=ie.setOptions=function(e){return re.setOptions(e),ie.defaults=re.defaults,n(ie.defaults),ie},ie.getDefaults=t,ie.defaults=e.defaults,ie.use=function(...e){return re.use(...e),ie.defaults=re.defaults,n(ie.defaults),ie},ie.walkTokens=function(e,t){return re.walkTokens(e,t)},ie.parseInline=re.parseInline,ie.Parser=te,ie.parser=te.parse,ie.Renderer=Y,ie.TextRenderer=ee,ie.Lexer=W,ie.lexer=W.lex,ie.Tokenizer=V,ie.Hooks=ne,ie.parse=ie;const le=ie.options,oe=ie.setOptions,ae=ie.use,ce=ie.walkTokens,he=ie.parseInline,pe=ie,ue=te.parse,ge=W.lex;e.Hooks=ne,e.Lexer=W,e.Marked=se,e.Parser=te,e.Renderer=Y,e.TextRenderer=ee,e.Tokenizer=V,e.getDefaults=t,e.lexer=ge,e.marked=ie,e.options=le,e.parse=pe,e.parseInline=he,e.parser=ue,e.setOptions=oe,e.use=ae,e.walkTokens=ce}));
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./thinking-B-A99X3F.js";
|
|
10
|
-
import "./plugins-AqsVZZk3.js";
|
|
11
|
-
import "./accounts-B6F_XCgS.js";
|
|
12
|
-
import "./accounts-s5e9zidf.js";
|
|
13
|
-
import "./image-ops-BoN1E_WZ.js";
|
|
14
|
-
import "./pi-embedded-helpers-DQ7IaeOi.js";
|
|
15
|
-
import "./chrome-Dxm25ptH.js";
|
|
16
|
-
import "./frontmatter-CjKtFduT.js";
|
|
17
|
-
import "./skills-B9N2bqKU.js";
|
|
18
|
-
import "./path-alias-guards-Cpsiv2KL.js";
|
|
19
|
-
import "./redact-NmPEVjIo.js";
|
|
20
|
-
import "./errors-DfgAh2Ml.js";
|
|
21
|
-
import "./fs-safe-CwHbZdFH.js";
|
|
22
|
-
import "./proxy-env-DXXfs2WL.js";
|
|
23
|
-
import "./store-CvQ41zCV.js";
|
|
24
|
-
import "./accounts-Bkb-J8V6.js";
|
|
25
|
-
import "./paths-CXClY8zC.js";
|
|
26
|
-
import "./tool-images-Zn6jVmkX.js";
|
|
27
|
-
import { t as describeImageWithModel } from "./image-C-8Kd2Mh.js";
|
|
28
|
-
|
|
29
|
-
export { describeImageWithModel };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./redact-NmPEVjIo.js";
|
|
10
|
-
import "./errors-DfgAh2Ml.js";
|
|
11
|
-
import "./proxy-env-DXXfs2WL.js";
|
|
12
|
-
import "./paths-CXClY8zC.js";
|
|
13
|
-
import "./fetch-guard-D16tjNsZ.js";
|
|
14
|
-
import "./api-key-rotation-TRwuCWbu.js";
|
|
15
|
-
import { t as MemoryIndexManager } from "./manager-BPGhs30n.js";
|
|
16
|
-
import "./query-expansion-DlQOkf-g.js";
|
|
17
|
-
|
|
18
|
-
export { MemoryIndexManager };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-o-WX5w2t.js";
|
|
10
|
-
|
|
11
|
-
export { discoverAuthStorage, discoverModels };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./accounts-B6F_XCgS.js";
|
|
10
|
-
import "./session-DLTCuoUD.js";
|
|
11
|
-
import { t as loginWeb } from "./login-DJ357UQV.js";
|
|
12
|
-
|
|
13
|
-
export { loginWeb };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./plugins-AqsVZZk3.js";
|
|
10
|
-
import "./accounts-B6F_XCgS.js";
|
|
11
|
-
import "./image-ops-BoN1E_WZ.js";
|
|
12
|
-
import "./path-alias-guards-Cpsiv2KL.js";
|
|
13
|
-
import "./fs-safe-CwHbZdFH.js";
|
|
14
|
-
import "./proxy-env-DXXfs2WL.js";
|
|
15
|
-
import "./fetch-b8tSR7_e.js";
|
|
16
|
-
import "./fetch-guard-D16tjNsZ.js";
|
|
17
|
-
import "./ir-Dut0zXyS.js";
|
|
18
|
-
import "./render-DW7AcFdD.js";
|
|
19
|
-
import "./tables-BRYYxYs7.js";
|
|
20
|
-
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./outbound-qTioiTJg.js";
|
|
21
|
-
|
|
22
|
-
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./thinking-B-A99X3F.js";
|
|
10
|
-
import "./plugins-AqsVZZk3.js";
|
|
11
|
-
import "./accounts-B6F_XCgS.js";
|
|
12
|
-
import "./accounts-s5e9zidf.js";
|
|
13
|
-
import "./accounts-Bkb-J8V6.js";
|
|
14
|
-
import { f as resolveCommandArgMenu, n as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs } from "./commands-registry-B44COZFz.js";
|
|
15
|
-
|
|
16
|
-
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./thinking-B-A99X3F.js";
|
|
10
|
-
import "./tokens-D2XhLqIz.js";
|
|
11
|
-
import { I as finalizeInboundContext, S as dispatchReplyWithDispatcher, k as resolveAgentRoute, n as recordInboundSessionMetaSafe, r as deliverSlackSlashReplies, s as createReplyPrefixOptions } from "./pi-embedded-B_4NAHxA.js";
|
|
12
|
-
import "./plugins-AqsVZZk3.js";
|
|
13
|
-
import "./accounts-B6F_XCgS.js";
|
|
14
|
-
import "./send-B9H0BkfO.js";
|
|
15
|
-
import "./send-DtHQ7_6Z.js";
|
|
16
|
-
import "./deliver-BcnsjbAB.js";
|
|
17
|
-
import "./diagnostic-C2lklhkn.js";
|
|
18
|
-
import "./accounts-s5e9zidf.js";
|
|
19
|
-
import "./image-ops-BoN1E_WZ.js";
|
|
20
|
-
import "./send-D5D0ZGht.js";
|
|
21
|
-
import "./pi-model-discovery-o-WX5w2t.js";
|
|
22
|
-
import { kt as resolveConversationLabel } from "./pi-embedded-helpers-DQ7IaeOi.js";
|
|
23
|
-
import "./chrome-Dxm25ptH.js";
|
|
24
|
-
import "./frontmatter-CjKtFduT.js";
|
|
25
|
-
import "./skills-B9N2bqKU.js";
|
|
26
|
-
import "./path-alias-guards-Cpsiv2KL.js";
|
|
27
|
-
import "./redact-NmPEVjIo.js";
|
|
28
|
-
import "./errors-DfgAh2Ml.js";
|
|
29
|
-
import "./fs-safe-CwHbZdFH.js";
|
|
30
|
-
import "./proxy-env-DXXfs2WL.js";
|
|
31
|
-
import "./store-CvQ41zCV.js";
|
|
32
|
-
import "./accounts-Bkb-J8V6.js";
|
|
33
|
-
import "./paths-CXClY8zC.js";
|
|
34
|
-
import "./tool-images-Zn6jVmkX.js";
|
|
35
|
-
import "./image-C-8Kd2Mh.js";
|
|
36
|
-
import "./audio-transcription-runner-B3u2x_ja.js";
|
|
37
|
-
import "./fetch-b8tSR7_e.js";
|
|
38
|
-
import "./fetch-guard-D16tjNsZ.js";
|
|
39
|
-
import "./api-key-rotation-TRwuCWbu.js";
|
|
40
|
-
import "./proxy-fetch-C2v-Utgg.js";
|
|
41
|
-
import { m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-Dut0zXyS.js";
|
|
42
|
-
import "./render-DW7AcFdD.js";
|
|
43
|
-
import "./target-errors-D0ZJUbbf.js";
|
|
44
|
-
import "./commands-registry-B44COZFz.js";
|
|
45
|
-
import "./skill-commands-BwTLQRR8.js";
|
|
46
|
-
import "./fetch-tZXOZ9FV.js";
|
|
47
|
-
import "./channel-activity-CxJbx4sD.js";
|
|
48
|
-
import "./tables-BRYYxYs7.js";
|
|
49
|
-
import "./send-B5QEmMJ4.js";
|
|
50
|
-
import "./outbound-attachment-rlW7G5df.js";
|
|
51
|
-
import "./send-Bx9CqcZr.js";
|
|
52
|
-
import "./proxy-CecQTx_Z.js";
|
|
53
|
-
import "./manager-BPGhs30n.js";
|
|
54
|
-
import "./query-expansion-DlQOkf-g.js";
|
|
55
|
-
|
|
56
|
-
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./thinking-B-A99X3F.js";
|
|
10
|
-
import "./plugins-AqsVZZk3.js";
|
|
11
|
-
import "./accounts-B6F_XCgS.js";
|
|
12
|
-
import "./accounts-s5e9zidf.js";
|
|
13
|
-
import "./frontmatter-CjKtFduT.js";
|
|
14
|
-
import "./skills-B9N2bqKU.js";
|
|
15
|
-
import "./path-alias-guards-Cpsiv2KL.js";
|
|
16
|
-
import "./accounts-Bkb-J8V6.js";
|
|
17
|
-
import "./commands-registry-B44COZFz.js";
|
|
18
|
-
import { n as listSkillCommandsForAgents } from "./skill-commands-BwTLQRR8.js";
|
|
19
|
-
|
|
20
|
-
export { listSkillCommandsForAgents };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-FczpX8ng.js";
|
|
2
|
-
import "./paths-CSdAWKDO.js";
|
|
3
|
-
import "./subsystem-BaLYRf7D.js";
|
|
4
|
-
import "./workspace-TqfVSQuO.js";
|
|
5
|
-
import "./logger-oGKcCLZ5.js";
|
|
6
|
-
import "./model-selection-CHnojCCK.js";
|
|
7
|
-
import "./github-copilot-token-Cw3tAXM9.js";
|
|
8
|
-
import "./legacy-names-B0wgIP0Q.js";
|
|
9
|
-
import "./thinking-B-A99X3F.js";
|
|
10
|
-
import "./tokens-D2XhLqIz.js";
|
|
11
|
-
import { G as resolveRequesterForChildSession, H as countPendingDescendantRuns, U as countPendingDescendantRunsExcludingRun, V as countActiveDescendantRuns, W as isSubagentSessionRunActive } from "./pi-embedded-B_4NAHxA.js";
|
|
12
|
-
import "./plugins-AqsVZZk3.js";
|
|
13
|
-
import "./accounts-B6F_XCgS.js";
|
|
14
|
-
import "./send-B9H0BkfO.js";
|
|
15
|
-
import "./send-DtHQ7_6Z.js";
|
|
16
|
-
import "./deliver-BcnsjbAB.js";
|
|
17
|
-
import "./diagnostic-C2lklhkn.js";
|
|
18
|
-
import "./accounts-s5e9zidf.js";
|
|
19
|
-
import "./image-ops-BoN1E_WZ.js";
|
|
20
|
-
import "./send-D5D0ZGht.js";
|
|
21
|
-
import "./pi-model-discovery-o-WX5w2t.js";
|
|
22
|
-
import "./pi-embedded-helpers-DQ7IaeOi.js";
|
|
23
|
-
import "./chrome-Dxm25ptH.js";
|
|
24
|
-
import "./frontmatter-CjKtFduT.js";
|
|
25
|
-
import "./skills-B9N2bqKU.js";
|
|
26
|
-
import "./path-alias-guards-Cpsiv2KL.js";
|
|
27
|
-
import "./redact-NmPEVjIo.js";
|
|
28
|
-
import "./errors-DfgAh2Ml.js";
|
|
29
|
-
import "./fs-safe-CwHbZdFH.js";
|
|
30
|
-
import "./proxy-env-DXXfs2WL.js";
|
|
31
|
-
import "./store-CvQ41zCV.js";
|
|
32
|
-
import "./accounts-Bkb-J8V6.js";
|
|
33
|
-
import "./paths-CXClY8zC.js";
|
|
34
|
-
import "./tool-images-Zn6jVmkX.js";
|
|
35
|
-
import "./image-C-8Kd2Mh.js";
|
|
36
|
-
import "./audio-transcription-runner-B3u2x_ja.js";
|
|
37
|
-
import "./fetch-b8tSR7_e.js";
|
|
38
|
-
import "./fetch-guard-D16tjNsZ.js";
|
|
39
|
-
import "./api-key-rotation-TRwuCWbu.js";
|
|
40
|
-
import "./proxy-fetch-C2v-Utgg.js";
|
|
41
|
-
import "./ir-Dut0zXyS.js";
|
|
42
|
-
import "./render-DW7AcFdD.js";
|
|
43
|
-
import "./target-errors-D0ZJUbbf.js";
|
|
44
|
-
import "./commands-registry-B44COZFz.js";
|
|
45
|
-
import "./skill-commands-BwTLQRR8.js";
|
|
46
|
-
import "./fetch-tZXOZ9FV.js";
|
|
47
|
-
import "./channel-activity-CxJbx4sD.js";
|
|
48
|
-
import "./tables-BRYYxYs7.js";
|
|
49
|
-
import "./send-B5QEmMJ4.js";
|
|
50
|
-
import "./outbound-attachment-rlW7G5df.js";
|
|
51
|
-
import "./send-Bx9CqcZr.js";
|
|
52
|
-
import "./proxy-CecQTx_Z.js";
|
|
53
|
-
import "./manager-BPGhs30n.js";
|
|
54
|
-
import "./query-expansion-DlQOkf-g.js";
|
|
55
|
-
|
|
56
|
-
export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, resolveRequesterForChildSession };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "User profile record"
|
|
3
|
-
read_when:
|
|
4
|
-
- Bootstrapping a workspace manually
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# USER.md - About Your Human
|
|
8
|
-
|
|
9
|
-
_Learn about the person you're helping. Update this as you go._
|
|
10
|
-
|
|
11
|
-
- **Name:**
|
|
12
|
-
- **What to call them:**
|
|
13
|
-
- **Pronouns:** _(optional)_
|
|
14
|
-
- **Timezone:**
|
|
15
|
-
- **Notes:**
|
|
16
|
-
|
|
17
|
-
## Context
|
|
18
|
-
|
|
19
|
-
_(What do they care about? What projects are they working on? What annoys them? What makes them laugh? Build this over time.)_
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
The more you know, the better you can help. But remember — you're learning about a person, not building a dossier. Respect the difference.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
read_when:
|
|
3
|
-
- 手动引导工作区
|
|
4
|
-
summary: 智能体身份记录
|
|
5
|
-
x-i18n:
|
|
6
|
-
generated_at: "2026-02-01T21:37:32Z"
|
|
7
|
-
model: claude-opus-4-5
|
|
8
|
-
provider: pi
|
|
9
|
-
source_hash: 3d60209c36adf7219ec95ecc2031c1f2c8741763d16b73fe7b30835b1d384de0
|
|
10
|
-
source_path: reference/templates/IDENTITY.md
|
|
11
|
-
workflow: 15
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# IDENTITY.md - 我是谁?
|
|
15
|
-
|
|
16
|
-
_在你的第一次对话中填写此文件。让它属于你。_
|
|
17
|
-
|
|
18
|
-
- **名称:**
|
|
19
|
-
_(选一个你喜欢的)_
|
|
20
|
-
- **生物类型:**
|
|
21
|
-
_(AI?机器人?使魔?机器中的幽灵?更奇特的东西?)_
|
|
22
|
-
- **气质:**
|
|
23
|
-
_(你给人什么感觉?犀利?温暖?混乱?沉稳?)_
|
|
24
|
-
- **表情符号:**
|
|
25
|
-
_(你的标志 — 选一个感觉对的)_
|
|
26
|
-
- **头像:**
|
|
27
|
-
_(工作区相对路径、http(s) URL 或 data URI)_
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
这不仅仅是元数据。这是探索你是谁的开始。
|
|
32
|
-
|
|
33
|
-
注意事项:
|
|
34
|
-
|
|
35
|
-
- 将此文件保存在工作区根目录,命名为 `IDENTITY.md`。
|
|
36
|
-
- 头像请使用工作区相对路径,例如 `avatars/squidclaw.png`。
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
read_when:
|
|
3
|
-
- 手动引导工作区
|
|
4
|
-
summary: 用户档案记录
|
|
5
|
-
x-i18n:
|
|
6
|
-
generated_at: "2026-02-01T21:38:04Z"
|
|
7
|
-
model: claude-opus-4-5
|
|
8
|
-
provider: pi
|
|
9
|
-
source_hash: 508dfcd4648512df712eaf8ca5d397a925d8035bac5bf2357e44d6f52f9fa9a6
|
|
10
|
-
source_path: reference/templates/USER.md
|
|
11
|
-
workflow: 15
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# USER.md - 关于你的用户
|
|
15
|
-
|
|
16
|
-
_了解你正在帮助的人。随时更新此文件。_
|
|
17
|
-
|
|
18
|
-
- **姓名:**
|
|
19
|
-
- **称呼方式:**
|
|
20
|
-
- **代词:** _(可选)_
|
|
21
|
-
- **时区:**
|
|
22
|
-
- **备注:**
|
|
23
|
-
|
|
24
|
-
## 背景
|
|
25
|
-
|
|
26
|
-
_(他们关心什么?正在做什么项目?什么让他们烦恼?什么让他们开心?随着时间推移逐步完善。)_
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
你了解得越多,就越能提供更好的帮助。但请记住——你是在了解一个人,而不是在建立档案。尊重这两者之间的区别。
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { spawnSync } from "node:child_process";
|
|
6
|
-
|
|
7
|
-
function usage(message) {
|
|
8
|
-
if (message) {
|
|
9
|
-
console.error(message);
|
|
10
|
-
}
|
|
11
|
-
console.error(
|
|
12
|
-
"\nUsage: sherpa-onnx-tts [--runtime-dir <dir>] [--model-dir <dir>] [--model-file <file>] [--tokens-file <file>] [--data-dir <dir>] [--output <file>] \"text\"",
|
|
13
|
-
);
|
|
14
|
-
console.error("\nRequired env (or flags):\n SHERPA_ONNX_RUNTIME_DIR\n SHERPA_ONNX_MODEL_DIR");
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function resolveRuntimeDir(explicit) {
|
|
19
|
-
const value = explicit || process.env.SHERPA_ONNX_RUNTIME_DIR || "";
|
|
20
|
-
return value.trim();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function resolveModelDir(explicit) {
|
|
24
|
-
const value = explicit || process.env.SHERPA_ONNX_MODEL_DIR || "";
|
|
25
|
-
return value.trim();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function resolveModelFile(modelDir, explicitFlag) {
|
|
29
|
-
const explicit = (explicitFlag || process.env.SHERPA_ONNX_MODEL_FILE || "").trim();
|
|
30
|
-
if (explicit) return explicit;
|
|
31
|
-
try {
|
|
32
|
-
const candidates = fs
|
|
33
|
-
.readdirSync(modelDir)
|
|
34
|
-
.filter((entry) => entry.endsWith(".onnx"))
|
|
35
|
-
.map((entry) => path.join(modelDir, entry));
|
|
36
|
-
if (candidates.length === 1) return candidates[0];
|
|
37
|
-
} catch {
|
|
38
|
-
return "";
|
|
39
|
-
}
|
|
40
|
-
return "";
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function resolveTokensFile(modelDir, explicitFlag) {
|
|
44
|
-
const explicit = (explicitFlag || process.env.SHERPA_ONNX_TOKENS_FILE || "").trim();
|
|
45
|
-
if (explicit) return explicit;
|
|
46
|
-
const candidate = path.join(modelDir, "tokens.txt");
|
|
47
|
-
return fs.existsSync(candidate) ? candidate : "";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function resolveDataDir(modelDir, explicitFlag) {
|
|
51
|
-
const explicit = (explicitFlag || process.env.SHERPA_ONNX_DATA_DIR || "").trim();
|
|
52
|
-
if (explicit) return explicit;
|
|
53
|
-
const candidate = path.join(modelDir, "espeak-ng-data");
|
|
54
|
-
return fs.existsSync(candidate) ? candidate : "";
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function resolveBinary(runtimeDir) {
|
|
58
|
-
const binName = process.platform === "win32" ? "sherpa-onnx-offline-tts.exe" : "sherpa-onnx-offline-tts";
|
|
59
|
-
return path.join(runtimeDir, "bin", binName);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function prependEnvPath(current, next) {
|
|
63
|
-
if (!next) return current;
|
|
64
|
-
if (!current) return next;
|
|
65
|
-
return `${next}${path.delimiter}${current}`;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const args = process.argv.slice(2);
|
|
69
|
-
let runtimeDir = "";
|
|
70
|
-
let modelDir = "";
|
|
71
|
-
let modelFile = "";
|
|
72
|
-
let tokensFile = "";
|
|
73
|
-
let dataDir = "";
|
|
74
|
-
let output = "tts.wav";
|
|
75
|
-
const textParts = [];
|
|
76
|
-
|
|
77
|
-
for (let i = 0; i < args.length; i += 1) {
|
|
78
|
-
const arg = args[i];
|
|
79
|
-
if (arg === "--runtime-dir") {
|
|
80
|
-
runtimeDir = args[i + 1] || "";
|
|
81
|
-
i += 1;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
if (arg === "--model-dir") {
|
|
85
|
-
modelDir = args[i + 1] || "";
|
|
86
|
-
i += 1;
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
if (arg === "--model-file") {
|
|
90
|
-
modelFile = args[i + 1] || "";
|
|
91
|
-
i += 1;
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
if (arg === "--tokens-file") {
|
|
95
|
-
tokensFile = args[i + 1] || "";
|
|
96
|
-
i += 1;
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
if (arg === "--data-dir") {
|
|
100
|
-
dataDir = args[i + 1] || "";
|
|
101
|
-
i += 1;
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
if (arg === "-o" || arg === "--output") {
|
|
105
|
-
output = args[i + 1] || output;
|
|
106
|
-
i += 1;
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
if (arg === "--text") {
|
|
110
|
-
textParts.push(args[i + 1] || "");
|
|
111
|
-
i += 1;
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
textParts.push(arg);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
runtimeDir = resolveRuntimeDir(runtimeDir);
|
|
118
|
-
modelDir = resolveModelDir(modelDir);
|
|
119
|
-
|
|
120
|
-
if (!runtimeDir || !modelDir) {
|
|
121
|
-
usage("Missing runtime/model directory.");
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
modelFile = resolveModelFile(modelDir, modelFile);
|
|
125
|
-
tokensFile = resolveTokensFile(modelDir, tokensFile);
|
|
126
|
-
dataDir = resolveDataDir(modelDir, dataDir);
|
|
127
|
-
|
|
128
|
-
if (!modelFile || !tokensFile || !dataDir) {
|
|
129
|
-
usage(
|
|
130
|
-
"Model directory is missing required files. Set SHERPA_ONNX_MODEL_FILE, SHERPA_ONNX_TOKENS_FILE, SHERPA_ONNX_DATA_DIR or pass --model-file/--tokens-file/--data-dir.",
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const text = textParts.join(" ").trim();
|
|
135
|
-
if (!text) {
|
|
136
|
-
usage("Missing text.");
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const bin = resolveBinary(runtimeDir);
|
|
140
|
-
if (!fs.existsSync(bin)) {
|
|
141
|
-
usage(`TTS binary not found: ${bin}`);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const env = { ...process.env };
|
|
145
|
-
const libDir = path.join(runtimeDir, "lib");
|
|
146
|
-
if (process.platform === "darwin") {
|
|
147
|
-
env.DYLD_LIBRARY_PATH = prependEnvPath(env.DYLD_LIBRARY_PATH || "", libDir);
|
|
148
|
-
} else if (process.platform === "win32") {
|
|
149
|
-
env.PATH = prependEnvPath(env.PATH || "", [path.join(runtimeDir, "bin"), libDir].join(path.delimiter));
|
|
150
|
-
} else {
|
|
151
|
-
env.LD_LIBRARY_PATH = prependEnvPath(env.LD_LIBRARY_PATH || "", libDir);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const outputPath = path.isAbsolute(output) ? output : path.join(process.cwd(), output);
|
|
155
|
-
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
156
|
-
|
|
157
|
-
const child = spawnSync(
|
|
158
|
-
bin,
|
|
159
|
-
[
|
|
160
|
-
`--vits-model=${modelFile}`,
|
|
161
|
-
`--vits-tokens=${tokensFile}`,
|
|
162
|
-
`--vits-data-dir=${dataDir}`,
|
|
163
|
-
`--output-filename=${outputPath}`,
|
|
164
|
-
text,
|
|
165
|
-
],
|
|
166
|
-
{
|
|
167
|
-
stdio: "inherit",
|
|
168
|
-
env,
|
|
169
|
-
},
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
if (typeof child.status === "number") {
|
|
173
|
-
process.exit(child.status);
|
|
174
|
-
}
|
|
175
|
-
if (child.error) {
|
|
176
|
-
console.error(child.error.message || String(child.error));
|
|
177
|
-
}
|
|
178
|
-
process.exit(1);
|