@qwen-code/qwen-code 0.23.3 → 0.23.4-dev.codemode-responses.20260914.87437db784
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/bundled/computer-use/SKILL.md +46 -198
- package/bundled/computer-use/references/macos.md +208 -0
- package/bundled/computer-use/references/windows-linux.md +247 -0
- package/bundled/goal-draft/SKILL.md +10 -10
- package/bundled/qc-helper/docs/configuration/settings.md +81 -71
- package/bundled/qc-helper/docs/extension/getting-started-extensions.md +2 -0
- package/bundled/qc-helper/docs/extension/introduction.md +9 -3
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/agent-board.md +89 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -21
- package/bundled/qc-helper/docs/features/channels/dws.md +5 -1
- package/bundled/qc-helper/docs/features/channels/overview.md +5 -6
- package/bundled/qc-helper/docs/features/code-review.md +18 -4
- package/bundled/qc-helper/docs/features/commands.md +9 -0
- package/bundled/qc-helper/docs/features/computer-use.md +26 -8
- package/bundled/qc-helper/docs/features/cross-session-protocol.md +23 -5
- package/bundled/qc-helper/docs/features/followup-suggestions.md +17 -5
- package/bundled/qc-helper/docs/features/goals.md +22 -18
- package/bundled/qc-helper/docs/features/hooks.md +48 -37
- package/bundled/qc-helper/docs/features/skills.md +33 -3
- package/bundled/qc-helper/docs/features/status-line.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +27 -0
- package/bundled/qc-helper/docs/qwen-serve.md +7 -3
- package/bundled/review/SKILL.md +20 -10
- package/bundled/review/references/persistence.md +2 -0
- package/bundled/workflow-authoring/SKILL.md +442 -0
- package/bundled/workflow-creator/SKILL.md +1 -1
- package/chunks/{MaxSizedBox-D4LW7RZZ.js → MaxSizedBox-CSMC6NNQ.js} +59 -55
- package/chunks/{StandaloneSessionPicker-ALTTRWUP.js → StandaloneSessionPicker-5G46NROB.js} +83 -79
- package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-RUQNTNU5.js} +2 -2
- package/chunks/acp-subagent-executor-4JLSF7SA.js +141 -0
- package/chunks/{acpAgent-BBSW7XZG.js → acpAgent-WJ45JV2S.js} +1026 -355
- package/chunks/{agent-SQ6OY3QD.js → agent-KWNOVXAD.js} +43 -39
- package/chunks/{agent-headless-RI2THRQ7.js → agent-headless-TU5N3GFF.js} +43 -39
- package/chunks/{anthropicContentGenerator-JSKMKS6V.js → anthropicContentGenerator-H5YPXIDE.js} +37 -15
- package/chunks/{artifact-tool-PMYZCYNH.js → artifact-tool-MFGORTWZ.js} +59 -109
- package/chunks/{askUserQuestion-4M4YYIB4.js → askUserQuestion-WS4GUT7C.js} +3 -3
- package/chunks/{bridge-DAFMI72L.js → bridge-PF7UX6MH.js} +63 -58
- package/chunks/{build-63BIOYWK.js → build-5KWQBWEQ.js} +1 -1
- package/chunks/{ca-KC2AISNS.js → ca-GZ4FDJU2.js} +3 -3
- package/chunks/{channel-management-service-OWDXVL7R.js → channel-management-service-AFVIT4VH.js} +8 -8
- package/chunks/{channel-settings-store-4I6JONT7.js → channel-settings-store-3OVAGIC2.js} +68 -64
- package/chunks/{channel-worker-group-F2ZZMLNS.js → channel-worker-group-JR6JOELM.js} +8 -8
- package/chunks/{channel-worker-manager-2SZLJJSJ.js → channel-worker-manager-AVKJEZFL.js} +8 -8
- package/chunks/{channel-worker-supervisor-ZFNWMG6D.js → channel-worker-supervisor-OOYY7BAQ.js} +5 -5
- package/chunks/{chunk-6JACAGYH.js → chunk-2S2WIGCM.js} +1 -1
- package/chunks/{chunk-NRXWJXJ4.js → chunk-2YGR3VN6.js} +15 -15
- package/chunks/{chunk-IUVIBDKU.js → chunk-2YMRRI2C.js} +9 -10
- package/chunks/{chunk-3BTSSIJO.js → chunk-3DOAKZYD.js} +99 -14
- package/chunks/{chunk-F53KKZUD.js → chunk-3LMDSCLU.js} +158 -10
- package/chunks/{chunk-2ZN3O5FT.js → chunk-457DR2MC.js} +6 -6
- package/chunks/{chunk-WG7BL3FY.js → chunk-473RJLIH.js} +1 -1
- package/chunks/{chunk-W5ZQMAEM.js → chunk-4Y2I3CI3.js} +1 -1
- package/chunks/{chunk-HGEUHUEV.js → chunk-54B2LTKP.js} +1 -1
- package/chunks/{chunk-IRH27ZC2.js → chunk-5EZRLTLQ.js} +4 -4
- package/chunks/{chunk-DLH7YIX6.js → chunk-5FK4MSHB.js} +3 -3
- package/chunks/{chunk-CUEXOHQH.js → chunk-5ODRE7E5.js} +9 -15
- package/chunks/{chunk-532WHF4F.js → chunk-5VQR2DD7.js} +2 -2
- package/chunks/{chunk-3KQBQ6FM.js → chunk-63WKMKVD.js} +190 -28
- package/chunks/{chunk-YBUMTY7B.js → chunk-66N6C4EH.js} +1 -1
- package/chunks/{chunk-MLQNSPRZ.js → chunk-6MLDTOHU.js} +15 -5
- package/chunks/{chunk-SBRX4BDI.js → chunk-6NKDU7YL.js} +2 -2
- package/chunks/{chunk-3UXUOFO6.js → chunk-6TMXX4Z4.js} +9 -10
- package/chunks/{chunk-Y2MYW47X.js → chunk-6WXVEDT2.js} +9 -2
- package/chunks/{chunk-ZHKTKHMO.js → chunk-7MIBD3LG.js} +1 -1
- package/chunks/{chunk-EVTNACMT.js → chunk-A6QMKS5S.js} +12 -12
- package/chunks/{chunk-NOAG7N22.js → chunk-A6YU6R5N.js} +2 -2
- package/chunks/{chunk-76RGWKLS.js → chunk-ABNX6E6K.js} +1 -1
- package/chunks/chunk-ACHCT36C.js +28 -0
- package/chunks/{chunk-NE624IVP.js → chunk-ADQUK6WA.js} +1 -1
- package/chunks/{chunk-PLLIWEM3.js → chunk-AEWCOE64.js} +2 -2
- package/chunks/{chunk-3FPYT6QC.js → chunk-ARDHE6MM.js} +23 -0
- package/chunks/{chunk-LILGKQ4B.js → chunk-AXZMWAJV.js} +156 -26
- package/chunks/{chunk-SYLECP23.js → chunk-B776VKDA.js} +4 -4
- package/chunks/{chunk-AC6KDLH3.js → chunk-BNYQHLPR.js} +1 -1
- package/chunks/{chunk-BZM5U74J.js → chunk-BS7ON54G.js} +724 -468
- package/chunks/{chunk-TPKQIA7G.js → chunk-BSIOCNDK.js} +1 -1
- package/chunks/{chunk-U7O65WKL.js → chunk-BW2SMO6L.js} +1 -1
- package/chunks/{chunk-POC3YMHG.js → chunk-BY6CE34S.js} +4 -4
- package/chunks/{chunk-RLLRJJDR.js → chunk-C3VNHDWJ.js} +2 -2
- package/chunks/{chunk-WBCPROWX.js → chunk-C4HBZQNH.js} +1 -1
- package/chunks/{chunk-MSNHNAQZ.js → chunk-C5ABXOC2.js} +3 -3
- package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
- package/chunks/chunk-CCWWPFZJ.js +191 -0
- package/chunks/chunk-CFMZLE3L.js +75 -0
- package/chunks/{chunk-N7VWZDWW.js → chunk-CFSBWJBB.js} +4462 -3840
- package/chunks/{chunk-KOKPXIAN.js → chunk-CL7JONZN.js} +3 -3
- package/chunks/{chunk-AXTFYDXT.js → chunk-CXXAZ2LZ.js} +1 -1
- package/chunks/{chunk-JYKWOREU.js → chunk-DBUOMHLZ.js} +13 -3
- package/chunks/{chunk-R4Q2PEFV.js → chunk-DLJBYORJ.js} +1 -1
- package/chunks/{chunk-DT75RKNH.js → chunk-DNVA2MQ2.js} +3 -3
- package/chunks/{chunk-J3TJH52D.js → chunk-DOTF2PF2.js} +1 -1
- package/chunks/{chunk-HGAELO7B.js → chunk-DQMBQCTY.js} +2 -2
- package/chunks/{chunk-2ALXPGB4.js → chunk-E6IR653O.js} +1 -1
- package/chunks/{chunk-ZKYR7QS4.js → chunk-EDB556X7.js} +2 -2
- package/chunks/chunk-EKJXDLDD.js +32 -0
- package/chunks/{chunk-NUQVB25K.js → chunk-EKMJR7M3.js} +2 -2
- package/chunks/{chunk-7QYWGTHB.js → chunk-EPVEPTI3.js} +44 -151
- package/chunks/{chunk-GCDXVPFK.js → chunk-EZSSJSKR.js} +31 -7
- package/chunks/{chunk-S6Q6Q4P2.js → chunk-FBDHP23D.js} +1 -1
- package/chunks/{chunk-UKZ45TJL.js → chunk-FFBP5POK.js} +420 -219
- package/chunks/{chunk-3I7W2POO.js → chunk-FGROOEKM.js} +5 -40
- package/chunks/{chunk-HNLMYDQE.js → chunk-FMLBBXHB.js} +13 -9
- package/chunks/{chunk-SSGAAWLY.js → chunk-GCV4NOHV.js} +95 -73
- package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
- package/chunks/{chunk-XBZTAGB7.js → chunk-GMN73IMT.js} +1 -1
- package/chunks/{chunk-IAEXTMED.js → chunk-GNV2SFO7.js} +173 -7
- package/chunks/{chunk-CXTPVBFA.js → chunk-GSS4SZNG.js} +100 -17
- package/chunks/chunk-GXN7DWZZ.js +154 -0
- package/chunks/{chunk-SODMFNAR.js → chunk-H23UWPF7.js} +5 -5
- package/chunks/{chunk-6HUXPLB5.js → chunk-HEOH7JZY.js} +5 -5
- package/chunks/{chunk-DTNV6UZY.js → chunk-HFJSQ4GL.js} +10 -24
- package/chunks/{chunk-GOXQL4YH.js → chunk-HWRXJQ6B.js} +2 -2
- package/chunks/{chunk-VZUCTJ2P.js → chunk-I6YJZGHS.js} +10 -10
- package/chunks/{chunk-RZHU3K6M.js → chunk-IAS753HG.js} +2 -20
- package/chunks/{chunk-EDMXGXAK.js → chunk-IBRQG2MP.js} +10 -13
- package/chunks/chunk-INGBUYL6.js +230 -0
- package/chunks/{chunk-7BXXIQG4.js → chunk-J73WJIMT.js} +36 -72
- package/chunks/{chunk-XGYHNWL3.js → chunk-J7LBAKDH.js} +3 -3
- package/chunks/{chunk-Z3GF56ME.js → chunk-JAYWZWZF.js} +3 -3
- package/chunks/{chunk-DYFOSJHU.js → chunk-JBFC2644.js} +2756 -1153
- package/chunks/{chunk-Q5BD56BW.js → chunk-JPCYCFYG.js} +7 -7
- package/chunks/{chunk-LG5Y4OWO.js → chunk-JRHKM3YQ.js} +2 -2
- package/chunks/{chunk-NHCZJQE4.js → chunk-JZKBMADP.js} +6 -6
- package/chunks/{chunk-MF6E7FSA.js → chunk-K7CQWBLT.js} +8 -201
- package/chunks/{chunk-K2OJUPOE.js → chunk-KP2FHIFR.js} +12 -0
- package/chunks/{chunk-ZU47FBOC.js → chunk-KSIOXYVX.js} +126 -12
- package/chunks/{chunk-IV7GDNKC.js → chunk-KZCK5JUN.js} +4 -4
- package/chunks/{chunk-3XLK2QMY.js → chunk-L3S2Y2FF.js} +59 -16
- package/chunks/{chunk-ZW2EUO2A.js → chunk-L6DIANLD.js} +1 -1
- package/chunks/{chunk-6W4HBUA2.js → chunk-LATAUG2M.js} +1 -1
- package/chunks/{chunk-RWVD5RRY.js → chunk-LBDASOPR.js} +3 -3
- package/chunks/{chunk-OX7IZ2G5.js → chunk-LF5AD7PY.js} +4 -4
- package/chunks/{chunk-NMRCXKQ5.js → chunk-LKCNETDW.js} +3 -3
- package/chunks/chunk-LMJSPC55.js +260 -0
- package/chunks/{chunk-X6K77VHC.js → chunk-LWWRJRCD.js} +1 -1
- package/chunks/{chunk-UXEO7E3V.js → chunk-LYD3T3H7.js} +1 -0
- package/chunks/{chunk-KFZYGSJN.js → chunk-M3YNPR56.js} +3 -3
- package/chunks/{chunk-HBQ2NXOU.js → chunk-MDG6GKSE.js} +2 -2
- package/chunks/{chunk-E4UEO3XM.js → chunk-ME4JBHSB.js} +324 -2
- package/chunks/{chunk-BV6Q5HMY.js → chunk-MJHLKWGJ.js} +8 -7
- package/chunks/{chunk-NFYEQRLG.js → chunk-MQRLLBMQ.js} +1 -1
- package/chunks/{chunk-O4KNCAX4.js → chunk-NCPFOLM2.js} +11 -0
- package/chunks/{chunk-2SZH22YO.js → chunk-NJ2OFVUX.js} +115 -97
- package/chunks/{chunk-DAWWT2ID.js → chunk-NN4EC2WO.js} +1374 -2164
- package/chunks/{chunk-6MBXY6WM.js → chunk-NRQI3PGS.js} +1 -1
- package/chunks/{chunk-HBU7EKY4.js → chunk-NRUKL236.js} +45 -15
- package/chunks/{chunk-53GWJOLP.js → chunk-NTCFKGQF.js} +3 -1
- package/chunks/{chunk-3CZ2BQV6.js → chunk-NXUZFW3G.js} +49 -19
- package/chunks/{chunk-X7UJKOHZ.js → chunk-OMDXAHCT.js} +4 -6
- package/chunks/{chunk-5GLDOLNQ.js → chunk-OWUAZXXN.js} +4 -3
- package/chunks/{chunk-2UWQX4FP.js → chunk-OZEV3R3S.js} +1 -1
- package/chunks/{acp-subagent-executor-LEUN3N7N.js → chunk-PAPBT3WP.js} +11 -110
- package/chunks/{chunk-7ICHPMBQ.js → chunk-PHSQVB6D.js} +4 -4
- package/chunks/{chunk-FCQJLMA2.js → chunk-Q3TFRP5G.js} +178 -8
- package/chunks/{chunk-YQHLFCPU.js → chunk-Q5CCYZD3.js} +32 -24
- package/chunks/chunk-QQL5BFOL.js +1416 -0
- package/chunks/{chunk-ZKZHSB5W.js → chunk-QR4Q425T.js} +9 -9
- package/chunks/{chunk-J6MB5ZHZ.js → chunk-QZW6WRB7.js} +2 -1
- package/chunks/{chunk-TP6FYVQT.js → chunk-RSWBT7AZ.js} +33 -1
- package/chunks/{chunk-2PJRI3EH.js → chunk-RVOD66ID.js} +218 -43
- package/chunks/{chunk-W5FIP7FC.js → chunk-S3PU3CNW.js} +5 -5
- package/chunks/chunk-S7UQ3V2H.js +87 -0
- package/chunks/{chunk-N6VQ37ZZ.js → chunk-SFL6U7U7.js} +1 -1
- package/chunks/{chunk-MOS5OAOG.js → chunk-SROLVJFY.js} +6 -6
- package/chunks/{chunk-HUXPEUFL.js → chunk-SYROIHU7.js} +1 -1
- package/chunks/{chunk-E7LB57MB.js → chunk-T3LUMYFP.js} +6 -6
- package/chunks/{chunk-PSPAM24S.js → chunk-TBSCTWKF.js} +6 -0
- package/chunks/{chunk-5KI7ZDTB.js → chunk-TV5WDW7R.js} +24 -12
- package/chunks/{chunk-NMCDMLHL.js → chunk-TXUJOKVR.js} +50 -35
- package/chunks/{chunk-NHJKAR6E.js → chunk-TYWLBEL2.js} +972 -18
- package/chunks/chunk-U6H3XTFA.js +95 -0
- package/chunks/{chunk-GSILBZLN.js → chunk-U7RWQBGZ.js} +2 -2
- package/chunks/{chunk-7APZIRH3.js → chunk-V3CMBOQ6.js} +5 -5
- package/chunks/{chunk-JXNIF2O5.js → chunk-V545KI73.js} +1 -1
- package/chunks/chunk-VGY2RGXL.js +100 -0
- package/chunks/{chunk-TBEXLLAO.js → chunk-VRQZESKP.js} +1 -1
- package/chunks/{chunk-FN3JNDRU.js → chunk-VVI7MK3V.js} +3 -3
- package/chunks/{chunk-EUURTIV6.js → chunk-WBSJ6VPZ.js} +10 -2
- package/chunks/{chunk-NLNQNBZ2.js → chunk-WD6YQI5M.js} +1 -1
- package/chunks/chunk-WFNEY5G7.js +347 -0
- package/chunks/{chunk-XKBFYTCD.js → chunk-WK6DEH3Q.js} +46 -0
- package/chunks/{chunk-36HCNKDS.js → chunk-WKVZES7O.js} +65 -14
- package/chunks/{chunk-BWAMMKIS.js → chunk-WLLRNQVT.js} +135 -6
- package/chunks/{chunk-MHAADZOZ.js → chunk-WMSP3XZK.js} +3 -3
- package/chunks/{chunk-IL5M5NYD.js → chunk-WUTXSXPP.js} +11 -9
- package/chunks/{chunk-NJQTG2G3.js → chunk-XE5ZFBVD.js} +11 -11
- package/chunks/{chunk-OLTN767L.js → chunk-XO3Z27IL.js} +2 -2
- package/chunks/{chunk-VX63RJXE.js → chunk-XX5HQLCZ.js} +7 -0
- package/chunks/{chunk-2Z3T52OC.js → chunk-Y5TM7SBV.js} +7 -2
- package/chunks/{chunk-V2P3DOQR.js → chunk-YDFOHRS5.js} +1 -1
- package/chunks/{chunk-QMUYLYT5.js → chunk-YGFJ6BRT.js} +1 -1
- package/chunks/{chunk-LK2WUCDQ.js → chunk-YM6KUQ2S.js} +1 -1
- package/chunks/{chunk-F42YYSCK.js → chunk-YVF4PKCV.js} +8 -8
- package/chunks/{chunk-LDVNJZGH.js → chunk-Z2H5HQS3.js} +17 -8
- package/chunks/chunk-Z72PLR74.js +36 -0
- package/chunks/{chunk-BWQLXU37.js → chunk-ZDHXRKRG.js} +381 -86
- package/chunks/{chunk-BHTYRHJF.js → chunk-ZJ7JQUGY.js} +4 -1
- package/chunks/{chunk-4ALNJDHL.js → chunk-ZKIAGIGH.js} +87 -4
- package/chunks/{chunk-VG3Q2NC4.js → chunk-ZNI3YJHS.js} +32 -12
- package/chunks/chunk-ZRZZLM37.js +2780 -0
- package/chunks/{chunk-Q2LVVIKF.js → chunk-ZZUXUBEB.js} +29 -12
- package/chunks/codex-subagent-executor-SM3TUSBA.js +586 -0
- package/chunks/{config-utils-L6KLDYIV.js → config-utils-JHKHFOG6.js} +60 -56
- package/chunks/{contextCommand-UYEH7NIU.js → contextCommand-XE4NDYQW.js} +58 -54
- package/chunks/{core-runtime-NVHT3Z3V.js → core-runtime-PNCWH3RE.js} +58 -55
- package/chunks/{create-sub-session-TIGCFGCS.js → create-sub-session-MSGNIM37.js} +5 -2
- package/chunks/{create-sub-session-YWASE5VH.js → create-sub-session-P7E5Y3HY.js} +169 -89
- package/chunks/{cron-create-AKWX67FO.js → cron-create-U2JJ5CCF.js} +3 -3
- package/chunks/{cron-delete-XPB6IYZJ.js → cron-delete-7DM4LJWD.js} +2 -2
- package/chunks/{cron-list-XBKO4WU5.js → cron-list-VCUSZK2Y.js} +2 -2
- package/chunks/{daemon-G5TYKZD6.js → daemon-NJB4PWZ7.js} +3 -1
- package/chunks/{daemon-git-worktree-guard-FOW4RQSK.js → daemon-git-worktree-guard-JFD5VZRN.js} +58 -54
- package/chunks/{daemon-status-provider-O5KQZYMP.js → daemon-status-provider-A3VFVFWW.js} +68 -63
- package/chunks/{daemon-trust-policy-3ATXEON7.js → daemon-trust-policy-NPZ47MZH.js} +64 -60
- package/chunks/{daemon-trust-policy-monitor-7MCNDNEC.js → daemon-trust-policy-monitor-XG2CHL3Z.js} +64 -60
- package/chunks/{de-UU2YTO37.js → de-VGY3VNBU.js} +3 -3
- package/chunks/{deferred-core-runtime-JK5IXL5K.js → deferred-core-runtime-V42EMU27.js} +56 -52
- package/chunks/{discovery-XP4RMDUM.js → discovery-5KUEPR65.js} +2 -2
- package/chunks/{display-image-NAH3AZ63.js → display-image-QTHALY6N.js} +3 -3
- package/chunks/{dist-KLZ7XGEQ.js → dist-2QYIVNS6.js} +1 -4
- package/chunks/{dist-AHJYPSJL.js → dist-GUB7QRYA.js} +2 -5
- package/chunks/{dist-ZXTZTE54.js → dist-MPUZZOG5.js} +4 -17
- package/chunks/{dist-F2DVGTL3.js → dist-NIOJXMGY.js} +111 -101
- package/chunks/{dist-KJGRVIGJ.js → dist-PA7WPFVE.js} +5 -36
- package/chunks/{dist-AIKC5E5P.js → dist-SE4J6Z4O.js} +43 -669
- package/chunks/{dist-H6G3K26N.js → dist-T6DDPDLQ.js} +14 -34
- package/chunks/{dist-GWNQVPZT.js → dist-TFGETXFN.js} +10 -33
- package/chunks/{dist-ZA52JXAS.js → dist-VDLSBCLM.js} +1 -5
- package/chunks/{edit-SY35KYIE.js → edit-E2ZGJDBJ.js} +46 -42
- package/chunks/{en-CAJHTIQT.js → en-E5ZO5TZW.js} +5 -3
- package/chunks/{enter-worktree-54L5QJ3N.js → enter-worktree-CAARFWBI.js} +6 -5
- package/chunks/{enterPlanMode-HXX6KQJR.js → enterPlanMode-442YAAZB.js} +43 -39
- package/chunks/{environment-DKXHG4HB.js → environment-DCJ5FVHM.js} +59 -55
- package/chunks/{errors-ADY7LQJJ.js → errors-ZWTDW2NJ.js} +58 -54
- package/chunks/exec-RPKEY6HP.js +505 -0
- package/chunks/{exit-worktree-EORJDKDS.js → exit-worktree-JXGGUOBP.js} +6 -5
- package/chunks/{exitPlanMode-HSK2CQI6.js → exitPlanMode-4PLQOFOO.js} +43 -39
- package/chunks/{fast-path-U636VWN2.js → fast-path-DBSGDGB3.js} +10 -10
- package/chunks/{fast-path-settings-V7MI7EZJ.js → fast-path-settings-XDYX7X5Z.js} +2 -2
- package/chunks/{fr-HKNWVXRJ.js → fr-UAZJJH5N.js} +3 -3
- package/chunks/{glob-GUGGTH5L.js → glob-VWOE4W7K.js} +43 -39
- package/chunks/{goal-tools-PXYRSQGX.js → goal-tools-K6SIBXMB.js} +49 -41
- package/chunks/{grep-3PKFKLCA.js → grep-H2I33VAO.js} +8 -3
- package/chunks/{handleAutoUpdate-5KHS4HIN.js → handleAutoUpdate-NCC3XELY.js} +61 -57
- package/chunks/{i18n-KSGKMUPT.js → i18n-GO7JI4PT.js} +57 -53
- package/chunks/{image-gen-OCCR2WWU.js → image-gen-5G2TQ3DY.js} +6 -5
- package/chunks/{initializer-YYT5XEZF.js → initializer-BXKAW5A6.js} +64 -60
- package/chunks/{installationInfo-UNSBPYW2.js → installationInfo-5JONIX62.js} +57 -53
- package/chunks/{ja-GJS5RZGU.js → ja-2RITCMAJ.js} +3 -3
- package/chunks/list-QW74LCLS.js +133 -0
- package/chunks/{list-agents-QLDXS5OD.js → list-agents-EWDCEPIW.js} +3 -3
- package/chunks/{llm-XGGLBGPH.js → llm-FJHSMJTM.js} +161 -125
- package/chunks/{llm-content-generator-ZHQQT5W7.js → llm-content-generator-3VLLPQS4.js} +14 -7
- package/chunks/{loadedSettingsAdapter-3DXLASK7.js → loadedSettingsAdapter-OLMQSKVC.js} +64 -60
- package/chunks/{loggingContentGenerator-V72OCCJO.js → loggingContentGenerator-IMLIJULY.js} +47 -43
- package/chunks/{loop-wakeup-HHMYIC7Z.js → loop-wakeup-VG6CGBQA.js} +4 -4
- package/chunks/{ls-N7ABR6HI.js → ls-6ZB3BEIR.js} +1 -1
- package/chunks/{lsp-LTOFWG5P.js → lsp-M54FQARP.js} +5 -1
- package/chunks/{managed-npm-update-HV5LPZH2.js → managed-npm-update-LXLBWCNA.js} +57 -53
- package/chunks/mcp-FOXA3372.js +127 -0
- package/chunks/model-configuration-SCOI2KPF.js +140 -0
- package/chunks/modelConfigUtils-EA44S64C.js +119 -0
- package/chunks/{monitor-TLBNM4MV.js → monitor-TJAHYCCY.js} +43 -39
- package/chunks/{nonInteractiveCli-LSJSQ2W4.js → nonInteractiveCli-QH2HABWC.js} +112 -107
- package/chunks/{notebook-edit-OSPOLZP6.js → notebook-edit-WEMSBUBS.js} +45 -41
- package/chunks/{openaiContentGenerator-BE4S5TRD.js → openaiContentGenerator-WD5DWYOA.js} +24 -19
- package/chunks/{openaiResponsesContentGenerator-RTCAJ5V5.js → openaiResponsesContentGenerator-AWRYZLJU.js} +110 -19
- package/chunks/{pidfile-H32FEPWA.js → pidfile-TQL2LCEG.js} +56 -52
- package/chunks/{processUtils-SSLIPDEA.js → processUtils-6ZU56DCI.js} +2 -2
- package/chunks/{prompt-terminal-ledger-I5SLL6UF.js → prompt-terminal-ledger-3HAKHXFV.js} +57 -53
- package/chunks/{pt-FXMYXEUV.js → pt-5ZF7ZQUV.js} +3 -3
- package/chunks/{qwenContentGenerator-TMQC623Z.js → qwenContentGenerator-3OIZQZLC.js} +47 -43
- package/chunks/{qwenOAuth2-3ZRQHHTC.js → qwenOAuth2-WIEUEFEY.js} +5 -4
- package/chunks/{read-file-T2QAIZE2.js → read-file-2PWWL6J2.js} +9 -8
- package/chunks/{read-mcp-resource-B37WANAQ.js → read-mcp-resource-LPSWXVOD.js} +1 -1
- package/chunks/{record-artifact-OAXWXZ5D.js → record-artifact-PXMNP7GZ.js} +3 -3
- package/chunks/{record-source-D7R7X3GT.js → record-source-2GSY5JD5.js} +6 -6
- package/chunks/{report-findings-AR3VC6EQ.js → report-findings-W6GR7SYZ.js} +4 -4
- package/chunks/{request-shutdown-IKNWTX5M.js → request-shutdown-53SNYGVR.js} +5 -5
- package/chunks/{resumeHistoryUtils-QLKDH5GY.js → resumeHistoryUtils-S4TEUTKE.js} +63 -59
- package/chunks/{ripGrep-YGWL7KCV.js → ripGrep-5NMGLMLX.js} +13 -11
- package/chunks/{ru-RMHURE5U.js → ru-7BNZFQKG.js} +3 -3
- package/chunks/{run-qwen-serve-26KZDECC.js → run-qwen-serve-6MGYRK4V.js} +314 -127
- package/chunks/{runtime-BMEIVDDG.js → runtime-ZJYUQCPP.js} +69 -65
- package/chunks/{scheduled-tasks-NCFPP6VQ.js → scheduled-tasks-5MKF4EV3.js} +66 -60
- package/chunks/{scheduler-47TVMUVN.js → scheduler-72DZWRH5.js} +58 -54
- package/chunks/{sdk-exporters-http-VWTF4W6K.js → sdk-exporters-http-3R2TRQHE.js} +2 -1
- package/chunks/{sdk-impl-G6FVTBQZ.js → sdk-impl-4WF3VZ2F.js} +3 -3
- package/chunks/{send-message-TWOGWCBG.js → send-message-UMJKN27Q.js} +7 -7
- package/chunks/{serve-KL3G6LQQ.js → serve-7ZDMMA7I.js} +66 -62
- package/chunks/{server-LBPYXZ5G.js → server-ONK5RTEV.js} +783 -350
- package/chunks/{session-YG6742LO.js → session-XQW2LM4S.js} +117 -112
- package/chunks/{session-attachments-root-OUBQDYC4.js → session-attachments-root-Q5IUCMQV.js} +56 -52
- package/chunks/{session-pr-refresh-EKGMYNAW.js → session-pr-refresh-MVECWT3W.js} +66 -60
- package/chunks/{settings-DDNHJX2L.js → settings-DL6K2HQ3.js} +67 -63
- package/chunks/{shell-KUCXWITU.js → shell-BLP25QJU.js} +43 -39
- package/chunks/{skill-JQLKPNWZ.js → skill-7KURUNLD.js} +128 -23
- package/chunks/{skill-settings-XERQCUXZ.js → skill-settings-MY76LM46.js} +72 -60
- package/chunks/{spawnChannel-GQ45QFGB.js → spawnChannel-IJLH3Z74.js} +60 -55
- package/chunks/{standalone-update-PRF3ILGZ.js → standalone-update-YQKN7VNO.js} +58 -54
- package/chunks/{start-opentui-ui-JDSOZE3N.js → start-opentui-ui-ORNGKZTG.js} +2693 -2160
- package/chunks/{startInteractiveUI-RRW3JVHN.js → startInteractiveUI-PRLIKB4U.js} +1610 -1773
- package/chunks/{syntheticOutput-F6F27JMK.js → syntheticOutput-EX5L5GYI.js} +2 -2
- package/chunks/{task-create-Y623TBHB.js → task-create-75HVPEAH.js} +7 -7
- package/chunks/{task-list-FCPEEGWL.js → task-list-ZLJSMRFA.js} +2 -2
- package/chunks/{task-stop-QTKZXLPH.js → task-stop-MD7P6QGK.js} +1 -1
- package/chunks/{task-update-YLSXF25N.js → task-update-RI7QNVDP.js} +20 -13
- package/chunks/{team-create-5DRLOLOE.js → team-create-ANLKOQ44.js} +43 -39
- package/chunks/{team-delete-S7TLHZCF.js → team-delete-RIDINW6I.js} +1 -1
- package/chunks/{team-plan-approval-MWSGAL5T.js → team-plan-approval-EFUENI6Y.js} +43 -39
- package/chunks/{terminal-image-renderer-H7PD4FQW.js → terminal-image-renderer-CXMFIWKC.js} +58 -54
- package/chunks/{theme-manager-7AV73D6R.js → theme-manager-JUFYQDQQ.js} +56 -52
- package/chunks/{todoWrite-5QI2H2FW.js → todoWrite-XSTG2VT5.js} +6 -3
- package/chunks/{tool-search-UGYTBLUV.js → tool-search-SNCEA4VA.js} +17 -12
- package/chunks/{total-session-admission-JIHSTJ5S.js → total-session-admission-UHYNUO3L.js} +63 -58
- package/chunks/{tree-sitter-4D7QS7F6.js → tree-sitter-NZ3QACD7.js} +1 -1
- package/chunks/{tree-sitter-bash-VEJGF5XF.js → tree-sitter-bash-WXHLMORC.js} +1 -1
- package/chunks/{trustedFolders-5VCBXFOP.js → trustedFolders-YBR5URPG.js} +57 -53
- package/chunks/{update-relaunch-4LF3APCV.js → update-relaunch-L6MTSN76.js} +5 -5
- package/chunks/{updateCheck-4T3WUE5F.js → updateCheck-Z3SPZXHC.js} +60 -56
- package/chunks/{useAutoAcceptIndicator-UMGB64Z6.js → useAutoAcceptIndicator-PR5XGMO6.js} +68 -64
- package/chunks/{validateNonInterActiveAuth-GFJ72U2C.js → validateNonInterActiveAuth-KFLTWEYW.js} +109 -104
- package/chunks/{version-EAAZN4T2.js → version-NGAKFVUF.js} +1 -1
- package/chunks/{web-fetch-VRU3A2NI.js → web-fetch-WPGTHGU5.js} +15 -13
- package/chunks/web-search-JT63IJJV.js +39 -0
- package/chunks/{web-shell-static-CCN4JZEE.js → web-shell-static-T7UGLVE4.js} +2 -7
- package/chunks/{workflow-UHPFALVZ.js → workflow-EB63BAL4.js} +179 -79
- package/chunks/workspace-providers-status-NEPR67D2.js +133 -0
- package/chunks/{workspace-registration-store-A7RGKW62.js → workspace-registration-store-CFWXOMGH.js} +2 -2
- package/chunks/{workspace-registry-C2NGE6SD.js → workspace-registry-6KRZXOGB.js} +63 -58
- package/chunks/{workspace-runtime-coordinator-QKMZ24YF.js → workspace-runtime-coordinator-SP4X3UVH.js} +66 -59
- package/chunks/{workspace-service-RQTTAGGC.js → workspace-service-PRMYJTTV.js} +70 -65
- package/chunks/workspace-skills-status-VYTZJ5MB.js +130 -0
- package/chunks/{workspace-trust-reconciler-KFWATZUU.js → workspace-trust-reconciler-B4QMGDMI.js} +73 -68
- package/chunks/{write-file-DPVB2SBQ.js → write-file-EGBMW7TS.js} +45 -41
- package/chunks/{zh-TW-2K2WRFPY.js → zh-TW-7PRVUGLW.js} +5 -3
- package/chunks/{zh-S5V3Z5CR.js → zh-V2EYTYJP.js} +5 -3
- package/chunks/{zoom-image-S7AWLAPC.js → zoom-image-UR6K2LDR.js} +11 -10
- package/cli.js +18 -17
- package/codeModeHost.js +4425 -0
- package/export-transcript-document.css +1 -1
- package/export-transcript-document.js +151 -151
- package/locales/ca.js +5 -6
- package/locales/de.js +5 -6
- package/locales/en.js +7 -6
- package/locales/fr.js +6 -6
- package/locales/ja.js +5 -6
- package/locales/pt.js +5 -6
- package/locales/ru.js +6 -6
- package/locales/zh-TW.js +7 -6
- package/locales/zh.js +7 -6
- package/package.json +4 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-nU24rpIE.js → abnfDiagram-VCTEODGH-S_JCiANq.js} +1 -1
- package/web-shell/assets/{arc-D1hTu8QI.js → arc-DP-839Xn.js} +1 -1
- package/web-shell/assets/architectureDiagram-5GKGNRK7-C8rCd2KK.js +36 -0
- package/web-shell/assets/blockDiagram-NRAW4CY4-DQR82jwr.js +129 -0
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-kEFoC1ei.js → c4Diagram-UCG6FXSJ-D21PNMRP.js} +4 -4
- package/web-shell/assets/channel-BgGrpX_z.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DbT9wS7j.js → chunk-2Q5K7J3B-KdDInGLi.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-CNbULt6O.js → chunk-5VM5RSS4-ltb7zRmH.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-CbQRy4Tb.js → chunk-F27PBJKO-DcpQA0Ng.js} +1 -1
- package/web-shell/assets/chunk-G27WJ6UU-C8NDZxcy.js +231 -0
- package/web-shell/assets/chunk-JWPE2WC7-hXhhHTs1.js +1 -0
- package/web-shell/assets/chunk-LCL6LL3I-CLaOR-Hl.js +206 -0
- package/web-shell/assets/chunk-POPQ4Y6H-Y5_qlB1N.js +1 -0
- package/web-shell/assets/{chunk-SVP7TREG-DyBb2Axj.js → chunk-SVP7TREG-BWX2Voh7.js} +4 -4
- package/web-shell/assets/{chunk-XXDRQBXY-BIA0eb5B.js → chunk-XXDRQBXY-1wmj_kXI.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-jUH7ADYs.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-jUH7ADYs.js +1 -0
- package/web-shell/assets/cose-bilkent-JH36ORCC-DpLc-cdd.js +1 -0
- package/web-shell/assets/cynefin-OW5HDTMX-DhxGiPZW.js +178 -0
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-LENf_IUy.js → cynefinDiagram-5FMLGOSQ-Dl3jfBry.js} +1 -1
- package/web-shell/assets/{cytoscape.esm-CUqq0XTU.js → cytoscape.esm-DJK6lGiH.js} +3 -3
- package/web-shell/assets/dagre-3AP2YEHR-C8FA8vJk.js +4 -0
- package/web-shell/assets/diagram-S7CK7UJ4-D-quIUtW.js +30 -0
- package/web-shell/assets/diagram-UQ7AKVKN-Bjo09Uts.js +41 -0
- package/web-shell/assets/diagram-VSXAHHWV-IoI3ttq4.js +3 -0
- package/web-shell/assets/diagram-VX7I27RA-BKyOZ5SO.js +24 -0
- package/web-shell/assets/diagram-Z3DM3KII-Cu_OHEhw.js +24 -0
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-BGpiquRm.js → ebnfDiagram-PWID7BFC-UVB-bbPg.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-D0besu_U.js → erDiagram-SSCWMZ5O-l8drddto.js} +13 -13
- package/web-shell/assets/flowDiagram-A5DVABFB-DU1I_VAI.js +168 -0
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CNlsAeNr.js → ganttDiagram-EL5Y4UJY-BLRH05uB.js} +1 -1
- package/web-shell/assets/gitGraphDiagram-WWUBYQGX-Czg_BkRE.js +106 -0
- package/web-shell/assets/index-CmMV8Jla.js +3 -0
- package/web-shell/assets/{index-CGT341lL.js → index-DohPy72Z.js} +1 -1
- package/web-shell/assets/index-DyMtNYuu.js +2207 -0
- package/web-shell/assets/index-n6N-2a3v.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-Bpai64Ll.js → infoDiagram-RXCK75RN-BpBvjkro.js} +1 -1
- package/web-shell/assets/ishikawaDiagram-5VMMS53U-phy1l3jm.js +70 -0
- package/web-shell/assets/{journeyDiagram-EYS64GPL-iz_DKgFX.js → journeyDiagram-EYS64GPL-oY-9LgVS.js} +1 -1
- package/web-shell/assets/kanban-definition-3QL26DDD-slZoy-sc.js +89 -0
- package/web-shell/assets/{layout-qEvKgnvU.js → layout-0hnn_P9l.js} +1 -1
- package/web-shell/assets/{linear-C6lklGdq.js → linear-7Wqe8DRy.js} +1 -1
- package/web-shell/assets/mermaid.core-BaK8n0bq.js +312 -0
- package/web-shell/assets/mindmap-definition-FBJOCRG2-BedUdy_E.js +96 -0
- package/web-shell/assets/{pegDiagram-XKGWAZYB-BhD0q0i6.js → pegDiagram-XKGWAZYB-DQLRdmxq.js} +1 -1
- package/web-shell/assets/pieDiagram-E7YTZNPT-UC20w9-5.js +39 -0
- package/web-shell/assets/quadrantDiagram-AXDQQJYC-CQx2Hmk3.js +7 -0
- package/web-shell/assets/qwen-code-notification-BRVagufF.png +0 -0
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-E1g2KIFK.js → railroadDiagram-O6MQD6OU-2UEJe_y-.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CuerYJOe.js → requirementDiagram-EFPCY7ZU-DOAJggB4.js} +13 -13
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CqWyCZGA.js → sankeyDiagram-P5KCCOFB-DnQ_qJo7.js} +7 -7
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-B-YWb8x4.js → sequenceDiagram-WJ2MYXX4-DZrZUoCo.js} +16 -16
- package/web-shell/assets/sizeCapture-X5ZJPWSS-B5G4GDQB.js +1 -0
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-C8LDpNHS.js → stateDiagram-HBIQ2CUA-Bn1cT0qF.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BF3xtNvJ.js +1 -0
- package/web-shell/assets/swimlanes-XN3QIQJK-Bzhcdn87.js +1 -0
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B753mA3E.js +8 -0
- package/web-shell/assets/timeline-definition-24CTP7MA-BqZ_3D10.js +120 -0
- package/web-shell/assets/vennDiagram-4TSXK5OY-z9kw1kmm.js +34 -0
- package/web-shell/assets/wardleyDiagram-VM6X3IG4-Cydp1zJW.js +78 -0
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-ruD2Wjhg.js → xychartDiagram-S5SC5T6Z-j4X1lQKo.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-7Q2AXRDJ.js +0 -114
- package/chunks/chunk-AEY27Z35.js +0 -1411
- package/chunks/chunk-CFKIH3D3.js +0 -50
- package/chunks/chunk-HWVUSYSN.js +0 -126
- package/chunks/chunk-QHMLYMMS.js +0 -32
- package/chunks/chunk-SAH4BD2J.js +0 -92
- package/chunks/chunk-TWUKBNWM.js +0 -86
- package/chunks/chunk-ZTTC7T4X.js +0 -126
- package/chunks/list-YL6LDQKQ.js +0 -129
- package/chunks/mcp-IYVSIW6O.js +0 -123
- package/chunks/web-search-NEGYQNDJ.js +0 -912
- package/chunks/workspace-providers-status-AEYISSU2.js +0 -127
- package/chunks/workspace-skills-status-5HWZU3HX.js +0 -126
- package/web-shell/assets/architectureDiagram-5GKGNRK7-B_fgkKe7.js +0 -36
- package/web-shell/assets/blockDiagram-NRAW4CY4-C3pddUNg.js +0 -129
- package/web-shell/assets/channel-Blod4z1X.js +0 -1
- package/web-shell/assets/chunk-G27WJ6UU-CVbXTxYk.js +0 -231
- package/web-shell/assets/chunk-JWPE2WC7-D89c_BXy.js +0 -1
- package/web-shell/assets/chunk-LCL6LL3I-B7-I_9KB.js +0 -206
- package/web-shell/assets/chunk-POPQ4Y6H-DcLQFzS4.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-D6hFDMqb.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-D6hFDMqb.js +0 -1
- package/web-shell/assets/cose-bilkent-JH36ORCC-Db2FYN85.js +0 -1
- package/web-shell/assets/cynefin-OW5HDTMX-i4GwmBVy.js +0 -178
- package/web-shell/assets/dagre-3AP2YEHR-CF9XVrD9.js +0 -4
- package/web-shell/assets/diagram-S7CK7UJ4-DD5PJfSm.js +0 -30
- package/web-shell/assets/diagram-UQ7AKVKN-CjD_sBMj.js +0 -41
- package/web-shell/assets/diagram-VSXAHHWV-U5WwMqyA.js +0 -3
- package/web-shell/assets/diagram-VX7I27RA-BujpHJJf.js +0 -24
- package/web-shell/assets/diagram-Z3DM3KII-3ZLtKEXo.js +0 -24
- package/web-shell/assets/flowDiagram-A5DVABFB-9DwDuIyr.js +0 -168
- package/web-shell/assets/gitGraphDiagram-WWUBYQGX-C_pPFiTR.js +0 -106
- package/web-shell/assets/index-BYWs4JWq.js +0 -3
- package/web-shell/assets/index-D3YS6KuJ.js +0 -2173
- package/web-shell/assets/index-eBxK3rs2.css +0 -36
- package/web-shell/assets/ishikawaDiagram-5VMMS53U-ktpJFq4r.js +0 -70
- package/web-shell/assets/kanban-definition-3QL26DDD-m_gG00Yt.js +0 -89
- package/web-shell/assets/mermaid.core-DSCYB_2P.js +0 -312
- package/web-shell/assets/mindmap-definition-FBJOCRG2-DRQbT8w-.js +0 -96
- package/web-shell/assets/pieDiagram-E7YTZNPT-BvIGQCSd.js +0 -39
- package/web-shell/assets/quadrantDiagram-AXDQQJYC-BDQtfpU-.js +0 -7
- package/web-shell/assets/sizeCapture-X5ZJPWSS-BB7YY4Tl.js +0 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C4CbdvGa.js +0 -1
- package/web-shell/assets/swimlanes-XN3QIQJK-D94vOoxZ.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN--QNSIOC8.js +0 -8
- package/web-shell/assets/timeline-definition-24CTP7MA-C9C8uEYm.js +0 -120
- package/web-shell/assets/vennDiagram-4TSXK5OY-CYzMHbVW.js +0 -34
- package/web-shell/assets/wardleyDiagram-VM6X3IG4-G9nhtLES.js +0 -78
- package/chunks/{open-with-auth-6MVIHMXB.js → open-with-auth-XFCCJOO6.js} +3 -3
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import{I as he}from"./chunk-2Q5K7J3B-DbT9wS7j.js";import{p as $e}from"./chunk-JWPE2WC7-D89c_BXy.js";import{q as fe,p as ge,s as ue,g as ye,a as xe,b as me,_ as $,A as Q,l as k,j as pe,c as z,z as be,B as we,r as ke,k as L,D as ve,E as Ee,F as Be}from"./mermaid.core-DSCYB_2P.js";import{p as Ce}from"./cynefin-OW5HDTMX-i4GwmBVy.js";import"./index-D3YS6KuJ.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Be({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Ce("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{C.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=C.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=C.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
-
${o-n/2-M/2},${u+I}
|
|
3
|
-
${o-n/2-M/2},${u-I}
|
|
4
|
-
${t.posWithOffset-n/2-M},${u-x-I}
|
|
5
|
-
${t.posWithOffset+n/2+M},${u-x-I}
|
|
6
|
-
${t.posWithOffset+n/2+M},${u+x+I}
|
|
7
|
-
${t.posWithOffset-n/2-M},${u+x+I}`),g.attr("cy",u).attr("cx",o-n/2+M/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){const m=o+c;f.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
-
${t.x},${m+2}
|
|
9
|
-
${t.x},${m-2}
|
|
10
|
-
${t.x+G},${m-x-2}
|
|
11
|
-
${t.x+G+n+4},${m-x-2}
|
|
12
|
-
${t.x+G+n+4},${m+x+2}
|
|
13
|
-
${t.x+G},${m+x+2}`).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),g.attr("cx",t.x+M/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),h.attr("x",t.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+t.x+","+o+")")}}}},"drawCommitTags"),ir=$(e=>{switch(e.customType??e.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dr=$((e,r,t,o)=>{const s={x:0,y:0};if(e.parents.length>0){const d=ie(e.parents);if(d){const n=o.get(d)??s;return r==="TB"?n.y+H:r==="BT"?(o.get(e.id)??s).y-H:n.x+H}}else return r==="TB"?j:r==="BT"?(o.get(e.id)??s).y-H:0;return 0},"calculatePosition"),lr=$((e,r,t)=>{var l,h;const o=y==="BT"&&t?r:r+G,s=(l=C.get(e.branch))==null?void 0:l.pos,d=y==="TB"||y==="BT"?(h=C.get(e.branch))==null?void 0:h.pos:o;if(d===void 0||s===void 0)throw new Error(`Position were undefined for commit ${e.id}`);const n=V.has(z().theme??""),a=y==="TB"||y==="BT"?o:s+(n?J/2+1:-2);return{x:d,y:a,posWithOffset:o}},"getCommitPosition"),te=$((e,r,t,o)=>{const s=e.append("g").attr("class","commit-bullets"),d=e.append("g").attr("class","commit-labels");let n=y==="TB"||y==="BT"?j:0;const a=[...r.keys()],l=o.parallelCommits??!1,h=$((f,c)=>{var m,E;const x=(m=r.get(f))==null?void 0:m.seq,u=(E=r.get(c))==null?void 0:E.seq;return x!==void 0&&u!==void 0?x-u:0},"sortKeys");let g=a.sort(h);y==="BT"&&(l&&er(g,r,n),g=g.reverse()),g.forEach(f=>{var u;const c=r.get(f);if(!c)throw new Error(`Commit not found for key ${f}`);l&&(n=dr(c,y,n,T));const x=lr(c,n,l);if(t){const m=ir(c),E=c.customType??c.type,b=((u=C.get(c.branch))==null?void 0:u.index)??0;sr(s,c,x,m,b,E),or(d,c,x,n,o),cr(d,c,x,n)}y==="TB"||y==="BT"?T.set(c.id,{x:x.x,y:x.posWithOffset}):T.set(c.id,{x:x.posWithOffset,y:x.y}),n=y==="BT"&&l?n+H:n+H+G,n>O&&(O=n)})},"drawCommits"),hr=$((e,r,t,o,s)=>{const n=(y==="TB"||y==="BT"?t.x<o.x:t.y<o.y)?r.branch:e.branch,a=$(h=>h.branch===n,"isOnBranchToGetCurve"),l=$(h=>h.seq>e.seq&&h.seq<r.seq,"isBetweenCommits");return[...s.values()].some(h=>l(h)&&a(h))},"shouldRerouteArrow"),F=$((e,r,t=0)=>{const o=e+Math.abs(e-r)/2;if(t>5)return o;if(U.every(n=>Math.abs(n-o)>=10))return U.push(o),o;const d=Math.abs(e-r);return F(e,r-d/5,t+1)},"findLane"),$r=$((e,r,t,o)=>{var m,E,b,q,_;const{theme:s}=z(),d=ee.has(s??""),n=T.get(r.id),a=T.get(t.id);if(n===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);const l=hr(r,t,n,a,o);let h="",g="",f=0,c=0,x=(m=C.get(t.branch))==null?void 0:m.index;t.type===p.MERGE&&r.id!==t.parents[0]&&(x=(E=C.get(r.branch))==null?void 0:E.index);let u;if(l){h="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",f=10,c=10;const v=n.y<a.y?F(n.y,a.y):F(a.y,n.y),w=n.x<a.x?F(n.x,a.x):F(a.x,n.x);y==="TB"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${g} ${w} ${n.y+c} L ${w} ${a.y-f} ${h} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(b=C.get(r.branch))==null?void 0:b.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${h} ${w} ${n.y+c} L ${w} ${a.y-f} ${g} ${w-c} ${a.y} L ${a.x} ${a.y}`):y==="BT"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${h} ${w} ${n.y-c} L ${w} ${a.y+f} ${g} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(q=C.get(r.branch))==null?void 0:q.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${g} ${w} ${n.y-c} L ${w} ${a.y+f} ${h} ${w-c} ${a.y} L ${a.x} ${a.y}`):n.y<a.y?u=`M ${n.x} ${n.y} L ${n.x} ${v-f} ${h} ${n.x+c} ${v} L ${a.x-f} ${v} ${g} ${a.x} ${v+c} L ${a.x} ${a.y}`:(x=(_=C.get(r.branch))==null?void 0:_.index,u=`M ${n.x} ${n.y} L ${n.x} ${v+f} ${g} ${n.x+c} ${v} L ${a.x-f} ${v} ${h} ${a.x} ${v-c} L ${a.x} ${a.y}`)}else h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,y==="TB"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${g} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${h} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):y==="BT"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${h} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${g} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):(n.y<a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y>a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y===a.y&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`));if(u===void 0)throw new Error("Line definition not found");e.append("path").attr("d",u).attr("class","arrow arrow"+S(x,A,d))},"drawArrow"),fr=$((e,r)=>{const t=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(o=>{const s=r.get(o);s.parents&&s.parents.length>0&&s.parents.forEach(d=>{$r(t,r.get(d),s,r)})})},"drawArrows"),gr=$((e,r,t,o)=>{const{look:s,theme:d,themeVariables:n}=z(),{dropShadow:a,THEME_COLOR_LIMIT:l}=n,h=V.has(d??""),g=ee.has(d??""),f=e.append("g");r.forEach((c,x)=>{var re;const u=S(x,h?l:A,g),m=(re=C.get(c.name))==null?void 0:re.pos;if(m===void 0)throw new Error(`Position not found for branch ${c.name}`);const E=y==="TB"||y==="BT"?m:h?m+J/2+1:m-2,b=f.append("line");b.attr("x1",0),b.attr("y1",E),b.attr("x2",O),b.attr("y2",E),b.attr("class","branch branch"+u),y==="TB"?(b.attr("y1",j),b.attr("x1",m),b.attr("y2",O),b.attr("x2",m)):y==="BT"&&(b.attr("y1",O),b.attr("x1",m),b.attr("y2",j),b.attr("x2",m)),U.push(E);const q=c.name,_=ce(q),v=f.insert("rect"),R=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);R.node().appendChild(_);const B=_.getBBox(),W=h?0:4,Y=h?16:0,P=h?J:0;s==="neo"&&v.attr("data-look","neo"),v.attr("class","branchLabelBkg label"+u).attr("style",s==="neo"?`filter:${h?`url(#${o}-drop-shadow)`:a}`:"").attr("rx",W).attr("ry",W).attr("x",-B.width-4-(t.rotateCommitLabel===!0?30:0)).attr("y",-B.height/2+10).attr("width",B.width+18+Y).attr("height",B.height+4+P),R.attr("transform","translate("+(-B.width-14-(t.rotateCommitLabel===!0?30:0)+Y/2)+", "+(E-B.height/2-2)+")"),y==="TB"?(v.attr("x",m-B.width/2-10).attr("y",0),R.attr("transform","translate("+(m-B.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${-P-10})`),R.attr("transform","translate("+(m-B.width/2-5)+", "+(-P*2+7)+")"))):y==="BT"?(v.attr("x",m-B.width/2-10).attr("y",O),R.attr("transform","translate("+(m-B.width/2-5)+", "+O+")"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${P+10})`),R.attr("transform","translate("+(m-B.width/2-5)+", "+(O+P*2+4)+")"))):v.attr("transform","translate(-19, "+(E-12-P/2)+")")})},"drawBranches"),ur=$(function(e,r,t,o,s){return C.set(e,{pos:r,index:t}),r+=50+(s?40:0)+(y==="TB"||y==="BT"?o.width/2:0),r},"setBranchPosition"),yr=$(function(e,r,t,o){Qe(),k.debug("in gitgraph renderer",e+`
|
|
14
|
-
`,"id:",r,t);const s=o.db;if(!s.getConfig){k.error("getConfig method is not available on db");return}const d=s.getConfig(),n=d.rotateCommitLabel??!1;N=s.getCommits();const a=s.getBranchesAsObjArray();y=s.getDirection();const l=pe(`[id="${r}"]`),{look:h,theme:g,themeVariables:f}=z(),{useGradient:c,gradientStart:x,gradientStop:u,filterColor:m}=f;if(c){const b=l.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}h==="neo"&&V.has(g??"")&&l.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let E=0;a.forEach((b,q)=>{var W;const _=ce(b.name),v=l.append("g"),w=v.insert("g").attr("class","branchLabel"),R=w.insert("g").attr("class","label branch-label");(W=R.node())==null||W.appendChild(_);const B=_.getBBox();E=ur(b.name,E,q,B,n),R.remove(),w.remove(),v.remove()}),te(l,N,!1,d),d.showBranches&&gr(l,a,d,r),fr(l,N),te(l,N,!0,d),be.insertTitle(l,"gitTitleText",d.titleTopMargin??0,s.getDiagramTitle()),we(void 0,l,d.diagramPadding,d.useMaxWidth)},"draw"),xr={draw:yr},de=8,le=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mr=new Set(["redux-color","redux-dark-color"]),pr=new Set(["neo","neo-dark"]),br=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),wr=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),kr=$(e=>{const{svgId:r}=e;let t="";if(e.useGradient&&r)for(let o=0;o<e.THEME_COLOR_LIMIT;o++)t+=`
|
|
15
|
-
.label${o} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
|
|
16
|
-
`;return t},"genGitGraphGradient"),vr=$(e=>{const r=Q(),{theme:t,themeVariables:o}=r,{borderColorArray:s}=o,d=le.has(t);if(pr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
|
|
17
|
-
.branch-label${a} { fill: ${e.nodeBorder};}
|
|
18
|
-
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
19
|
-
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
20
|
-
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
21
|
-
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
22
|
-
.commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
|
|
23
|
-
${kr(e)}`;else{const l=a%de;n+=`
|
|
24
|
-
.branch-label${a} { fill: ${e["gitBranchLabel"+l]}; }
|
|
25
|
-
.commit${a} { stroke: ${e["git"+l]}; fill: ${e["git"+l]}; }
|
|
26
|
-
.commit-highlight${a} { stroke: ${e["gitInv"+l]}; fill: ${e["gitInv"+l]}; }
|
|
27
|
-
.arrow${a} { stroke: ${e["git"+l]}; }
|
|
28
|
-
`}return n}else if(mr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
|
|
29
|
-
.branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
|
|
30
|
-
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
31
|
-
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
|
|
32
|
-
.label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""} }
|
|
33
|
-
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
34
|
-
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
35
|
-
`;else{const l=a%s.length;n+=`
|
|
36
|
-
.branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
|
|
37
|
-
.commit${a} { stroke: ${s[l]}; fill: ${s[l]}; }
|
|
38
|
-
.commit-highlight${a} { stroke: ${s[l]}; fill: ${s[l]}; }
|
|
39
|
-
.label${a} { fill: ${br.has(t)?e.mainBkg:s[l]}; stroke: ${s[l]}; stroke-width: ${e.strokeWidth}; }
|
|
40
|
-
.arrow${a} { stroke: ${s[l]}; }
|
|
41
|
-
`}return n}else{let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)n+=`
|
|
42
|
-
.branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
|
|
43
|
-
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
44
|
-
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
45
|
-
.label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""}}
|
|
46
|
-
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
47
|
-
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
48
|
-
.commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
|
|
49
|
-
`;return n}},"genColor"),Er=$(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(r,t)=>t).map(r=>{const t=r%de;return`
|
|
50
|
-
.branch-label${r} { fill: ${e["gitBranchLabel"+t]}; }
|
|
51
|
-
.commit${r} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
|
|
52
|
-
.commit-highlight${r} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
|
|
53
|
-
.label${r} { fill: ${e["git"+t]}; }
|
|
54
|
-
.arrow${r} { stroke: ${e["git"+t]}; }
|
|
55
|
-
`}).join(`
|
|
56
|
-
`)}`,"normalTheme"),Br=$(e=>{const r=Q(),{theme:t}=r,o=wr.has(t);return`
|
|
57
|
-
.commit-id,
|
|
58
|
-
.commit-msg,
|
|
59
|
-
.branch-label {
|
|
60
|
-
fill: lightgrey;
|
|
61
|
-
color: lightgrey;
|
|
62
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
63
|
-
font-family: var(--mermaid-font-family);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
${o?vr(e):Er(e)}
|
|
67
|
-
|
|
68
|
-
.branch {
|
|
69
|
-
stroke-width: ${e.strokeWidth};
|
|
70
|
-
stroke: ${e.commitLineColor??e.lineColor};
|
|
71
|
-
stroke-dasharray: ${o?"4 2":"2"};
|
|
72
|
-
}
|
|
73
|
-
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${o?e.nodeBorder:e.commitLabelColor}; ${o?`font-weight:${e.noteFontWeight};`:""}}
|
|
74
|
-
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${o?"transparent":e.commitLabelBackground}; opacity: ${o?"":.5}; }
|
|
75
|
-
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
76
|
-
.tag-label-bkg { fill: ${o?e.mainBkg:e.tagLabelBackground}; stroke: ${o?e.nodeBorder:e.tagLabelBorder}; ${o?`filter:${e.dropShadow}`:""} }
|
|
77
|
-
.tag-hole { fill: ${e.textColor}; }
|
|
78
|
-
|
|
79
|
-
.commit-merge {
|
|
80
|
-
stroke: ${o?e.mainBkg:e.primaryColor};
|
|
81
|
-
fill: ${o?e.mainBkg:e.primaryColor};
|
|
82
|
-
}
|
|
83
|
-
.commit-reverse {
|
|
84
|
-
stroke: ${o?e.mainBkg:e.primaryColor};
|
|
85
|
-
fill: ${o?e.mainBkg:e.primaryColor};
|
|
86
|
-
stroke-width: ${o?e.strokeWidth:3};
|
|
87
|
-
}
|
|
88
|
-
.commit-highlight-outer {
|
|
89
|
-
}
|
|
90
|
-
.commit-highlight-inner {
|
|
91
|
-
stroke: ${o?e.mainBkg:e.primaryColor};
|
|
92
|
-
fill: ${o?e.mainBkg:e.primaryColor};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.arrow {
|
|
96
|
-
/* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
|
|
97
|
-
stroke-width: ${le.has(t)?e.strokeWidth:8};
|
|
98
|
-
stroke-linecap: round;
|
|
99
|
-
fill: none
|
|
100
|
-
}
|
|
101
|
-
.gitTitleText {
|
|
102
|
-
text-anchor: middle;
|
|
103
|
-
font-size: 18px;
|
|
104
|
-
fill: ${e.textColor};
|
|
105
|
-
}
|
|
106
|
-
`},"getStyles"),Cr=Br,Or={parser:Xe,db:oe,renderer:xr,styles:Cr};export{Or as diagram};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{T as ye,P as J,E as L,a as ce,C as Re,S as R,b as Ge,c as H,g as Ne,V as it,F as Fe,d as rt,D as b,R as G,G as re,W as K,l as lt,h as st,e as ot,f as Ve}from"./index-D3YS6KuJ.js";class A{constructor(e,n,l,r){this.fromA=e,this.toA=n,this.fromB=l,this.toB=r}offset(e,n=e){return new A(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function T(t,e,n,l,r,i){if(t==l)return[];let s=se(t,e,n,l,r,i),o=oe(t,e+s,n,l,r+s,i);e+=s,n-=o,r+=s,i-=o;let d=n-e,h=i-r;if(!d||!h)return[new A(e,n,r,i)];if(d>h){let f=t.slice(e,n).indexOf(l.slice(r,i));if(f>-1)return[new A(e,e+f,r,r),new A(e+f+h,n,i,i)]}else if(h>d){let f=l.slice(r,i).indexOf(t.slice(e,n));if(f>-1)return[new A(e,e,r,r+f),new A(n,n,r+f+d,i)]}if(d==1||h==1)return[new A(e,n,r,i)];let a=je(t,e,n,l,r,i);if(a){let[f,c,u]=a;return T(t,e,f,l,r,c).concat(T(t,f+u,n,l,c+u,i))}return at(t,e,n,l,r,i)}let I=1e9,W=0,le=!1;function at(t,e,n,l,r,i){let s=n-e,o=i-r;if(I<1e9&&Math.min(s,o)>I*16||W>0&&Date.now()>W)return Math.min(s,o)>I*64?[new A(e,n,r,i)]:ue(t,e,n,l,r,i);let d=Math.ceil((s+o)/2);Z.reset(d),X.reset(d);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(r+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(i-m-1),f=(s-o)%2!=0?X:null,c=f?null:Z;for(let u=0;u<d;u++){if(u>I||W>0&&!(u&63)&&Date.now()>W)return ue(t,e,n,l,r,i);let m=Z.advance(u,s,o,d,f,!1,h)||X.advance(u,s,o,d,c,!0,a);if(m)return dt(t,e,n,e+m[0],l,r,i,r+m[1])}return[new A(e,n,r,i)]}class Ie{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,l,r,i,s,o){for(let d=-e+this.start;d<=e-this.end;d+=2){let h=r+d,a=d==-e||d!=e&&this.vec[h-1]<this.vec[h+1]?this.vec[h+1]:this.vec[h-1]+1,f=a-d;for(;a<n&&f<l&&o(a,f);)a++,f++;if(this.vec[h]=a,a>n)this.end+=2;else if(f>l)this.start+=2;else if(i){let c=r+(n-l)-d;if(c>=0&&c<this.len&&i.vec[c]!=-1)if(s){let u=i.vec[c];if(u>=n-a)return[u,r+u-c]}else{let u=n-i.vec[c];if(a>=u)return[a,f]}}}return null}}const Z=new Ie,X=new Ie;function dt(t,e,n,l,r,i,s,o){let d=!1;return!N(t,l)&&++l==n&&(d=!0),!N(r,o)&&++o==s&&(d=!0),d?[new A(e,n,i,s)]:T(t,e,l,r,i,o).concat(T(t,l,n,r,o,s))}function We(t,e){let n=1,l=Math.min(t,e);for(;n<l;)n=n<<1;return n}function se(t,e,n,l,r,i){if(e==n||e==i||t.charCodeAt(e)!=l.charCodeAt(r))return 0;let s=We(n-e,i-r);for(let o=e,d=r;;){let h=o+s,a=d+s;if(h>n||a>i||t.slice(o,h)!=l.slice(d,a)){if(s==1)return o-e-(N(t,o)?0:1);s=s>>1}else{if(h==n||a==i)return h-e;o=h,d=a}}}function oe(t,e,n,l,r,i){if(e==n||r==i||t.charCodeAt(n-1)!=l.charCodeAt(i-1))return 0;let s=We(n-e,i-r);for(let o=n,d=i;;){let h=o-s,a=d-s;if(h<e||a<r||t.slice(h,o)!=l.slice(a,d)){if(s==1)return n-o-(N(t,o)?0:1);s=s>>1}else{if(h==e||a==r)return n-h;o=h,d=a}}}function ee(t,e,n,l,r,i,s,o){let d=l.slice(r,i),h=null;for(;;){if(h||s<o)return h;for(let a=e+s;;){N(t,a)||a++;let f=a+s;if(N(t,f)||(f+=f==a+1?1:-1),f>=n)break;let c=t.slice(a,f),u=-1;for(;(u=d.indexOf(c,u+1))!=-1;){let m=se(t,f,n,l,r+u+c.length,i),p=oe(t,e,a,l,r,r+u),g=c.length+m+p;(!h||h[2]<g)&&(h=[a-p,r+u-p,g])}a=f}if(o<0)return h;s=s>>1}}function je(t,e,n,l,r,i){let s=n-e,o=i-r;if(s<o){let d=je(l,r,i,t,e,n);return d&&[d[1],d[0],d[2]]}return s<4||o*2<s?null:ee(t,e,n,l,r,i,Math.floor(s/4),-1)}function ue(t,e,n,l,r,i){le=!0;let s=n-e,o=i-r,d;if(s<o){let c=ee(l,r,i,t,e,n,Math.floor(s/6),50);d=c&&[c[1],c[0],c[2]]}else d=ee(t,e,n,l,r,i,Math.floor(o/6),50);if(!d)return[new A(e,n,r,i)];let[h,a,f]=d;return T(t,e,h,l,r,a).concat(T(t,h+f,n,l,a+f,i))}function He(t,e){for(let n=1;n<t.length;n++){let l=t[n-1],r=t[n];l.toA>r.fromA-e&&l.toB>r.fromB-e&&(t[n-1]=new A(l.fromA,r.toA,l.fromB,r.toB),t.splice(n--,1))}}function ft(t,e,n){for(;;){He(n,1);let l=!1;for(let r=0;r<n.length;r++){let i=n[r],s,o;(s=se(t,i.fromA,i.toA,e,i.fromB,i.toB))&&(i=n[r]=new A(i.fromA+s,i.toA,i.fromB+s,i.toB)),(o=oe(t,i.fromA,i.toA,e,i.fromB,i.toB))&&(i=n[r]=new A(i.fromA,i.toA-o,i.fromB,i.toB-o));let d=i.toA-i.fromA,h=i.toB-i.fromB;if(d&&h)continue;let a=i.fromA-(r?n[r-1].toA:0),f=(r<n.length-1?n[r+1].fromA:t.length)-i.toA;if(!a||!f)continue;let c=d?t.slice(i.fromA,i.toA):e.slice(i.fromB,i.toB);a<=c.length&&t.slice(i.fromA-a,i.fromA)==c.slice(c.length-a)?(n[r]=new A(i.fromA-a,i.toA-a,i.fromB-a,i.toB-a),l=!0):f<=c.length&&t.slice(i.toA,i.toA+f)==c.slice(0,f)&&(n[r]=new A(i.fromA+f,i.toA+f,i.fromB+f,i.toB+f),l=!0)}if(!l)break}return n}function ht(t,e,n){for(let l=0,r=0;r<t.length;r++){let i=t[r],s=i.toA-i.fromA,o=i.toB-i.fromB;if(s&&o||s>3||o>3){let d=r==t.length-1?e.length:t[r+1].fromA,h=i.fromA-l,a=d-i.toA,f=ge(e,i.fromA,h),c=me(e,i.toA,a),u=i.fromA-f,m=c-i.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,O]=s?[e,i.fromA,i.toA]:[n,i.fromB,i.toB];p>u&&e.slice(f,i.fromA)==g.slice(O-u,O)?(i=t[r]=new A(f,f+s,i.fromB-u,i.toB-u),f=i.fromA,c=me(e,i.toA,d-i.toA)):p>m&&e.slice(i.toA,c)==g.slice(C,C+m)&&(i=t[r]=new A(c-s,c,i.fromB+m,i.toB+m),c=i.toA,f=ge(e,i.fromA,i.fromA-l)),u=i.fromA-f,m=c-i.toA}if(u||m)i=t[r]=new A(i.fromA-u,i.toA+m,i.fromB-u,i.toB+m);else if(s){if(!o){let p=Ce(e,i.fromA,i.toA),g,C=p<0?-1:pe(e,i.toA,i.fromA);p>-1&&(g=p-i.fromA)<=a&&e.slice(i.fromA,p)==e.slice(i.toA,i.toA+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toA-C)<=h&&e.slice(i.fromA-g,i.fromA)==e.slice(C,i.toA)&&(i=t[r]=i.offset(-g))}}else{let p=Ce(n,i.fromB,i.toB),g,C=p<0?-1:pe(n,i.toB,i.fromB);p>-1&&(g=p-i.fromB)<=a&&n.slice(i.fromB,p)==n.slice(i.toB,i.toB+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toB-C)<=h&&n.slice(i.fromB-g,i.fromB)==n.slice(C,i.toB)&&(i=t[r]=i.offset(-g))}}l=i.toA}return He(t,3),t}let E;try{E=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Pe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function Ue(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Pe(n)?1:0:E?!_e(n)||e==t.length-1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e,e+2))?2:0:0}function qe(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Pe(n)?1:0:E?!$e(n)||e==1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e-2,e))?2:0:0}const ze=8;function me(t,e,n){if(e==t.length||!qe(t,e))return e;for(let l=e,r=e+n,i=0;i<ze;i++){let s=Ue(t,l);if(!s||l+s>r)return l;l+=s}return e}function ge(t,e,n){if(!e||!Ue(t,e))return e;for(let l=e,r=e-n,i=0;i<ze;i++){let s=qe(t,l);if(!s||l-s<r)return l;l-=s}return e}function pe(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function Ce(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const _e=t=>t>=55296&&t<=56319,$e=t=>t>=56320&&t<=57343;function N(t,e){return!e||e==t.length||!_e(t.charCodeAt(e-1))||!$e(t.charCodeAt(e))}function ct(t,e,n){var l;let r=n==null?void 0:n.override;return r?r(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,W=n!=null&&n.timeout?Date.now()+n.timeout:0,le=!1,ft(t,e,T(t,0,t.length,e,0,e.length)))}function Je(){return!le}function Ke(t,e,n){return ht(ct(t,e,n),t,e)}const k=Fe.define({combine:t=>t[0]}),te=R.define(),Qe=Fe.define(),B=H.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(te)&&(t=n.value);for(let n of e.state.facet(Qe))t=n(t,e);return t}});class S{constructor(e,n,l,r,i,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=r,this.toB=i,this.precise=s}offset(e,n){return e||n?new S(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let r=Ke(e.toString(),n.toString(),l);return Ye(r,e,n,0,0,Je())}static updateA(e,n,l,r,i){return Be(we(e,r,!0,l.length),e,n,l,i)}static updateB(e,n,l,r,i){return Be(we(e,r,!1,n.length),e,n,l,i)}}function Ae(t,e,n,l){let r=n.lineAt(t),i=l.lineAt(e);return r.to==t&&i.to==e&&t<n.length&&e<l.length?[t+1,e+1]:[r.from,i.from]}function ve(t,e,n,l){let r=n.lineAt(t),i=l.lineAt(e);return r.from==t&&i.from==e?[t,e]:[r.to+1,i.to+1]}function Ye(t,e,n,l,r,i){let s=[];for(let o=0;o<t.length;o++){let d=t[o],[h,a]=Ae(d.fromA+l,d.fromB+r,e,n),[f,c]=ve(d.toA+l,d.toB+r,e,n),u=[d.offset(-h+l,-a+r)];for(;o<t.length-1;){let m=t[o+1],[p,g]=Ae(m.fromA+l,m.fromB+r,e,n);if(p>f+1&&g>c+1)break;u.push(m.offset(-h+l,-a+r)),[f,c]=ve(m.toA+l,m.toB+r,e,n),o++}s.push(new S(u,h,Math.max(h,f),a,Math.max(a,c),i))}return s}const P=1e3;function xe(t,e,n,l){let r=0,i=t.length;for(;;){if(r==i){let a=0,f=0;r&&({toA:a,toB:f}=t[r-1]);let c=e-(n?a:f);return[a+c,f+c]}let s=r+i>>1,o=t[s],[d,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(d>e)i=s;else if(h<=e)r=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function we(t,e,n,l){let r=[];return e.iterChangedRanges((i,s,o,d)=>{let h=0,a=n?e.length:l,f=0,c=n?l:e.length;i>P&&([h,f]=xe(t,i-P,n,!0)),s<e.length-P&&([a,c]=xe(t,s+P,n,!1));let u=d-o-(s-i),m,[p,g]=n?[u,0]:[0,u];r.length&&(m=r[r.length-1]).toA>=h?r[r.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:r.push({fromA:h,toA:a,fromB:f,toB:c,diffA:p,diffB:g})}),r}function Be(t,e,n,l,r){if(!t.length)return e;let i=[];for(let s=0,o=0,d=0,h=0;;s++){let a=s==t.length?null:t[s],f=a?a.fromA+o:n.length,c=a?a.fromB+d:l.length;for(;h<e.length;){let g=e[h];if(a&&(g.toA+o>f||g.toB+d>c))break;i.push(g.offset(o,d)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+d+a.diffB,p=Ke(n.sliceString(f,u),l.sliceString(c,m),r);for(let g of Ye(p,n,l,f,c,Je()))i.push(g);for(o+=a.diffA,d+=a.diffB;h<e.length;){let g=e[h];if(g.fromA+o>u&&g.fromB+d>m)break;h++}}return i}const Ze={scanLimit:500},Q=it.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Me(t))}update(t){(t.docChanged||t.viewportChanged||ut(t.startState,t.state)||mt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Me(t.view))}},{decorations:t=>t.deco}),U=J.low(Ne({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Q))===null||e===void 0?void 0:e.gutter)||Ve.empty}}));function ut(t,e){return t.field(B,!1)!=e.field(B,!1)}function mt(t,e){return t.facet(k)!=e.facet(k)}const ke=b.line({class:"cm-changedLine"}),Xe=b.mark({class:"cm-changedText"}),gt=b.mark({tagName:"ins",class:"cm-insertedLine"}),pt=b.mark({tagName:"del",class:"cm-deletedLine"}),be=new class extends re{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Ct(t,e,n,l,r,i){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,d=0;if(s!=o){r.add(s,s,ke),r.add(s,o,n?pt:gt),i&&i.add(s,s,be);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,r.add(a,a,ke),i&&i.add(a,a,be);continue}let f=a+h.value.length;if(l)for(;d<t.changes.length;){let c=t.changes[d],u=s+(n?c.fromA:c.fromB),m=s+(n?c.toA:c.toB),p=Math.max(a,u),g=Math.min(f,m);if(p<g&&r.add(p,g,Xe),m<f)d++;else break}a=f}}}function Me(t){let e=t.state.field(B),{side:n,highlightChanges:l,markGutter:r,overrideChunk:i}=t.state.facet(k),s=n=="a",o=new G,d=r?new G:null,{from:h,to:a}=t.viewport;for(let f of e){if((s?f.fromA:f.fromB)>=a)break;(s?f.toA:f.toB)>h&&(!i||!i(t.state,f,o,d))&&Ct(f,t.state.doc,s,l,o,d)}return{deco:o.finish(),gutter:d&&d.finish()}}class q extends K{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const $=R.define({map:(t,e)=>t.map(e)}),j=H.define({create:()=>b.none,update:(t,e)=>{for(let n of e.effects)if(n.is($))return n.value;return t.map(e.changes)},provide:t=>L.decorations.from(t)}),z=.01;function De(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function At(t,e,n){let l=new G,r=new G,i=t.state.field(j).iter(),s=e.state.field(j).iter(),o=0,d=0,h=0,a=0,f=t.viewport,c=e.viewport;for(let g=0;;g++){let C=g<n.length?n[g]:null,O=C?C.fromA:t.state.doc.length,y=C?C.fromB:e.state.doc.length;if(o<O){let x=t.lineBlockAt(o).top+h,M=e.lineBlockAt(d).top+a,w=x-M;w<-z?(h-=w,l.add(o,o,b.widget({widget:new q(-w),block:!0,side:-1}))):w>z&&(a+=w,r.add(d,d,b.widget({widget:new q(w),block:!0,side:-1})))}if(O>o+1e3&&o<f.from&&O>f.from&&d<c.from&&y>c.from){let x=Math.min(f.from-o,c.from-d);o+=x,d+=x,g--}else if(C)o=C.toA,d=C.toB;else break;for(;i.value&&i.from<o;)h-=i.value.spec.widget.height,i.next();for(;s.value&&s.from<d;)a-=s.value.spec.widget.height,s.next()}for(;i.value;)h-=i.value.spec.widget.height,i.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=t.contentHeight+h-(e.contentHeight+a);u<z?l.add(t.state.doc.length,t.state.doc.length,b.widget({widget:new q(-u),block:!0,side:1})):u>z&&r.add(e.state.doc.length,e.state.doc.length,b.widget({widget:new q(u),block:!0,side:1}));let m=l.finish(),p=r.finish();De(m,t.state.field(j))||t.dispatch({effects:$.of(m)}),De(p,e.state.field(j))||e.dispatch({effects:$.of(p)})}const ne=R.define({map:(t,e)=>e.mapPos(t)});class vt extends K{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let r=e.posAtDOM(l.target);e.dispatch({effects:ne.of(r)});let{side:i,sibling:s}=e.state.facet(k);s&&s().dispatch({effects:ne.of(xt(r,e.state.field(B),i=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function xt(t,e,n){let l=0,r=0;for(let i=0;;i++){let s=i<e.length?e[i]:null;if(!s||(n?s.fromA:s.fromB)>=t)return r+(t-l);[l,r]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const wt=H.define({create(t){return b.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(ne)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(B)!=e.startState.field(B,!1)){let n=e.state.facet(k).side=="a",l=[];for(let r of e.state.field(B))t.between(n?r.fromA:r.fromB,n?r.toA:r.toB,i=>{l.push(i)});l.length&&(t=t.update({filter:r=>l.indexOf(r)<0}))}return t},provide:t=>L.decorations.from(t)});function ie({margin:t=3,minSize:e=4}){return wt.init(n=>Bt(n,t,e))}function Bt(t,e,n){let l=new G,r=t.facet(k).side=="a",i=t.field(B),s=1;for(let o=0;;o++){let d=o<i.length?i[o]:null,h=o?s+e:1,a=d?t.doc.lineAt(r?d.fromA:d.fromB).number-1-e:t.doc.lines,f=a-h+1;if(f>=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,b.replace({widget:new vt(f),block:!0})),!d)break;s=t.doc.lineAt(Math.min(t.doc.length,r?d.toA:d.toB)).number}return l.finish()}const kt=L.styleModule.of(new rt({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),et=L.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Le=new Re,_=new Re;class Nt{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||Ze;let n=[J.low(Q),et,kt,j,L.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(c=>c.effects.some(u=>u.is($)))&&this.measure()})],l=[k.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(U);let r=ce.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],L.editorAttributes.of({class:"cm-merge-a"}),_.of(l),n]}),i=[k.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(U);let s=ce.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],L.editorAttributes.of({class:"cm-merge-b"}),_.of(i),n]});this.chunks=S.build(r.doc,s.doc,this.diffConf);let o=[B.init(()=>this.chunks),Le.of(e.collapseUnchanged?ie(e.collapseUnchanged):[])];r=r.update({effects:R.appendConfig.of(o)}).state,s=s.update({effects:R.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let d=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(d=="a-b"?h:a),this.editorDOM.appendChild(d=="a-b"?a:h),this.a=new L({state:r,parent:h,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new L({state:s,parent:a,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],r=e.reduce((s,o)=>s.compose(o.changes),Ge.empty(e[0].startState.doc.length));this.chunks=n==this.a?S.updateA(this.chunks,l.newDoc,this.b.state.doc,r,this.diffConf):S.updateB(this.chunks,this.a.state.doc,l.newDoc,r,this.diffConf),n.update([...e,l.state.update({effects:te.of(this.chunks)})]);let i=n==this.a?this.b:this.a;i.update([i.state.update({effects:te.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let i=e.orientation!="b-a";if(i!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(i?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(i?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let i=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(i=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(i,s,o)}let n="highlightChanges"in e,l="gutter"in e,r="collapseUnchanged"in e;if(n||l||r){let i=[],s=[];if(n||l){let o=this.a.state.facet(k),d=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;i.push(_.reconfigure([k.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:d}),d?U:[]])),s.push(_.reconfigure([k.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:d}),d?U:[]]))}if(r){let o=Le.reconfigure(e.collapseUnchanged?ie(e.collapseUnchanged):[]);i.push(o),s.push(o)}this.a.dispatch({effects:i}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",r=>this.revertClicked(r)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){At(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,r=this.b.viewport;for(let i=0;i<this.chunks.length;i++){let s=this.chunks[i];if(s.fromA>l.to||s.fromB>r.to)break;if(s.fromA<l.from||s.fromB<r.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;n&&+n.dataset.chunk<i;)n=Oe(n);n&&n.dataset.chunk==String(i)?(n.style.top!=o&&(n.style.top=o),n=n.nextSibling):e.insertBefore(this.renderRevertButton(o,i),n)}for(;n;)n=Oe(n)}renderRevertButton(e,n){let l;if(this.renderRevert)l=this.renderRevert();else{l=document.createElement("button");let r=this.a.state.phrase("Revert this chunk");l.setAttribute("aria-label",r),l.setAttribute("title",r),l.textContent=this.revertToLeft?"⇜":"⇝"}return l.style.top=e,l.setAttribute("data-chunk",String(n)),l}revertClicked(e){let n=e.target,l;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(l=this.chunks[n.dataset.chunk])){let[r,i,s,o,d,h]=this.revertToA?[this.b,this.a,l.fromB,l.toB,l.fromA,l.toA]:[this.a,this.b,l.fromA,l.toA,l.fromB,l.toB],a=r.state.sliceDoc(s,Math.max(s,o-1));s!=o&&h<=i.state.doc.length&&(a+=r.state.lineBreak),i.dispatch({changes:{from:d,to:Math.min(i.state.doc.length,h),insert:a},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Oe(t){let e=t.nextSibling;return t.remove(),e}const bt=new class extends re{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Mt=J.low(Ne({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Q))===null||e===void 0?void 0:e.gutter)||Ve.empty},widgetMarker:(t,e)=>e instanceof tt?bt:null}));function Ft(t){var e;let n=typeof t.original=="string"?ye.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||Ze;return[J.low(Q),St,et,L.editorAttributes.of({class:"cm-merge-b"}),Qe.of((r,i)=>{let s=i.effects.find(o=>o.is(ae));return s&&(r=S.updateA(r,s.value.doc,i.startState.doc,s.value.changes,l)),i.docChanged&&(r=S.updateB(r,i.state.field(F),i.newDoc,i.changes,l)),r}),k.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:t.allowInlineDiffs?Rt:void 0,side:"b"}),F.init(()=>n),t.gutter!==!1?Mt:[],t.collapseUnchanged?ie(t.collapseUnchanged):[],B.init(r=>S.build(n,r.doc,l))]}const ae=R.define(),F=H.define({create:()=>ye.empty,update(t,e){for(let n of e.effects)n.is(ae)&&(t=n.value.doc);return t}}),Se=new WeakMap;class tt extends K{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Dt(t,e,n){let l=Se.get(e.changes);if(l)return l;let r=s=>{let{highlightChanges:o,syntaxHighlightDeletions:d,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(k),f=document.createElement("div");if(f.className="cm-deletedChunk",a){let x=f.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let M=v=>{v.preventDefault(),Lt(s,s.posAtDOM(f))},w=v=>{v.preventDefault(),Ot(s,s.posAtDOM(f))};if(typeof a=="function")x.appendChild(a("accept",M)),x.appendChild(a("reject",w));else{let v=x.appendChild(document.createElement("button"));v.name="accept",v.textContent=t.phrase("Accept"),v.onmousedown=M;let D=x.appendChild(document.createElement("button"));D.name="reject",D.textContent=t.phrase("Reject"),D.onmousedown=w}}if(n||e.fromA>=e.toA)return f;let c=s.state.field(F).sliceString(e.fromA,e.endA),u=d&&t.facet(lt),m=O(),p=e.changes,g=0,C=!1;function O(){let x=f.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function y(x,M,w){for(let v=x;v<M;){if(c.charAt(v)==`
|
|
2
|
-
`){m.firstChild||m.appendChild(document.createElement("br")),m=O(),v++;continue}let D=M,de=w+(C?" cm-deletedText":""),fe=!1,Y=c.indexOf(`
|
|
3
|
-
`,v);if(Y>-1&&Y<M&&(D=Y),o&&g<p.length){let V=Math.max(0,C?p[g].toA:p[g].fromA);V<=D&&(D=V,C&&g++,fe=!0)}if(D>v){let V=document.createTextNode(c.slice(v,D));if(de){let he=m.appendChild(document.createElement("span"));he.className=de,he.appendChild(V)}else m.appendChild(V);v=D}fe&&(C=!C)}}if(u&&e.toA-e.fromA<=h){let x=u.parser.parse(c),M=0;st(x,{style:w=>ot(t,w)},(w,v,D)=>{w>M&&y(M,w,""),y(w,v,D),M=v}),y(M,c.length,"")}else y(0,c.length,"");return m.firstChild||m.appendChild(document.createElement("br")),f},i=b.widget({block:!0,side:-1,widget:new tt(r)});return Se.set(e.changes,i),i}function Lt(t,e){let{state:n}=t,l=e??n.selection.main.head,r=t.state.field(B).find(d=>d.fromB<=l&&d.endB>=l);if(!r)return!1;let i=t.state.sliceDoc(r.fromB,Math.max(r.fromB,r.toB-1)),s=t.state.field(F);r.fromB!=r.toB&&r.toA<=s.length&&(i+=t.state.lineBreak);let o=Ge.of({from:r.fromA,to:Math.min(s.length,r.toA),insert:i},s.length);return t.dispatch({effects:ae.of({doc:o.apply(s),changes:o}),userEvent:"accept"}),!0}function Ot(t,e){let{state:n}=t,l=e??n.selection.main.head,r=n.field(B).find(o=>o.fromB<=l&&o.endB>=l);if(!r)return!1;let s=n.field(F).sliceString(r.fromA,Math.max(r.fromA,r.toA-1));return r.fromA!=r.toA&&r.toB<=n.doc.length&&(s+=n.lineBreak),t.dispatch({changes:{from:r.fromB,to:Math.min(n.doc.length,r.toB),insert:s},userEvent:"revert"}),!0}function Ee(t){let e=new G;for(let n of t.field(B)){let l=t.facet(k).overrideChunk&&nt(t,n);e.add(n.fromB,n.fromB,Dt(t,n,!!l))}return e.finish()}const St=H.define({create:t=>Ee(t),update(t,e){return e.state.field(B,!1)!=e.startState.field(B,!1)?Ee(e.state):t},provide:t=>L.decorations.from(t)}),Te=new WeakMap;function nt(t,e){let n=Te.get(e);if(n!==void 0)return n;n=null;let l=t.field(F),r=t.doc,i=l.lineAt(e.endA).number-l.lineAt(e.fromA).number+1,s=r.lineAt(e.endB).number-r.lineAt(e.fromB).number+1;e:if(i==s&&i<10){let o=[],d=0,h=e.fromA,a=e.fromB;for(let f of e.changes){if(f.fromA<f.toA){d+=f.toA-f.fromA;let c=l.sliceString(h+f.fromA,h+f.toA);if(/\n/.test(c))break e;o.push(b.widget({widget:new Et(c),side:-1}).range(a+f.fromB))}f.fromB<f.toB&&o.push(Xe.range(a+f.fromB,a+f.toB))}d<e.endA-e.fromA-i*2&&(n=o)}return Te.set(e,n),n}class Et extends K{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let n=document.createElement("del");return n.className="cm-deletedText",n.textContent=this.text,n}}const Tt=new class extends re{constructor(){super(...arguments),this.elementClass="cm-inlineChangedLineGutter"}},yt=b.line({class:"cm-inlineChangedLine"});function Rt(t,e,n,l){let r=nt(t,e),i=0;if(!r)return!1;for(let s=t.doc.lineAt(e.fromB);;){for(l&&l.add(s.from,s.from,Tt),n.add(s.from,s.from,yt);i<r.length&&r[i].to<=s.to;){let o=r[i++];n.add(o.from,o.to,o.value)}if(s.to>=e.endB)break;s=t.doc.lineAt(s.to+1)}return!0}export{A as Change,S as Chunk,Nt as MergeView,Lt as acceptChunk,ct as diff,Ke as presentableDiff,Ot as rejectChunk,ne as uncollapseUnchanged,Ft as unifiedMergeView,ae as updateOriginalDoc};
|