@agent-spaces/server 0.3.4 → 0.3.5
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/adapters/claude-code-runtime/index.js +19 -1
- package/dist/adapters/codex-runtime.js +13 -3
- package/dist/agents/agent-message-parts.js +9 -1
- package/dist/agents/commit-agent.js +7 -15
- package/dist/app.js +26 -0
- package/dist/package.json +2 -0
- package/dist/routes/code-favorites.js +60 -0
- package/dist/routes/file.js +13 -0
- package/dist/routes/prompt-template.js +48 -0
- package/dist/services/agent.js +45 -3
- package/dist/services/code-favorites.js +23 -0
- package/dist/services/file.js +4 -0
- package/dist/services/persistent-agent-context.js +3 -2
- package/dist/services/prompt-template.js +93 -0
- package/dist/services/pty.js +18 -1
- package/dist/storage/code-favorites-store.js +15 -0
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +21 -21
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +13 -13
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/0-1pn22sg~67u.js +2 -0
- package/dist/web/_next/static/chunks/0-lseun2l1m_t.js +2 -0
- package/dist/web/_next/static/chunks/0-wkj-hzh444r.css +4 -0
- package/dist/web/_next/static/chunks/{0f6vrjsdauiwl.js → 0-~4vw4_9z_0_.js} +2 -2
- package/dist/web/_next/static/chunks/0..g0jl-8qup7.js +1 -0
- package/dist/web/_next/static/chunks/0.006.ycpe92w.js +496 -0
- package/dist/web/_next/static/chunks/0.6x8f.mb-1qf.js +1 -0
- package/dist/web/_next/static/chunks/{0qe5wvs8fe9ip.js → 004wt62de8617.js} +1 -1
- package/dist/web/_next/static/chunks/016xz2o-hv3am.js +1 -0
- package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +1 -0
- package/dist/web/_next/static/chunks/023lpc7n70tav.css +1 -0
- package/dist/web/_next/static/chunks/03me5_ir..2ix.js +1 -0
- package/dist/web/_next/static/chunks/04fk~8rnrvs44.js +1 -0
- package/dist/web/_next/static/chunks/05eu2fdixf7c9.js +1 -0
- package/dist/web/_next/static/chunks/05gt_g_vbzh-5.css +1 -0
- package/dist/web/_next/static/chunks/06vadtvw631k5.css +1 -0
- package/dist/web/_next/static/chunks/07ge_85i__6pb.js +1 -0
- package/dist/web/_next/static/chunks/07ne4g8zopykv.js +1 -0
- package/dist/web/_next/static/chunks/07xvadmf~8bow.js +1 -0
- package/dist/web/_next/static/chunks/08.u~dmq20cak.css +23 -0
- package/dist/web/_next/static/chunks/08ag2f8y6f8cr.js +1 -0
- package/dist/web/_next/static/chunks/{03sd~wmqw.9gc.js → 08kpa0nox.bb1.js} +2 -2
- package/dist/web/_next/static/chunks/08o-zmr-40r5g.js +1 -0
- package/dist/web/_next/static/chunks/0_-c.y2qq4ax4.js +270 -0
- package/dist/web/_next/static/chunks/0a1rewz7xr-xi.js +1 -0
- package/dist/web/_next/static/chunks/0amcocbojo4v2.js +1 -0
- package/dist/web/_next/static/chunks/0brrgp3ki5w4_.css +17 -0
- package/dist/web/_next/static/chunks/0bzmgi.ynrn.0.css +3 -0
- package/dist/web/_next/static/chunks/0c_vfzf1z7-rt.js +2 -0
- package/dist/web/_next/static/chunks/0cjmfclopcxho.css +1 -0
- package/dist/web/_next/static/chunks/0cs830n97dgjy.js +1 -0
- package/dist/web/_next/static/chunks/0d_dp_4ofz0l3.css +3 -0
- package/dist/web/_next/static/chunks/0dws-faof-ryx.css +13 -0
- package/dist/web/_next/static/chunks/0ejc_zlyocy_r.css +1 -0
- package/dist/web/_next/static/chunks/0esty_4gmxfq3.js +1 -0
- package/dist/web/_next/static/chunks/0evjw7bao5_e~.js +1 -0
- package/dist/web/_next/static/chunks/{0ag4p6m9rze~n.js → 0g-0n6glz_z6w.js} +1 -1
- package/dist/web/_next/static/chunks/{145qu5b0tgm9w.js → 0gig.k.rq8d0x.js} +1 -1
- package/dist/web/_next/static/chunks/0hl_7y464qll6.css +2 -0
- package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +1 -0
- package/dist/web/_next/static/chunks/0i_3.3rdsu2mw.js +2 -0
- package/dist/web/_next/static/chunks/0i_gi.kq2dau8.css +1 -0
- package/dist/web/_next/static/chunks/0j00r2f_n-.lx.js +1 -0
- package/dist/web/_next/static/chunks/0jh9xnkimjkyh.js +1 -0
- package/dist/web/_next/static/chunks/0jokpgh485~28.js +167 -0
- package/dist/web/_next/static/chunks/0kvsjgpj7zcb9.css +9 -0
- package/dist/web/_next/static/chunks/0l5ab99s37x5f.js +1 -0
- package/dist/web/_next/static/chunks/0lcc9r.o.p.sc.js +1 -0
- package/dist/web/_next/static/chunks/0lh~x2tf~i1hd.css +2 -0
- package/dist/web/_next/static/chunks/0me8ho8j4tq7_.css +2 -0
- package/dist/web/_next/static/chunks/0mny8i81aenx3.js +1 -0
- package/dist/web/_next/static/chunks/0mt-7av8yrg0o.css +3 -0
- package/dist/web/_next/static/chunks/0njy89g5coeyi.js +60 -0
- package/dist/web/_next/static/chunks/0nsu~f3voe~0i.js +5 -0
- package/dist/web/_next/static/chunks/0ow~co9wcleka.js +173 -0
- package/dist/web/_next/static/chunks/0pldvk5_h__t7.css +3 -0
- package/dist/web/_next/static/chunks/0qad.lgvtlt0b.css +16 -0
- package/dist/web/_next/static/chunks/0qpq0~_58fe9a.js +18 -0
- package/dist/web/_next/static/chunks/{0.335m_d-cd_g.js → 0qtc_rbo1oghu.js} +1 -1
- package/dist/web/_next/static/chunks/0qz5~3wquy~3q.css +2 -0
- package/dist/web/_next/static/chunks/0rv0nj__24y60.js +10 -0
- package/dist/web/_next/static/chunks/{145gbwitjxamg.js → 0sz8_nijfiz0p.js} +1 -1
- package/dist/web/_next/static/chunks/0tvd~rxgf0oh_.js +1 -0
- package/dist/web/_next/static/chunks/0wv0h27jafag4.js +1 -0
- package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +1 -0
- package/dist/web/_next/static/chunks/0x4b-a2ixww6m.js +1 -0
- package/dist/web/_next/static/chunks/0z8ipjj2z-3al.css +8 -0
- package/dist/web/_next/static/chunks/0zd1o3u04~qvo.js +127 -0
- package/dist/web/_next/static/chunks/0~2l1-8o4delc.js +1 -0
- package/dist/web/_next/static/chunks/0~w6ugk9s5p-h.css +1 -0
- package/dist/web/_next/static/chunks/10jfi.9fw5g48.js +1 -0
- package/dist/web/_next/static/chunks/11_tltlhc8.sj.js +1 -0
- package/dist/web/_next/static/chunks/125nunjfj2fj0.js +1 -0
- package/dist/web/_next/static/chunks/12md9ajfx2o85.css +1 -0
- package/dist/web/_next/static/chunks/12odetnu-lyrr.js +167 -0
- package/dist/web/_next/static/chunks/12u4g4uzrlten.js +2 -0
- package/dist/web/_next/static/chunks/134ozsnbd~0qw.js +1 -0
- package/dist/web/_next/static/chunks/13ess~4pdmxma.js +1 -0
- package/dist/web/_next/static/chunks/13xfagjq0q~tf.js +1 -0
- package/dist/web/_next/static/chunks/143.pbs8a1ivm.js +1 -0
- package/dist/web/_next/static/chunks/14_y_s_5rhsd1.css +5 -0
- package/dist/web/_next/static/chunks/15hca2.5le07..js +3 -0
- package/dist/web/_next/static/chunks/15rf3~h7sugz4.css +19 -0
- package/dist/web/_next/static/chunks/16i87txo0qh0h.css +6 -0
- package/dist/web/_next/static/chunks/16~udgv7eel6a.css +2 -0
- package/dist/web/_next/static/chunks/{turbopack-0-j2hpomozegf.js → turbopack-000x5q9w-wx10.js} +1 -1
- package/dist/web/_next/static/chunks/{turbopack-0rrhp9pbrv0p3.js → turbopack-0hrx111grzq49.js} +1 -1
- package/dist/web/_next/static/chunks/{turbopack-0_zn00zg5kmqz.js → turbopack-0w-kua.9ymd0x.js} +1 -1
- package/dist/web/_next/static/chunks/{turbopack-0l~pq1hytx49z.js → turbopack-15zqm_4ixj.18.js} +1 -1
- package/dist/web/_next/static/media/code-icon.0g3wskzlr7oxf.svg +1 -0
- package/dist/web/_next/static/media/codicon.0pqe-t5rtghj8.ttf +0 -0
- package/dist/web/_next/static/media/continue-tb.0qei4mru4tzd2.png +0 -0
- package/dist/web/_next/static/media/dark_modern.09.uq6bp373zs.json +1 -0
- package/dist/web/_next/static/media/dark_plus.187umr0~d1_r7.json +1 -0
- package/dist/web/_next/static/media/dark_vs.12ju8ocr7rg--.json +1 -0
- package/dist/web/_next/static/media/document-dark.0vvlbsi_fdy~4.svg +3 -0
- package/dist/web/_next/static/media/document-light.0bfi_yt9e~vk7.svg +3 -0
- package/dist/web/_next/static/media/editor.worker.0ffjdaaj15t6e.js +1 -0
- package/dist/web/_next/static/media/extensionHost.worker.14sz5xf8-1efr.js +2 -0
- package/dist/web/_next/static/media/fake.16yx0-xxqj4pc.html +10 -0
- package/dist/web/_next/static/media/folder-dark.02kdicw3013tb.svg +3 -0
- package/dist/web/_next/static/media/folder-light.0s165k4fp3.53.svg +3 -0
- package/dist/web/_next/static/media/folder-open-dark.0sk6.yh45uqs3.svg +4 -0
- package/dist/web/_next/static/media/folder-open-light.10k1v_ugaq8ic.svg +4 -0
- package/dist/web/_next/static/media/hc_black.0-ul9e2oc5twb.json +1 -0
- package/dist/web/_next/static/media/hc_light.0vi.a7fr.z4gy.json +1 -0
- package/dist/web/_next/static/media/index.0jmafs_mwcjgg.html +1341 -0
- package/dist/web/_next/static/media/keyboard-dark.0t86n~1rrhj2-.svg +10 -0
- package/dist/web/_next/static/media/keyboard-light.0abw0ukjcd9ox.svg +10 -0
- package/dist/web/_next/static/media/letterpress-dark.181s2xkw~lfyo.svg +3 -0
- package/dist/web/_next/static/media/letterpress-hcDark.0ftfw8fess-5y.svg +3 -0
- package/dist/web/_next/static/media/letterpress-hcLight.06x23d0.aixf_.svg +3 -0
- package/dist/web/_next/static/media/letterpress-light.0xb1bapis~iw7.svg +3 -0
- package/dist/web/_next/static/media/light_modern.00ps-apoc9ph7.json +1 -0
- package/dist/web/_next/static/media/light_plus.0ow37ouyuazdz.json +1 -0
- package/dist/web/_next/static/media/light_vs.0fdbve5sxkgq1.json +1 -0
- package/dist/web/_next/static/media/onig.0dk~55st~1x8..wasm +0 -0
- package/dist/web/_next/static/media/opacity-background.0-9.t0ta0ko23.png +0 -0
- package/dist/web/_next/static/media/package.0_p8a~hpmb_uj.json +1 -0
- package/dist/web/_next/static/media/package.nls.0e5hn-g497b64.json +1 -0
- package/dist/web/_next/static/media/pause-tb.0ttrm1r1uuz_c.png +0 -0
- package/dist/web/_next/static/media/restart-tb.086872s_sc2qv.png +0 -0
- package/dist/web/_next/static/media/root-folder-dark.14iwnfb7p2na~.svg +5 -0
- package/dist/web/_next/static/media/root-folder-light.0ljk9fi7sw3.2.svg +5 -0
- package/dist/web/_next/static/media/root-folder-open-dark.08vw3g9zvki33.svg +5 -0
- package/dist/web/_next/static/media/root-folder-open-light.0f46.ahns5c~..svg +5 -0
- package/dist/web/_next/static/media/run-with-debugging-tb.0j1h52k~h~72z.png +0 -0
- package/dist/web/_next/static/media/service-worker.0_udu6mraxn4k.js +543 -0
- package/dist/web/_next/static/media/stepinto-tb.0cl87yt4ub_j8.png +0 -0
- package/dist/web/_next/static/media/stepout-tb.0vjib_bn-_xax.png +0 -0
- package/dist/web/_next/static/media/stepover-tb.04beeu~7cxr4l.png +0 -0
- package/dist/web/_next/static/media/stop-tb.1498tmu97_y9j.png +0 -0
- package/dist/web/_next/static/media/vs_minimal-icon-theme.0-qs73lvw4voi.json +1 -0
- package/dist/web/_next/static/media/webWorkerExtensionHostIframe.0x2r1o97s.m0m.html +156 -0
- package/dist/web/_next/static/media/worker.081j0x4avp1l1.js +2 -0
- package/dist/web/_not-found/__next._full.txt +19 -19
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +13 -13
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web/_not-found/__next._not-found.txt +3 -3
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +19 -19
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +21 -21
- package/dist/web/login/__next._full.txt +21 -21
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +13 -13
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +4 -4
- package/dist/web/login/__next.login.txt +3 -3
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +21 -21
- package/dist/web/settings/__next._full.txt +23 -23
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +13 -13
- package/dist/web/settings/__next._tree.txt +2 -2
- package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
- package/dist/web/settings/__next.settings.txt +5 -5
- package/dist/web/settings/agents/__next._full.txt +23 -23
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +13 -13
- package/dist/web/settings/agents/__next._tree.txt +2 -2
- package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
- package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
- package/dist/web/settings/agents/__next.settings.txt +5 -5
- package/dist/web/settings/agents.html +1 -1
- package/dist/web/settings/agents.txt +23 -23
- package/dist/web/settings/mcps/__next._full.txt +23 -23
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +13 -13
- package/dist/web/settings/mcps/__next._tree.txt +2 -2
- package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
- package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
- package/dist/web/settings/mcps/__next.settings.txt +5 -5
- package/dist/web/settings/mcps.html +1 -1
- package/dist/web/settings/mcps.txt +23 -23
- package/dist/web/settings/models/__next._full.txt +23 -23
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +13 -13
- package/dist/web/settings/models/__next._tree.txt +2 -2
- package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
- package/dist/web/settings/models/__next.settings.models.txt +3 -3
- package/dist/web/settings/models/__next.settings.txt +5 -5
- package/dist/web/settings/models.html +1 -1
- package/dist/web/settings/models.txt +23 -23
- package/dist/web/settings/prompts/__next._full.txt +42 -0
- package/dist/web/settings/prompts/__next._head.txt +6 -0
- package/dist/web/settings/prompts/__next._index.txt +15 -0
- package/dist/web/settings/prompts/__next._tree.txt +8 -0
- package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +9 -0
- package/dist/web/settings/prompts/__next.settings.prompts.txt +5 -0
- package/dist/web/settings/prompts/__next.settings.txt +7 -0
- package/dist/web/settings/prompts.html +1 -0
- package/dist/web/settings/prompts.txt +42 -0
- package/dist/web/settings/providers/__next._full.txt +23 -23
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +13 -13
- package/dist/web/settings/providers/__next._tree.txt +2 -2
- package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
- package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
- package/dist/web/settings/providers/__next.settings.txt +5 -5
- package/dist/web/settings/providers.html +1 -1
- package/dist/web/settings/providers.txt +23 -23
- package/dist/web/settings/skills/__next._full.txt +23 -23
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +13 -13
- package/dist/web/settings/skills/__next._tree.txt +2 -2
- package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
- package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
- package/dist/web/settings/skills/__next.settings.txt +5 -5
- package/dist/web/settings/skills.html +1 -1
- package/dist/web/settings/skills.txt +23 -23
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +23 -23
- package/dist/web/workflows/__next._full.txt +21 -21
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +13 -13
- package/dist/web/workflows/__next._tree.txt +2 -2
- package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
- package/dist/web/workflows/__next.workflows.txt +3 -3
- package/dist/web/workflows.html +1 -1
- package/dist/web/workflows.txt +21 -21
- package/dist/web/workspace/_/__next._full.txt +68 -35
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +13 -13
- package/dist/web/workspace/_/__next._tree.txt +15 -3
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +16 -4
- package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.txt +3 -3
- package/dist/web/workspace/_.html +1 -1
- package/dist/web/workspace/_.txt +68 -35
- package/dist/web/workspaces/__next._full.txt +21 -21
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +13 -13
- package/dist/web/workspaces/__next._tree.txt +2 -2
- package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
- package/dist/web/workspaces/__next.workspaces.txt +3 -3
- package/dist/web/workspaces.html +1 -1
- package/dist/web/workspaces.txt +21 -21
- package/dist/ws/agent-runner.js +158 -20
- package/dist/ws/handler.js +6 -1
- package/dist/ws/message-parts.js +20 -1
- package/dist/ws/terminal-handler.js +12 -7
- package/dist/ws/typescript-lsp.js +78 -0
- package/package.json +3 -1
- package/dist/web/_next/static/chunks/0-a17~4piefz_.js +0 -1
- package/dist/web/_next/static/chunks/01tyftu_-l7tm.css +0 -1
- package/dist/web/_next/static/chunks/028b9_5cyq-_m.js +0 -1
- package/dist/web/_next/static/chunks/0anuxr11yn5iv.js +0 -2
- package/dist/web/_next/static/chunks/0e.z4v3cd78dx.js +0 -1
- package/dist/web/_next/static/chunks/0egot8y~i-ge3.js +0 -1
- package/dist/web/_next/static/chunks/0eq7wt-l.fetc.js +0 -1
- package/dist/web/_next/static/chunks/0gtbd3yt7y1gx.js +0 -1
- package/dist/web/_next/static/chunks/0j2w71psq6w9u.js +0 -1
- package/dist/web/_next/static/chunks/0kyv5yika-41a.js +0 -1
- package/dist/web/_next/static/chunks/0ms3tsu4men_j.js +0 -204
- package/dist/web/_next/static/chunks/0plreh4_gkxf9.js +0 -1
- package/dist/web/_next/static/chunks/0qxk21zejhdbm.js +0 -1
- package/dist/web/_next/static/chunks/12gvpt~z9mn8w.js +0 -1
- package/dist/web/_next/static/chunks/14iaqoj9-09g..js +0 -2
- package/dist/web/_next/static/chunks/15dyaigebtnwg.js +0 -5
- package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +0 -1
- /package/dist/web/_next/static/{O5-QCW1u2YNyAUyaoYh6s → Pf6ZjtN82szw-ZzU9lITd}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{O5-QCW1u2YNyAUyaoYh6s → Pf6ZjtN82szw-ZzU9lITd}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{O5-QCW1u2YNyAUyaoYh6s → Pf6ZjtN82szw-ZzU9lITd}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,821788,e=>{"use strict";var t=e.i(702320);e.s(["getRemoteAuthority",0,function(e){return e.scheme===t.Schemas.vscodeRemote?e.authority:void 0},"getRemoteName",0,function(e){if(!e)return;let t=e.indexOf("+");return t<0?e:e.substr(0,t)}])},608326,e=>{"use strict";var t,i,r,o,s=e.i(693205),a=e.i(821788);(t=r||(r={}))[t.System=0]="System",t[t.User=1]="User",(i=o||(o={})).WIN32_X64="win32-x64",i.WIN32_ARM64="win32-arm64",i.LINUX_X64="linux-x64",i.LINUX_ARM64="linux-arm64",i.LINUX_ARMHF="linux-armhf",i.ALPINE_X64="alpine-x64",i.ALPINE_ARM64="alpine-arm64",i.DARWIN_X64="darwin-x64",i.DARWIN_ARM64="darwin-arm64",i.WEB="web",i.UNIVERSAL="universal",i.UNKNOWN="unknown",i.UNDEFINED="undefined";class n{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(null==e)return null==t;if(null==t)return!1;if("string"==typeof e||"string"==typeof t){let i="string"==typeof e?e:e.value,r="string"==typeof t?t:t.value;return(0,s.equalsIgnoreCase)(i,r)}return e._lower===t._lower}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class l{constructor(){this._map=new Map}clear(){this._map.clear()}delete(e){this._map.delete(n.toKey(e))}get(e){return this._map.get(n.toKey(e))}has(e){return this._map.has(n.toKey(e))}set(e,t){this._map.set(n.toKey(e),t)}values(){return this._map.values()}forEach(e){this._map.forEach(e)}[Symbol.iterator](){return this._map[Symbol.iterator]()}}e.s(["ALL_EXTENSION_KINDS",0,["ui","workspace","web"],"BUILTIN_MANIFEST_CACHE_FILE",0,"extensions.builtin.cache","EXTENSION_CATEGORIES",0,["AI","Azure","Chat","Data Science","Debuggers","Extension Packs","Education","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Testing","Themes","Visualization","Other"],"ExtensionError",0,class extends Error{constructor(e,t,i){super(`Error in extension ${n.toKey(e)}: ${i??t.message}`,{cause:t}),this.name="ExtensionError",this.extension=e}},"ExtensionIdentifier",0,n,"ExtensionIdentifierMap",0,l,"ExtensionIdentifierSet",0,class{get size(){return this._set.size}constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(n.toKey(e))}delete(e){return this._set.delete(n.toKey(e))}has(e){return this._set.has(n.toKey(e))}},"ExtensionType",0,r,"TargetPlatform",0,o,"UNDEFINED_PUBLISHER",0,"undefined_publisher","USER_MANIFEST_CACHE_FILE",0,"extensions.user.cache","isResolverExtension",0,function(e,t){if(t){let i=`onResolveRemoteAuthority:${(0,a.getRemoteName)(t)}`;return!!e.activationEvents?.includes(i)}return!1},"parseApiProposals",0,function(e){return e.map(e=>{let[t,i]=e.split("@");return{proposalName:t,version:i?parseInt(i):void 0}})},"parseEnabledApiProposalNames",0,function(e){return e.map(e=>e.split("@")[0])}])},304484,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("extensionResourceLoaderService");e.s(["IExtensionResourceLoaderService",0,t])},347589,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("productService");e.s(["IProductService",0,t])},306262,e=>{"use strict";var t,i;e.i(650289),(i=t||(t={})).Extensions="Extensions",i.IntegratedTerminal="IntegratedTerminal",i.InteractiveSession="InteractiveSession",i.Telemetry="Telemetry",i.Update="Update",e.s(["PolicyCategory",0,t])},331139,e=>{"use strict";var t,i,r,o,s,a,n,l,d,c,h,u,p,m,v,g,f,y,w=e.i(354244),S=e.i(306262),E=e.i(650289),b=e.i(2267),C=e.i(608326);e.i(652731);var F=e.i(621826);let D="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",x=new RegExp(D);(t=c||(c={})).COMMAND="command",t.SETTINGS_SYNC="settingsSync",(i=h||(h={})).NoneOrRelevance="NoneOrRelevance",i.LastUpdatedDate="LastUpdatedDate",i.Title="Title",i.PublisherName="PublisherName",i.InstallCount="InstallCount",i.PublishedDate="PublishedDate",i.AverageRating="AverageRating",i.WeightedRating="WeightedRating",(r=u||(u={}))[r.Default=0]="Default",r[r.Ascending=1]="Ascending",r[r.Descending=2]="Descending",(o=p||(p={})).Category="Category",o.ExtensionId="ExtensionId",o.ExtensionName="ExtensionName",o.ExcludeWithFlags="ExcludeWithFlags",o.Featured="Featured",o.SearchText="SearchText",o.Tag="Tag",o.Target="Target",(s=m||(m={})).Install="install",s.Uninstall="uninstall",(a=v||(v={}))[a.None=1]="None",a[a.Install=2]="Install",a[a.Update=3]="Update",a[a.Migrate=4]="Migrate",(n=g||(g={})).Timeout="Timeout",n.Cancelled="Cancelled",n.ClientError="ClientError",n.ServerError="ServerError",n.Failed="Failed",n.DownloadFailedWriting="DownloadFailedWriting",n.Offline="Offline",(l=f||(f={})).NotFound="NotFound",l.Unsupported="Unsupported",l.Deprecated="Deprecated",l.Malicious="Malicious",l.Incompatible="Incompatible",l.IncompatibleApi="IncompatibleApi",l.IncompatibleTargetPlatform="IncompatibleTargetPlatform",l.ReleaseVersionNotFound="ReleaseVersionNotFound",l.Invalid="Invalid",l.Download="Download",l.DownloadSignature="DownloadSignature",l.DownloadFailedWriting="DownloadFailedWriting",l.UpdateMetadata="UpdateMetadata",l.Extract="Extract",l.Scanning="Scanning",l.ScanningExtension="ScanningExtension",l.ReadRemoved="ReadRemoved",l.UnsetRemoved="UnsetRemoved",l.Delete="Delete",l.Rename="Rename",l.IntializeDefaultProfile="IntializeDefaultProfile",l.AddToProfile="AddToProfile",l.InstalledExtensionNotFound="InstalledExtensionNotFound",l.PostInstall="PostInstall",l.CorruptZip="CorruptZip",l.IncompleteZip="IncompleteZip",l.PackageNotSigned="PackageNotSigned",l.SignatureVerificationInternal="SignatureVerificationInternal",l.SignatureVerificationFailed="SignatureVerificationFailed",l.NotAllowed="NotAllowed",l.Gallery="Gallery",l.Cancelled="Cancelled",l.Unknown="Unknown",l.Internal="Internal",(d=y||(y={})).NotSigned="NotSigned",d.Success="Success",d.RequiredArgumentMissing="RequiredArgumentMissing",d.InvalidArgument="InvalidArgument",d.PackageIsUnreadable="PackageIsUnreadable",d.UnhandledException="UnhandledException",d.SignatureManifestIsMissing="SignatureManifestIsMissing",d.SignatureManifestIsUnreadable="SignatureManifestIsUnreadable",d.SignatureIsMissing="SignatureIsMissing",d.SignatureIsUnreadable="SignatureIsUnreadable",d.CertificateIsUnreadable="CertificateIsUnreadable",d.SignatureArchiveIsUnreadable="SignatureArchiveIsUnreadable",d.FileAlreadyExists="FileAlreadyExists",d.SignatureArchiveIsInvalidZip="SignatureArchiveIsInvalidZip",d.SignatureArchiveHasSameSignatureFile="SignatureArchiveHasSameSignatureFile",d.PackageIntegrityCheckFailed="PackageIntegrityCheckFailed",d.SignatureIsInvalid="SignatureIsInvalid",d.SignatureManifestIsInvalid="SignatureManifestIsInvalid",d.SignatureIntegrityCheckFailed="SignatureIntegrityCheckFailed",d.EntryIsMissing="EntryIsMissing",d.EntryIsTampered="EntryIsTampered",d.Untrusted="Untrusted",d.CertificateRevoked="CertificateRevoked",d.SignatureIsNotValid="SignatureIsNotValid",d.UnknownError="UnknownError",d.PackageIsInvalidZip="PackageIsInvalidZip",d.SignatureArchiveHasTooManyEntries="SignatureArchiveHasTooManyEntries",(0,E.localize2)(1829,"Extensions"),(0,E.localize2)(1830,"Preferences"),F.Registry.as(b.Extensions.Configuration).registerConfiguration({id:"extensions",order:30,title:(0,E.localize)(1831,"Extensions"),type:"object",properties:{"extensions.allowed":{type:"object",markdownDescription:(0,E.localize)(1832,"Specify a list of extensions that are allowed to use. This helps maintain a secure and consistent development environment by restricting the use of unauthorized extensions. For more information on how to configure this setting, please visit the [Configure Allowed Extensions](https://code.visualstudio.com/docs/setup/enterprise#_configure-allowed-extensions) section."),default:"*",defaultSnippets:[{body:{},description:(0,E.localize)(1833,"No extensions are allowed.")},{body:{"*":!0},description:(0,E.localize)(1834,"All extensions are allowed.")}],scope:b.ConfigurationScope.APPLICATION,policy:{name:"AllowedExtensions",category:S.PolicyCategory.Extensions,minimumVersion:"1.96",localization:{description:{key:"extensions.allowed.policy",value:(0,E.localize)(1835,"Specify a list of extensions that are allowed to use. This helps maintain a secure and consistent development environment by restricting the use of unauthorized extensions. More information: https://code.visualstudio.com/docs/setup/enterprise#_configure-allowed-extensions")}}},additionalProperties:!1,patternProperties:{"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$":{anyOf:[{type:["boolean","string"],enum:[!0,!1,"stable"],description:(0,E.localize)(1836,"Allow or disallow the extension."),enumDescriptions:[(0,E.localize)(1837,"Extension is allowed."),(0,E.localize)(1838,"Extension is not allowed."),(0,E.localize)(1839,"Allow only stable versions of the extension.")]},{type:"array",items:{type:"string"},description:(0,E.localize)(1840,"Allow or disallow specific versions of the extension. To specifcy a platform specific version, use the format `platform@1.2.3`, e.g. `win32-x64@1.2.3`. Supported platforms are `win32-x64`, `win32-arm64`, `linux-x64`, `linux-arm64`, `linux-armhf`, `alpine-x64`, `alpine-arm64`, `darwin-x64`, `darwin-arm64`")}]},"([a-z0-9A-Z][a-z0-9-A-Z]*)$":{type:["boolean","string"],enum:[!0,!1,"stable"],description:(0,E.localize)(1841,"Allow or disallow all extensions from the publisher."),enumDescriptions:[(0,E.localize)(1842,"All extensions from the publisher are allowed."),(0,E.localize)(1843,"All extensions from the publisher are not allowed."),(0,E.localize)(1844,"Allow only stable versions of the extensions from the publisher.")]},"\\*":{type:"boolean",enum:[!0,!1],description:(0,E.localize)(1845,"Allow or disallow all extensions."),enumDescriptions:[(0,E.localize)(1846,"Allow all extensions."),(0,E.localize)(1847,"Disallow all extensions.")]}}}}}),e.s(["EXTENSION_IDENTIFIER_PATTERN",0,D,"EXTENSION_IDENTIFIER_REGEX",0,x,"InstallOperation",0,v,"SortBy",0,h,"getTargetPlatform",0,function(e,t){switch(e){case w.Platform.Windows:if("x64"===t)return C.TargetPlatform.WIN32_X64;if("arm64"===t)return C.TargetPlatform.WIN32_ARM64;return C.TargetPlatform.UNKNOWN;case w.Platform.Linux:if("x64"===t)return C.TargetPlatform.LINUX_X64;if("arm64"===t)return C.TargetPlatform.LINUX_ARM64;if("arm"===t)return C.TargetPlatform.LINUX_ARMHF;return C.TargetPlatform.UNKNOWN;case"alpine":if("x64"===t)return C.TargetPlatform.ALPINE_X64;if("arm64"===t)return C.TargetPlatform.ALPINE_ARM64;return C.TargetPlatform.UNKNOWN;case w.Platform.Mac:if("x64"===t)return C.TargetPlatform.DARWIN_X64;if("arm64"===t)return C.TargetPlatform.DARWIN_ARM64;return C.TargetPlatform.UNKNOWN;case w.Platform.Web:return C.TargetPlatform.WEB}},"isIExtensionIdentifier",0,function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)}])},359661,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("IFileDecorationsService");e.s(["IDecorationsService",0,t])},920374,e=>{"use strict";var t=e.i(619122),i=e.i(608326);let r=new class{constructor(){this._generators=new Map,this._cache=new WeakMap}register(e,t){this._generators.set(e,t)}readActivationEvents(e){return this._cache.has(e)||this._cache.set(e,this._readActivationEvents(e)),this._cache.get(e)}createActivationEventsMap(e){let t=Object.create(null);for(let r of e){let e=this.readActivationEvents(r);e.length>0&&(t[i.ExtensionIdentifier.toKey(r.identifier)]=e)}return t}_readActivationEvents(e){if(void 0===e.main&&void 0===e.browser)return[];let r=Array.isArray(e.activationEvents)?e.activationEvents.slice(0):[];for(let t=0;t<r.length;t++)"onUri"===r[t]&&(r[t]=`onUri:${i.ExtensionIdentifier.toKey(e.identifier)}`);if(!e.contributes)return r;for(let i in e.contributes){let o=this._generators.get(i);if(!o)continue;let s=e.contributes[i],a=Array.isArray(s)?s:[s];try{r.push(...o(a))}catch(e){(0,t.onUnexpectedError)(e)}}return r}};e.s(["ImplicitActivationEvents",0,r])},981399,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("extensionService");e.s(["IExtensionService",0,t])},883685,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("elevatedFileService");e.s(["IElevatedFileService",0,t])},34422,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("paneCompositePartService");e.s(["IPaneCompositePartService",0,t])},951971,e=>{"use strict";let t=Object.freeze({activeComment:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.activeComment.d.ts"},aiRelatedInformation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts"},aiSettingsSearch:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiSettingsSearch.d.ts"},aiTextSearchProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts",version:2},authIssuers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authIssuers.d.ts"},authLearnMore:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authLearnMore.d.ts"},authProviderSpecific:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authProviderSpecific.d.ts"},authSession:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts"},authenticationChallenges:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authenticationChallenges.d.ts"},canonicalUriProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts"},chatContextProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatContextProvider.d.ts"},chatEditing:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatEditing.d.ts"},chatOutputRenderer:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatOutputRenderer.d.ts"},chatParticipantAdditions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts"},chatParticipantPrivate:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts",version:11},chatProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatProvider.d.ts",version:4},chatReferenceBinaryData:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts"},chatReferenceDiagnostic:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatReferenceDiagnostic.d.ts"},chatSessionsProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts",version:3},chatStatusItem:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatStatusItem.d.ts"},chatTab:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatTab.d.ts"},codeActionAI:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codeActionAI.d.ts"},codeActionRanges:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codeActionRanges.d.ts"},codiconDecoration:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codiconDecoration.d.ts"},commentReactor:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentReactor.d.ts"},commentReveal:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentReveal.d.ts"},commentThreadApplicability:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts"},commentingRangeHint:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentingRangeHint.d.ts"},commentsDraftState:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsDraftState.d.ts"},contribAccessibilityHelpContent:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts"},contribCommentEditorActionsMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts"},contribCommentPeekContext:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts"},contribCommentThreadAdditionalMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts"},contribCommentsViewThreadMenus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts"},contribDebugCreateConfiguration:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts"},contribDiffEditorGutterToolBarMenus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts"},contribEditSessions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts"},contribEditorContentMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts"},contribLabelFormatterWorkspaceTooltip:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts"},contribLanguageModelToolSets:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLanguageModelToolSets.d.ts"},contribMenuBarHome:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts"},contribMergeEditorMenus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts"},contribMultiDiffEditorMenus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts"},contribNotebookStaticPreloads:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts"},contribRemoteHelp:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts"},contribShareMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts"},contribSourceControlArtifactGroupMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlArtifactGroupMenu.d.ts"},contribSourceControlArtifactMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlArtifactMenu.d.ts"},contribSourceControlHistoryItemMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts"},contribSourceControlHistoryTitleMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts"},contribSourceControlInputBoxMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts"},contribSourceControlTitleMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlTitleMenu.d.ts"},contribStatusBarItems:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts"},contribViewContainerTitle:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts"},contribViewsRemote:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts"},contribViewsWelcome:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts"},customEditorMove:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts"},dataChannels:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.dataChannels.d.ts"},debugVisualization:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.debugVisualization.d.ts"},defaultChatParticipant:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts",version:4},devDeviceId:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.devDeviceId.d.ts"},diffCommand:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts"},diffContentOptions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffContentOptions.d.ts"},documentFiltersExclusive:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts"},editSessionIdentityProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts"},editorHoverVerbosityLevel:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts"},editorInsets:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts"},embeddings:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.embeddings.d.ts"},extensionRuntime:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts"},extensionsAny:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts"},externalUriOpener:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts"},fileSearchProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts"},fileSearchProvider2:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider2.d.ts"},findFiles2:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findFiles2.d.ts",version:2},findTextInFiles:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts"},findTextInFiles2:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles2.d.ts"},fsChunks:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts"},inlineCompletionsAdditions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts"},interactive:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactive.d.ts"},interactiveWindow:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.d.ts"},ipc:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts"},languageModelCapabilities:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelCapabilities.d.ts"},languageModelProxy:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelProxy.d.ts"},languageModelSystem:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelSystem.d.ts"},languageModelThinkingPart:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelThinkingPart.d.ts",version:1},languageModelToolResultAudience:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelToolResultAudience.d.ts"},languageStatusText:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageStatusText.d.ts"},mappedEditsProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts"},markdownAlertSyntax:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.markdownAlertSyntax.d.ts"},mcpToolDefinitions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mcpToolDefinitions.d.ts"},multiDocumentHighlightProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts"},nativeWindowHandle:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.nativeWindowHandle.d.ts"},newSymbolNamesProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts"},notebookCellExecution:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecution.d.ts"},notebookControllerAffinityHidden:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts"},notebookDeprecated:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts"},notebookExecution:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookExecution.d.ts"},notebookKernelSource:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.d.ts"},notebookLiveShare:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts"},notebookMessaging:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts"},notebookMime:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts"},notebookReplDocument:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookReplDocument.d.ts"},notebookVariableProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts"},portsAttributes:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts"},profileContentHandlers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts"},quickDiffProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts"},quickInputButtonLocation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts"},quickPickItemTooltip:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts"},quickPickSortByLabel:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts"},remoteCodingAgents:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.remoteCodingAgents.d.ts"},resolvers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts"},scmActionButton:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts"},scmArtifactProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmArtifactProvider.d.ts"},scmHistoryProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts"},scmMultiDiffEditor:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts"},scmProviderOptions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmProviderOptions.d.ts"},scmSelectedProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts"},scmTextDocument:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmTextDocument.d.ts"},scmValidation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts"},shareProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.shareProvider.d.ts"},speech:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.speech.d.ts"},statusBarItemTooltip:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.statusBarItemTooltip.d.ts"},tabInputMultiDiff:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts"},tabInputTextMerge:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts"},taskExecutionTerminal:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskExecutionTerminal.d.ts"},taskPresentationGroup:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts"},taskProblemMatcherStatus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskProblemMatcherStatus.d.ts"},telemetry:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts"},terminalCompletionProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts"},terminalDataWriteEvent:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts"},terminalDimensions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts"},terminalExecuteCommandEvent:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts"},terminalQuickFixProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts"},terminalSelection:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalSelection.d.ts"},terminalShellEnv:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalShellEnv.d.ts"},testObserver:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts"},testRelatedCode:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testRelatedCode.d.ts"},textDocumentChangeReason:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textDocumentChangeReason.d.ts"},textEditorDiffInformation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textEditorDiffInformation.d.ts"},textSearchComplete2:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchComplete2.d.ts"},textSearchProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts"},textSearchProvider2:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider2.d.ts"},timeline:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts"},tokenInformation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts"},toolProgress:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.toolProgress.d.ts"},treeItemMarkdownLabel:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeItemMarkdownLabel.d.ts"},treeViewActiveItem:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts"},treeViewMarkdownMessage:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts"},treeViewReveal:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts"},tunnelFactory:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnelFactory.d.ts"},tunnels:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnels.d.ts"},valueSelectionInQuickPick:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.valueSelectionInQuickPick.d.ts"},workspaceTrust:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"}});e.s(["allApiProposals",0,t])},732157,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("workingCopyBackupService");e.s(["IWorkingCopyBackupService",0,t])},464172,e=>{"use strict";let t=(0,e.i(488259).createDecorator)("workingCopyFileService");e.s(["IWorkingCopyFileService",0,t])},34487,e=>{"use strict";var t,i,r=e.i(281482),o=e.i(590746),s=e.i(704994),a=e.i(611130),n=e.i(927842);(t=i||(i={}))[t.Explorer=1]="Explorer",t[t.Scm=3]="Scm",t[t.Extensions=5]="Extensions",t[t.Window=10]="Window",t[t.Notification=15]="Notification",t[t.Dialog=20]="Dialog";let l=Object.freeze({total(){},worked(){},done(){}});class d{static{this.None=Object.freeze({report(){}})}get value(){return this._value}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}let c=class extends a.Disposable{constructor(e,t){super(),this.deferred=new o.DeferredPromise,t.withProgress(e,e=>(this.reporter=e,this.lastStep&&e.report(this.lastStep),this.deferred.p)),this._register((0,a.toDisposable)(()=>this.deferred.complete()))}report(e){this.reporter?this.reporter.report(e):this.lastStep=e}};c=(0,r.__decorate)([(0,r.__param)(1,n.IProgressService)],c);class h extends a.Disposable{constructor(e){super(),this.progressIndicator=e,this.currentOperationId=0,this.currentOperationDisposables=this._register(new a.DisposableStore),this.currentProgressTimeout=void 0}start(e){this.stop();let t=++this.currentOperationId,i=new s.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{t===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},e),this.currentOperationDisposables.add((0,a.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,a.toDisposable)(()=>i.cancel())),this.currentOperationDisposables.add((0,a.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:t,token:i.token,stop:()=>this.doStop(t),isCurrent:()=>this.currentOperationId===t}}stop(){this.doStop(this.currentOperationId)}doStop(e){this.currentOperationId===e&&this.currentOperationDisposables.clear()}}e.s(["LongRunningOperation",0,h,"Progress",0,d,"ProgressLocation",0,i,"emptyProgressRunner",0,l])},856884,e=>{"use strict";var t,i=e.i(281482),r=e.i(611130),o=e.i(650289),s=e.i(568101),a=e.i(9753),n=e.i(693162),l=e.i(58762),d=e.i(553638),c=e.i(326659),h=e.i(702320),u=e.i(193391),p=e.i(350803);let m=new s.RawContextKey("workbenchState",void 0,{type:"string",description:(0,o.localize)(3975,"The kind of workspace opened in the window, either 'empty' (no workspace), 'folder' (single folder) or 'workspace' (multi-root workspace)")}),v=new s.RawContextKey("workspaceFolderCount",0,(0,o.localize)(3976,"The number of root folders in the workspace")),g=new s.RawContextKey("openFolderWorkspaceSupport",!0,!0),f=new s.RawContextKey("enterMultiRootWorkspaceSupport",!0,!0),y=new s.RawContextKey("emptyWorkspaceSupport",!0,!0),w=new s.RawContextKey("dirtyWorkingCopies",!1,(0,o.localize)(3977,"Whether there are any working copies with unsaved changes")),S=new s.RawContextKey("remoteName","",(0,o.localize)(3978,"The name of the remote the window is connected to or an empty string if not connected to any remote")),E=new s.RawContextKey("virtualWorkspace","",(0,o.localize)(3979,"The scheme of the current workspace is from a virtual file system or an empty string.")),b=new s.RawContextKey("temporaryWorkspace",!1,(0,o.localize)(3980,"The scheme of the current workspace is from a temporary file system.")),C=new s.RawContextKey("hasWebFileSystemAccess",!1,!0),F=new s.RawContextKey("embedderIdentifier",void 0,(0,o.localize)(3981,"The identifier of the embedder according to the product service, if one is defined")),D=new s.RawContextKey("inAutomation",!1,(0,o.localize)(3982,"Whether VS Code is running under automation/smoke test")),x=new s.RawContextKey("isSandboxWorkspace",!1,!0),_=new s.RawContextKey("isFullscreen",!1,(0,o.localize)(3983,"Whether the main window is in fullscreen mode")),I=new s.RawContextKey("isAuxiliaryWindowFocusedContext",!1,(0,o.localize)(3984,"Whether an auxiliary window is focused")),R=new s.RawContextKey("isAuxiliaryWindow",!1,(0,o.localize)(3985,"Window is an auxiliary window")),T=new s.RawContextKey("activeEditorIsDirty",!1,(0,o.localize)(3986,"Whether the active editor has unsaved changes")),P=new s.RawContextKey("activeEditorIsNotPreview",!1,(0,o.localize)(3987,"Whether the active editor is not in preview mode")),A=new s.RawContextKey("activeEditorIsFirstInGroup",!1,(0,o.localize)(3988,"Whether the active editor is the first one in its group")),O=new s.RawContextKey("activeEditorIsLastInGroup",!1,(0,o.localize)(3989,"Whether the active editor is the last one in its group")),k=new s.RawContextKey("activeEditorIsPinned",!1,(0,o.localize)(3990,"Whether the active editor is pinned")),L=new s.RawContextKey("activeEditorIsReadonly",!1,(0,o.localize)(3991,"Whether the active editor is read-only")),M=new s.RawContextKey("activeCompareEditorCanSwap",!1,(0,o.localize)(3992,"Whether the active compare editor can swap sides")),N=new s.RawContextKey("activeEditorCanToggleReadonly",!0,(0,o.localize)(3993,"Whether the active editor can toggle between being read-only or writeable")),W=new s.RawContextKey("activeEditorCanRevert",!1,(0,o.localize)(3994,"Whether the active editor can revert")),U=new s.RawContextKey("activeEditorCanSplitInGroup",!0),B=new s.RawContextKey("activeEditor",null,{type:"string",description:(0,o.localize)(3995,"The identifier of the active editor")}),z=new s.RawContextKey("activeEditorAvailableEditorIds","",(0,o.localize)(3996,"The available editor identifiers that are usable for the active editor")),V=new s.RawContextKey("textCompareEditorVisible",!1,(0,o.localize)(3997,"Whether a text compare editor is visible")),K=new s.RawContextKey("textCompareEditorActive",!1,(0,o.localize)(3998,"Whether a text compare editor is active")),G=new s.RawContextKey("sideBySideEditorActive",!1,(0,o.localize)(3999,"Whether a side by side editor is active")),H=new s.RawContextKey("groupEditorsCount",0,(0,o.localize)(4e3,"The number of opened editor groups")),q=new s.RawContextKey("activeEditorGroupEmpty",!1,(0,o.localize)(4001,"Whether the active editor group is empty")),$=new s.RawContextKey("activeEditorGroupIndex",0,(0,o.localize)(4002,"The index of the active editor group")),j=new s.RawContextKey("activeEditorGroupLast",!1,(0,o.localize)(4003,"Whether the active editor group is the last group")),X=new s.RawContextKey("activeEditorGroupLocked",!1,(0,o.localize)(4004,"Whether the active editor group is locked")),Y=new s.RawContextKey("multipleEditorGroups",!1,(0,o.localize)(4005,"Whether there are multiple editor groups opened")),Q=new s.RawContextKey("multipleEditorsSelectedInGroup",!1,(0,o.localize)(4006,"Whether multiple editors have been selected in an editor group")),Z=new s.RawContextKey("twoEditorsSelectedInGroup",!1,(0,o.localize)(4007,"Whether exactly two editors have been selected in an editor group")),J=new s.RawContextKey("SelectedEditorsInGroupFileOrUntitledResourceContextKey",!0,(0,o.localize)(4008,"Whether all selected editors in a group have a file or untitled resource associated")),ee=new s.RawContextKey("editorPartMultipleEditorGroups",!1,(0,o.localize)(4009,"Whether there are multiple editor groups opened in an editor part")),et=new s.RawContextKey("editorPartMaximizedEditorGroup",!1,(0,o.localize)(4010,"Editor Part has a maximized group")),ei=new s.RawContextKey("editorIsOpen",!1,(0,o.localize)(4011,"Whether an editor is open")),er=new s.RawContextKey("inZenMode",!1,(0,o.localize)(4012,"Whether Zen mode is enabled")),eo=new s.RawContextKey("isCenteredLayout",!1,(0,o.localize)(4013,"Whether centered layout is enabled for the main editor")),es=new s.RawContextKey("splitEditorsVertically",!1,(0,o.localize)(4014,"Whether editors split vertically")),ea=new s.RawContextKey("mainEditorAreaVisible",!0,(0,o.localize)(4015,"Whether the editor area in the main window is visible")),en=new s.RawContextKey("editorTabsVisible",!0,(0,o.localize)(4016,"Whether editor tabs are visible")),el=new s.RawContextKey("sideBarVisible",!1,(0,o.localize)(4017,"Whether the sidebar is visible")),ed=new s.RawContextKey("sideBarFocus",!1,(0,o.localize)(4018,"Whether the sidebar has keyboard focus")),ec=new s.RawContextKey("activeViewlet","",(0,o.localize)(4019,"The identifier of the active viewlet")),eh=new s.RawContextKey("statusBarFocused",!1,(0,o.localize)(4020,"Whether the status bar has keyboard focus")),eu=new s.RawContextKey("titleBarStyle","custom",(0,o.localize)(4021,"Style of the window title bar")),ep=new s.RawContextKey("titleBarVisible",!1,(0,o.localize)(4022,"Whether the title bar is visible")),em=new s.RawContextKey("isCompactTitleBar",!1,(0,o.localize)(4023,"Title bar is in compact mode")),ev=new s.RawContextKey("bannerFocused",!1,(0,o.localize)(4024,"Whether the banner has keyboard focus")),eg=new s.RawContextKey("notificationFocus",!0,(0,o.localize)(4025,"Whether a notification has keyboard focus")),ef=new s.RawContextKey("notificationCenterVisible",!1,(0,o.localize)(4026,"Whether the notifications center is visible")),ey=new s.RawContextKey("notificationToastsVisible",!1,(0,o.localize)(4027,"Whether a notification toast is visible")),ew=new s.RawContextKey("activeAuxiliary","",(0,o.localize)(4028,"The identifier of the active auxiliary panel")),eS=new s.RawContextKey("auxiliaryBarFocus",!1,(0,o.localize)(4029,"Whether the auxiliary bar has keyboard focus")),eE=new s.RawContextKey("auxiliaryBarVisible",!1,(0,o.localize)(4030,"Whether the auxiliary bar is visible")),eb=new s.RawContextKey("auxiliaryBarMaximized",!1,(0,o.localize)(4031,"Whether the auxiliary bar is maximized")),eC=new s.RawContextKey("activePanel","",(0,o.localize)(4032,"The identifier of the active panel")),eF=new s.RawContextKey("panelFocus",!1,(0,o.localize)(4033,"Whether the panel has keyboard focus")),eD=new s.RawContextKey("panelPosition","bottom",(0,o.localize)(4034,"The position of the panel, always 'bottom'")),ex=new s.RawContextKey("panelAlignment","center",(0,o.localize)(4035,"The alignment of the panel, either 'center', 'left', 'right' or 'justify'")),e_=new s.RawContextKey("panelVisible",!1,(0,o.localize)(4036,"Whether the panel is visible")),eI=new s.RawContextKey("panelMaximized",!1,(0,o.localize)(4037,"Whether the panel is maximized")),eR=new s.RawContextKey("focusedView","",(0,o.localize)(4038,"The identifier of the view that has keyboard focus")),eT=class{static{t=this}static{this.Scheme=new s.RawContextKey("resourceScheme",void 0,{type:"string",description:(0,o.localize)(4039,"The scheme of the resource")})}static{this.Filename=new s.RawContextKey("resourceFilename",void 0,{type:"string",description:(0,o.localize)(4040,"The file name of the resource")})}static{this.Dirname=new s.RawContextKey("resourceDirname",void 0,{type:"string",description:(0,o.localize)(4041,"The folder name the resource is contained in")})}static{this.Path=new s.RawContextKey("resourcePath",void 0,{type:"string",description:(0,o.localize)(4042,"The full path of the resource")})}static{this.LangId=new s.RawContextKey("resourceLangId",void 0,{type:"string",description:(0,o.localize)(4043,"The language identifier of the resource")})}static{this.Resource=new s.RawContextKey("resource",void 0,{type:"URI",description:(0,o.localize)(4044,"The full value of the resource including scheme and path")})}static{this.Extension=new s.RawContextKey("resourceExtname",void 0,{type:"string",description:(0,o.localize)(4045,"The extension name of the resource")})}static{this.HasResource=new s.RawContextKey("resourceSet",void 0,{type:"boolean",description:(0,o.localize)(4046,"Whether a resource is present or not")})}static{this.IsFileSystemResource=new s.RawContextKey("isFileSystemResource",void 0,{type:"boolean",description:(0,o.localize)(4047,"Whether the resource is backed by a file system provider")})}constructor(e,i,o,s){this._contextKeyService=e,this._fileService=i,this._languageService=o,this._modelService=s,this._disposables=new r.DisposableStore,this._schemeKey=t.Scheme.bindTo(this._contextKeyService),this._filenameKey=t.Filename.bindTo(this._contextKeyService),this._dirnameKey=t.Dirname.bindTo(this._contextKeyService),this._pathKey=t.Path.bindTo(this._contextKeyService),this._langIdKey=t.LangId.bindTo(this._contextKeyService),this._resourceKey=t.Resource.bindTo(this._contextKeyService),this._extensionKey=t.Extension.bindTo(this._contextKeyService),this._hasResource=t.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=t.IsFileSystemResource.bindTo(this._contextKeyService),this._disposables.add(i.onDidChangeFileSystemProviderRegistrations(()=>{let e=this.get();this._isFileSystemResource.set(!!(e&&i.hasProvider(e)))})),this._disposables.add(s.onModelAdded(e=>{(0,n.isEqual)(e.uri,this.get())&&this._setLangId()})),this._disposables.add(s.onModelLanguageChanged(e=>{(0,n.isEqual)(e.model.uri,this.get())&&this._setLangId()}))}dispose(){this._disposables.dispose()}_setLangId(){let e=this.get();if(!e)return void this._langIdKey.set(null);let t=this._modelService.getModel(e)?.getLanguageId()??this._languageService.guessLanguageIdByFilepathOrFirstLine(e);this._langIdKey.set(t)}set(e){e=e??void 0,(0,n.isEqual)(this._value,e)||(this._value=e,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(e?e.toString():null),this._schemeKey.set(e?e.scheme:null),this._filenameKey.set(e?(0,n.basename)(e):null),this._dirnameKey.set(e?this.uriToPath((0,n.dirname)(e)):null),this._pathKey.set(e?this.uriToPath(e):null),this._setLangId(),this._extensionKey.set(e?(0,n.extname)(e):null),this._hasResource.set(!!e),this._isFileSystemResource.set(!!e&&this._fileService.hasProvider(e))}))}uriToPath(e){return e.scheme===h.Schemas.file?e.fsPath:e.path}reset(){this._value=void 0,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.reset(),this._schemeKey.reset(),this._filenameKey.reset(),this._dirnameKey.reset(),this._pathKey.reset(),this._langIdKey.reset(),this._extensionKey.reset(),this._hasResource.reset(),this._isFileSystemResource.reset()})}get(){return this._value}};eT=t=(0,i.__decorate)([(0,i.__param)(0,a.IContextKeyService),(0,i.__param)(1,d.IFileService),(0,i.__param)(2,l.ILanguageService),(0,i.__param)(3,c.IModelService)],eT),e.s(["ActiveAuxiliaryContext",0,ew,"ActiveCompareEditorCanSwapContext",0,M,"ActiveEditorAvailableEditorIdsContext",0,z,"ActiveEditorCanRevertContext",0,W,"ActiveEditorCanSplitInGroupContext",0,U,"ActiveEditorCanToggleReadonlyContext",0,N,"ActiveEditorContext",0,B,"ActiveEditorDirtyContext",0,T,"ActiveEditorFirstInGroupContext",0,A,"ActiveEditorGroupEmptyContext",0,q,"ActiveEditorGroupIndexContext",0,$,"ActiveEditorGroupLastContext",0,j,"ActiveEditorGroupLockedContext",0,X,"ActiveEditorLastInGroupContext",0,O,"ActiveEditorPinnedContext",0,P,"ActiveEditorReadonlyContext",0,L,"ActiveEditorStickyContext",0,k,"ActivePanelContext",0,eC,"ActiveViewletContext",0,ec,"AuxiliaryBarFocusContext",0,eS,"AuxiliaryBarMaximizedContext",0,eb,"AuxiliaryBarVisibleContext",0,eE,"BannerFocused",0,ev,"DirtyWorkingCopiesContext",0,w,"EditorGroupEditorsCountContext",0,H,"EditorPartMaximizedEditorGroupContext",0,et,"EditorPartMultipleEditorGroupsContext",0,ee,"EditorTabsVisibleContext",0,en,"EditorsVisibleContext",0,ei,"EmbedderIdentifierContext",0,F,"EmptyWorkspaceSupportContext",0,y,"EnterMultiRootWorkspaceSupportContext",0,f,"FocusedViewContext",0,eR,"HasWebFileSystemAccess",0,C,"InAutomationContext",0,D,"InEditorZenModeContext",0,er,"IsAuxiliaryWindowContext",0,R,"IsAuxiliaryWindowFocusedContext",0,I,"IsCompactTitleBarContext",0,em,"IsMainEditorCenteredLayoutContext",0,eo,"IsMainWindowFullscreenContext",0,_,"IsSandboxWorkspaceContext",0,x,"MainEditorAreaVisibleContext",0,ea,"MultipleEditorGroupsContext",0,Y,"MultipleEditorsSelectedInGroupContext",0,Q,"NotificationFocusedContext",0,eg,"NotificationsCenterVisibleContext",0,ef,"NotificationsToastsVisibleContext",0,ey,"OpenFolderWorkspaceSupportContext",0,g,"PanelAlignmentContext",0,ex,"PanelFocusContext",0,eF,"PanelMaximizedContext",0,eI,"PanelPositionContext",0,eD,"PanelVisibleContext",0,e_,"RemoteNameContext",0,S,"ResourceContextKey",0,eT,"SelectedEditorsInGroupFileOrUntitledResourceContextKey",0,J,"SideBarVisibleContext",0,el,"SideBySideEditorActiveContext",0,G,"SidebarFocusContext",0,ed,"SplitEditorsVertically",0,es,"StatusBarFocused",0,eh,"TemporaryWorkspaceContext",0,b,"TextCompareEditorActiveContext",0,K,"TextCompareEditorVisibleContext",0,V,"TitleBarStyleContext",0,eu,"TitleBarVisibleContext",0,ep,"TwoEditorsSelectedInGroupContext",0,Z,"VirtualWorkspaceContext",0,E,"WorkbenchStateContext",0,m,"WorkspaceFolderCountContext",0,v,"applyAvailableEditorIds",0,function(e,t,i){if(!t)return void e.set("");let r=function e(t,i){if(t.resource?.scheme===h.Schemas.untitled&&t.editorId!==u.DEFAULT_EDITOR_ASSOCIATION.id)return[];if(t instanceof p.DiffEditorInput){let r=e(t.original,i),o=new Set(e(t.modified,i));return r.filter(e=>o.has(e))}return t.resource?i.getEditors(t.resource).map(e=>e.id):[]}(t,i);e.set(r.join(","))},"getVisbileViewContextKey",0,function(e){return`view.${e}.visible`}])},647576,e=>{"use strict";var t,i,r=e.i(824357),o=e.i(107043),s=e.i(704994),a=e.i(454514);let n="utf8",l="utf8bom",d="utf16be",c="utf16le",h=[254,255],u=[255,254],p=[239,187,191];(t=i||(i={}))[t.STREAM_IS_BINARY=1]="STREAM_IS_BINARY";class m extends Error{constructor(e,t){super(e),this.decodeStreamErrorKind=t}}class v{static async create(t){let i;if(t!==n)i=(await e.A(560866)).getDecoder(y(t));else{let e=new TextDecoder;i={write:t=>e.decode(t,{stream:!0}),end:()=>e.decode()}}return new v(i)}constructor(e){this.iconvLiteDecoder=e}write(e){return this.iconvLiteDecoder.write(e)}end(){return this.iconvLiteDecoder.end()}}async function g(t,i,r){let s=(await e.A(560866)).getEncoder(y(i),r),a=!1,m=!1;return{read(){if(m)return null;let e=t.read();if("string"!=typeof e){if(m=!0,!a&&r?.addBOM)switch(i){case n:case l:return o.VSBuffer.wrap(Uint8Array.from(p));case d:return o.VSBuffer.wrap(Uint8Array.from(h));case c:return o.VSBuffer.wrap(Uint8Array.from(u))}let e=s.end();return e&&e.length>0?(a=!0,o.VSBuffer.wrap(e)):null}return a=!0,o.VSBuffer.wrap(s.write(e))}}}async function f(t){return(await e.A(560866)).encodingExists(y(t))}function y(e){return e===l||null===e?n:e}let w=["ascii","utf-16","utf-32"];async function S(t,i){let r,o,s=await e.A(137857),n=function(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t}(t.slice(0,65536).buffer);i&&0===(i=(0,a.coalesce)(i.map(e=>{let t;return(t=F[b(e)])?t.guessableName:void 0}))).length&&(i=void 0);try{o=s.detect(n,i?{detectEncodings:i}:void 0)}catch(e){return null}if(!o?.encoding)return null;let l=o.encoding.toLowerCase();return 0<=w.indexOf(l)?null:E[r=b(o.encoding)]||r}let E={ibm866:"cp866",big5:"cp950"};function b(e){return e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}let C={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom",guessableName:"UTF-8"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3,guessableName:"UTF-16LE"},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4,guessableName:"UTF-16BE"},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5,guessableName:"windows-1252"},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16,guessableName:"windows-1250"},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17,guessableName:"ISO-8859-2"},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19,guessableName:"windows-1251"},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20,guessableName:"IBM866"},cp1125:{labelLong:"Cyrillic (CP 1125)",labelShort:"CP 1125",order:21,guessableName:"IBM1125"},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:22,guessableName:"ISO-8859-5"},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:23,guessableName:"KOI8-R"},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:24},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:25},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:26,guessableName:"windows-1253"},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:27,guessableName:"ISO-8859-7"},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:28,guessableName:"windows-1255"},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:29,guessableName:"ISO-8859-8"},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:30},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:31},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:32},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:33},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:34},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:35},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:36},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:37,guessableName:"Big5"},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:38},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:39,guessableName:"SHIFT_JIS"},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:40,guessableName:"EUC-JP"},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:41,guessableName:"EUC-KR"},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:42},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:43},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:44},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:45},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:46,guessableName:"GB2312"},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:47},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:48}},F=(()=>{let e={};for(let t in C)C[t].guessableName&&(e[t]=C[t]);return e})();e.s(["DecodeStreamErrorKind",0,i,"GUESSABLE_ENCODINGS",0,F,"SUPPORTED_ENCODINGS",0,C,"UTF16be",0,d,"UTF16le",0,c,"UTF8",0,n,"UTF8_with_bom",0,l,"encodingExists",0,f,"toDecodeStream",0,function(e,t){let a=t.minBytesRequiredForDetection??(t.guessEncoding?4096:512);return new Promise((n,g)=>{let f,y=(0,r.newWriteableStream)(e=>e.join("")),w=[],E=0,b=new s.CancellationTokenSource,C=async()=>{try{let e=await function({buffer:e,bytesRead:t},i,r){let o=function(e,t){if(!e||t<h.length)return null;let i=e.readUInt8(0),r=e.readUInt8(1);if(i===h[0]&&r===h[1])return d;if(i===u[0]&&r===u[1])return c;if(t<p.length)return null;let o=e.readUInt8(2);return i===p[0]&&r===p[1]&&o===p[2]?l:null}(e,t),s=!1;if(o!==d&&o!==c&&e){let i=!0,r=!0,a=!1;for(let o=0;o<t&&o<512;o++){let t=o%2==1,s=0===e.readUInt8(o);if(s&&(a=!0),i&&(t&&!s||!t&&s)&&(i=!1),r&&(t&&s||!t&&!s)&&(r=!1),s&&!i&&!r)break}a&&(i?o=c:r?o=d:s=!0)}return i&&!s&&!o&&e?S(e.slice(0,t),r).then(e=>({seemsBinary:!1,encoding:e})):{seemsBinary:s,encoding:o}}({buffer:o.VSBuffer.concat(w),bytesRead:E},t.guessEncoding,t.candidateGuessEncodings);if(e.seemsBinary&&t.acceptTextOnly)throw new m("Stream is binary but only text is accepted for decoding",i.STREAM_IS_BINARY);e.encoding=await t.overwriteEncoding(e.encoding);let r=(f=await v.create(e.encoding)).write(o.VSBuffer.concat(w).buffer);y.write(r),w.length=0,E=0,n({stream:y,detected:e})}catch(e){b.cancel(),y.destroy(),g(e)}};(0,r.listenStream)(e,{onData:async t=>{f?y.write(f.write(t.buffer)):(w.push(t),(E+=t.byteLength)>=a&&(e.pause(),await C(),setTimeout(()=>e.resume())))},onError:e=>y.error(e),onEnd:async()=>{f||await C(),y.end(f?.end())}},b.token)})},"toEncodeReadable",0,g])},927718,e=>{"use strict";var t=e.i(702320);function i(e){return e.scheme!==t.Schemas.file&&e.scheme!==t.Schemas.vscodeRemote}function r(e){return e.folders.length?e.folders.every(e=>i(e.uri))?e.folders[0].uri:void 0:e.configuration&&i(e.configuration)?e.configuration:void 0}e.s(["getVirtualWorkspaceLocation",0,r,"getVirtualWorkspaceScheme",0,function(e){return r(e)?.scheme},"isVirtualResource",0,i,"isVirtualWorkspace",0,function(e){return void 0!==r(e)}])},254231,130572,e=>{"use strict";var t,i=e.i(281482),r=e.i(454514),o=e.i(590746),s=e.i(107043),a=e.i(704994),n=e.i(781808),l=e.i(182504),d=e.i(751753),c=e.i(611130),h=e.i(226870),u=e.i(702320),p=e.i(40577),m=e.i(693162),v=e.i(824357),g=e.i(650289),f=e.i(652731),y=e.i(619122);async function w(e,t,i,r,o,s){let a;try{await S(e,t,i,r,o,s)}catch(e){a=e}finally{a&&o.errorTransformer&&(a=o.errorTransformer(a)),void 0!==a&&i.error(a),i.end()}}async function S(e,t,i,r,o,a){E(a);let n=await e.open(t,{create:!1});try{E(a);let t=0,l=0,d=o&&"number"==typeof o.length?o.length:void 0,c=s.VSBuffer.alloc(Math.min(o.bufferSize,"number"==typeof d?d:o.bufferSize)),h=o&&"number"==typeof o.position?o.position:0,u=0;do l=await e.read(n,h,c.buffer,u,c.byteLength-u),h+=l,u+=l,t+=l,"number"==typeof d&&(d-=l),u===c.byteLength&&(await i.write(r(c)),c=s.VSBuffer.alloc(Math.min(o.bufferSize,"number"==typeof d?d:o.bufferSize)),u=0);while(l>0&&("number"!=typeof d||d>0)&&E(a)&&function(e,t){if("number"==typeof t?.limits?.size&&e>t.limits.size)throw(0,f.createFileSystemProviderError)((0,g.localize)(1945,"File is too large to open"),f.FileSystemProviderErrorCode.FileTooLarge);return!0}(t,o))if(u>0){let e=u;"number"==typeof d&&(e=Math.min(u,d)),i.write(r(c.slice(0,e)))}}catch(e){throw(0,f.ensureFileSystemProviderError)(e)}finally{await e.close(n)}}function E(e){if(e.isCancellationRequested)throw(0,y.canceled)();return!0}var b=e.i(853457);function C(e){return e.scheme===u.Schemas.file?e.fsPath:e.toString(!0)}async function F(e,t,i){let r=[];for(;!e.isEqual(i,e.dirname(i));)try{if(((await t.stat(i)).type&f.FileType.Directory)==0)throw Error((0,g.localize)(1913,"Unable to create folder '{0}' that already exists but is not a directory",C(i)));break}catch(t){if((0,f.toFileSystemProviderErrorCode)(t)!==f.FileSystemProviderErrorCode.FileNotFound)throw t;r.push(e.basename(i)),i=e.dirname(i)}for(let o=r.length-1;o>=0;o--){i=e.joinPath(i,r[o]);try{await t.mkdir(i)}catch(e){if((0,f.toFileSystemProviderErrorCode)(e)!==f.FileSystemProviderErrorCode.FileExists)throw e}}}let D=class extends c.Disposable{static{t=this}constructor(e){super(),this.logService=e,this.BUFFER_SIZE=262144,this._onDidChangeFileSystemProviderRegistrations=this._register(new n.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new n.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new n.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new n.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this.internalOnDidFilesChange=this._register(new n.Emitter),this._onDidUncorrelatedFilesChange=this._register(new n.Emitter),this.onDidFilesChange=this._onDidUncorrelatedFilesChange.event,this._onDidWatchError=this._register(new n.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new o.ResourceQueue)}registerProvider(e,t){if(this.provider.has(e))throw Error(`A filesystem provider for the scheme '${e}' is already registered.`);(0,p.mark)(`code/registerFilesystem/${e}`);let i=new c.DisposableStore;return this.provider.set(e,t),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:e,provider:t}),i.add(t.onDidChangeFile(e=>{let i=new f.FileChangesEvent(e,!this.isPathCaseSensitive(t));this.internalOnDidFilesChange.fire(i),i.hasCorrelation()||this._onDidUncorrelatedFilesChange.fire(i)})),"function"==typeof t.onDidWatchError&&i.add(t.onDidWatchError(e=>this._onDidWatchError.fire(Error(e)))),i.add(t.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:t,scheme:e}))),(0,c.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),this.provider.delete(e),(0,c.dispose)(i)})}getProvider(e){return this.provider.get(e)}async activateProvider(e){let t=[];this._onWillActivateFileSystemProvider.fire({scheme:e,join(e){t.push(e)}}),this.provider.has(e)||await o.Promises.settled(t)}async canHandleResource(e){return await this.activateProvider(e.scheme),this.hasProvider(e)}hasProvider(e){return this.provider.has(e.scheme)}hasCapability(e,t){let i=this.provider.get(e.scheme);return!!(i&&i.capabilities&t)}listCapabilities(){return d.Iterable.map(this.provider,([e,t])=>({scheme:e,capabilities:t.capabilities}))}async withProvider(e){if(!(0,m.isAbsolutePath)(e))throw new f.FileOperationError((0,g.localize)(1914,"Unable to resolve filesystem provider with relative file path '{0}'",this.resourceForError(e)),f.FileOperationResult.FILE_INVALID_PATH);await this.activateProvider(e.scheme);let t=this.provider.get(e.scheme);if(!t){let t=new y.ErrorNoTelemetry;throw t.message=(0,g.localize)(1915,"ENOPRO: No file system provider found for resource '{0}'",e.toString()),t}return t}async withReadProvider(e){let t=await this.withProvider(e);if((0,f.hasOpenReadWriteCloseCapability)(t)||(0,f.hasReadWriteCapability)(t)||(0,f.hasFileReadStreamCapability)(t))return t;throw Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(e){let t=await this.withProvider(e);if((0,f.hasOpenReadWriteCloseCapability)(t)||(0,f.hasReadWriteCapability)(t))return t;throw Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(e,t){try{return await this.doResolveFile(e,t)}catch(t){if((0,f.toFileSystemProviderErrorCode)(t)===f.FileSystemProviderErrorCode.FileNotFound)throw new f.FileOperationError((0,g.localize)(1916,"Unable to resolve nonexistent file '{0}'",this.resourceForError(e)),f.FileOperationResult.FILE_NOT_FOUND);throw(0,f.ensureFileSystemProviderError)(t)}}async doResolveFile(e,t){let i,r=await this.withProvider(e),o=this.isPathCaseSensitive(r),s=t?.resolveTo,a=t?.resolveSingleChildDescendants,n=t?.resolveMetadata,l=await r.stat(e);return this.toFileStat(r,e,l,void 0,!!n,(t,r)=>(!i&&((i=h.TernarySearchTree.forUris(()=>!o)).set(e,!0),s&&i.fill(!0,s)),!!(i.get(t.resource)||i.findSuperstr(t.resource.with({query:null,fragment:null})))||!!t.isDirectory&&!!a&&1===r))}async toFileStat(e,t,i,s,a,n){let{providerExtUri:l}=this.getExtUri(e),d={resource:t,name:l.basename(t),isFile:(i.type&f.FileType.File)!=0,isDirectory:(i.type&f.FileType.Directory)!=0,isSymbolicLink:(i.type&f.FileType.SymbolicLink)!=0,mtime:i.mtime,ctime:i.ctime,size:i.size,readonly:!!((i.permissions??0)&f.FilePermission.Readonly)||!!(e.capabilities&f.FileSystemProviderCapabilities.Readonly),locked:!!((i.permissions??0)&f.FilePermission.Locked),executable:!!((i.permissions??0)&f.FilePermission.Executable),etag:(0,f.etag)({mtime:i.mtime,size:i.size}),children:void 0};if(d.isDirectory&&n(d,s))try{let i=await e.readdir(t),s=await o.Promises.settled(i.map(async([r,o])=>{try{let s=l.joinPath(t,r),d=a?await e.stat(s):{type:o};return await this.toFileStat(e,s,d,i.length,a,n)}catch(e){return this.logService.trace(e),null}}));d.children=(0,r.coalesce)(s)}catch(e){this.logService.trace(e),d.children=[]}return d}async resolveAll(e){return o.Promises.settled(e.map(async e=>{try{return{stat:await this.doResolveFile(e.resource,e.options),success:!0}}catch(e){return this.logService.trace(e),{stat:void 0,success:!1}}}))}async stat(e){let t=await this.withProvider(e),i=await t.stat(e);return this.toFileStat(t,e,i,void 0,!0,()=>!1)}async realpath(e){let t=await this.withProvider(e);if((0,f.hasFileRealpathCapability)(t)){let i=await t.realpath(e);return e.with({path:i})}}async exists(e){let t=await this.withProvider(e);try{return!!await t.stat(e)}catch(e){return!1}}async canCreateFile(e,t){try{await this.doValidateCreateFile(e,t)}catch(e){return e}return!0}async doValidateCreateFile(e,t){if(!t?.overwrite&&await this.exists(e))throw new f.FileOperationError((0,g.localize)(1917,"Unable to create file '{0}' that already exists when overwrite flag is not set",this.resourceForError(e)),f.FileOperationResult.FILE_MODIFIED_SINCE,t)}async createFile(e,t=s.VSBuffer.fromString(""),i){await this.doValidateCreateFile(e,i);let r=await this.writeFile(e,t);return this._onDidRunOperation.fire(new f.FileOperationEvent(e,f.FileOperation.CREATE,r)),r}async writeFile(e,t,i){let r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e),{providerExtUri:o}=this.getExtUri(r),a=i;if((0,f.hasFileAtomicWriteCapability)(r)&&!a?.atomic){let t=r.enforceAtomicWriteFile?.(e);t&&(a={...i,atomic:t})}try{let{stat:i,buffer:n}=await this.validateWriteFile(r,e,t,a);i||await this.mkdirp(r,o.dirname(e)),n||(n=await this.peekBufferForWriting(r,t)),!(0,f.hasOpenReadWriteCloseCapability)(r)||(0,f.hasReadWriteCapability)(r)&&n instanceof s.VSBuffer||(0,f.hasReadWriteCapability)(r)&&(0,f.hasFileAtomicWriteCapability)(r)&&a?.atomic?await this.doWriteUnbuffered(r,e,a,n):await this.doWriteBuffered(r,e,a,n instanceof s.VSBuffer?(0,s.bufferToReadable)(n):n),this._onDidRunOperation.fire(new f.FileOperationEvent(e,f.FileOperation.WRITE))}catch(t){throw new f.FileOperationError((0,g.localize)(1918,"Unable to write file '{0}' ({1})",this.resourceForError(e),(0,f.ensureFileSystemProviderError)(t).toString()),(0,f.toFileOperationResult)(t),a)}return this.resolve(e,{resolveMetadata:!0})}async peekBufferForWriting(e,t){let i;if(!(0,f.hasReadWriteCapability)(e)||t instanceof s.VSBuffer)i=t;else if((0,v.isReadableStream)(t)){let e=await (0,v.peekStream)(t,3);i=e.ended?s.VSBuffer.concat(e.buffer):e}else i=(0,v.peekReadable)(t,e=>s.VSBuffer.concat(e),3);return i}async validateWriteFile(e,t,i,r){let o,a,n=!!r?.unlock;if(n&&!(e.capabilities&f.FileSystemProviderCapabilities.FileWriteUnlock))throw Error((0,g.localize)(1919,"Unable to unlock file '{0}' because provider does not support it.",this.resourceForError(t)));if(r?.atomic){if(!(e.capabilities&f.FileSystemProviderCapabilities.FileAtomicWrite))throw Error((0,g.localize)(1920,"Unable to atomically write file '{0}' because provider does not support it.",this.resourceForError(t)));if(!(e.capabilities&f.FileSystemProviderCapabilities.FileReadWrite))throw Error((0,g.localize)(1921,"Unable to atomically write file '{0}' because provider does not support unbuffered writes.",this.resourceForError(t)));if(n)throw Error((0,g.localize)(1922,"Unable to unlock file '{0}' because atomic write is enabled.",this.resourceForError(t)))}try{a=await e.stat(t)}catch(e){return Object.create(null)}if((a.type&f.FileType.Directory)!=0)throw new f.FileOperationError((0,g.localize)(1923,"Unable to write file '{0}' that is actually a directory",this.resourceForError(t)),f.FileOperationResult.FILE_IS_DIRECTORY,r);if(this.throwIfFileIsReadonly(t,a),"number"==typeof r?.mtime&&"string"==typeof r.etag&&r.etag!==f.ETAG_DISABLED&&"number"==typeof a.mtime&&"number"==typeof a.size&&r.mtime<a.mtime&&r.etag!==(0,f.etag)({mtime:r.mtime,size:a.size})){if((o=await this.peekBufferForWriting(e,i))instanceof s.VSBuffer&&o.byteLength===a.size)try{let{value:e}=await this.readFile(t,{limits:{size:a.size}});if(o.equals(e))return{stat:a,buffer:o}}catch(e){}throw new f.FileOperationError((0,g.localize)(1924,"File Modified Since"),f.FileOperationResult.FILE_MODIFIED_SINCE,r)}return{stat:a,buffer:o}}async readFile(e,t,i){let r=await this.withReadProvider(e);return t?.atomic?this.doReadFileAtomic(r,e,t,i):this.doReadFile(r,e,t,i)}async doReadFileAtomic(e,t,i,r){return new Promise((o,s)=>{this.writeQueue.queueFor(t,async()=>{try{let s=await this.doReadFile(e,t,i,r);o(s)}catch(e){s(e)}},this.getExtUri(e).providerExtUri)})}async doReadFile(e,t,i,r){let o=await this.doReadFileStream(e,t,{...i,preferUnbuffered:!0},r);return{...o,value:await (0,s.streamToBuffer)(o.value)}}async readFileStream(e,t,i){let r=await this.withReadProvider(e);return this.doReadFileStream(r,e,t,i)}async doReadFileStream(e,t,i,r){let o,s=new a.CancellationTokenSource(r),n=i;(0,f.hasFileAtomicReadCapability)(e)&&e.enforceAtomicReadFile?.(t)&&(n={...i,atomic:!0});let l=this.validateReadFile(t,n).then(e=>e,e=>{throw s.dispose(!0),e});try{return"string"==typeof n?.etag&&n.etag!==f.ETAG_DISABLED&&await l,(o=n?.atomic&&(0,f.hasFileAtomicReadCapability)(e)||!((0,f.hasOpenReadWriteCloseCapability)(e)||(0,f.hasFileReadStreamCapability)(e))||(0,f.hasReadWriteCapability)(e)&&n?.preferUnbuffered?this.readFileUnbuffered(e,t,n):(0,f.hasFileReadStreamCapability)(e)?this.readFileStreamed(e,t,s.token,n):this.readFileBuffered(e,t,s.token,n)).on("end",()=>s.dispose()),o.on("error",()=>s.dispose()),{...await l,value:o}}catch(e){throw o&&await (0,v.consumeStream)(o),this.restoreReadError(e,t,n)}}restoreReadError(e,t,i){let r=(0,g.localize)(1925,"Unable to read file '{0}' ({1})",this.resourceForError(t),(0,f.ensureFileSystemProviderError)(e).toString());return e instanceof f.NotModifiedSinceFileOperationError?new f.NotModifiedSinceFileOperationError(r,e.stat,i):e instanceof f.TooLargeFileOperationError?new f.TooLargeFileOperationError(r,e.fileOperationResult,e.size,e.options):new f.FileOperationError(r,(0,f.toFileOperationResult)(e),i)}readFileStreamed(e,t,i,r=Object.create(null)){let o=e.readFileStream(t,r,i);return(0,v.transform)(o,{data:e=>e instanceof s.VSBuffer?e:s.VSBuffer.wrap(e),error:e=>this.restoreReadError(e,t,r)},e=>s.VSBuffer.concat(e))}readFileBuffered(e,t,i,r=Object.create(null)){let o=(0,s.newWriteableBufferStream)();return w(e,t,o,e=>e,{...r,bufferSize:this.BUFFER_SIZE,errorTransformer:e=>this.restoreReadError(e,t,r)},i),o}readFileUnbuffered(e,t,i){let r=(0,v.newWriteableStream)(e=>s.VSBuffer.concat(e));return(async()=>{try{let o;o=i?.atomic&&(0,f.hasFileAtomicReadCapability)(e)?await e.readFile(t,{atomic:!0}):await e.readFile(t),"number"==typeof i?.position&&(o=o.slice(i.position)),"number"==typeof i?.length&&(o=o.slice(0,i.length)),this.validateReadFileLimits(t,o.byteLength,i),r.end(s.VSBuffer.wrap(o))}catch(e){r.error(e),r.end()}})(),r}async validateReadFile(e,t){let i=await this.resolve(e,{resolveMetadata:!0});if(i.isDirectory)throw new f.FileOperationError((0,g.localize)(1926,"Unable to read file '{0}' that is actually a directory",this.resourceForError(e)),f.FileOperationResult.FILE_IS_DIRECTORY,t);if("string"==typeof t?.etag&&t.etag!==f.ETAG_DISABLED&&t.etag===i.etag)throw new f.NotModifiedSinceFileOperationError((0,g.localize)(1927,"File not modified since"),i,t);return this.validateReadFileLimits(e,i.size,t),i}validateReadFileLimits(e,t,i){if("number"==typeof i?.limits?.size&&t>i.limits.size)throw new f.TooLargeFileOperationError((0,g.localize)(1928,"Unable to read file '{0}' that is too large to open",this.resourceForError(e)),f.FileOperationResult.FILE_TOO_LARGE,t,i)}async canMove(e,t,i){return this.doCanMoveCopy(e,t,"move",i)}async canCopy(e,t,i){return this.doCanMoveCopy(e,t,"copy",i)}async doCanMoveCopy(e,t,i,r){if(e.toString()!==t.toString())try{let o="move"===i?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e):await this.withReadProvider(e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);await this.doValidateMoveCopy(o,e,s,t,i,r)}catch(e){return e}return!0}async move(e,t,i){let r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),s=await this.doMoveCopy(r,e,o,t,"move",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new f.FileOperationEvent(e,"move"===s?f.FileOperation.MOVE:f.FileOperation.COPY,a)),a}async copy(e,t,i){let r=await this.withReadProvider(e),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),s=await this.doMoveCopy(r,e,o,t,"copy",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new f.FileOperationEvent(e,"copy"===s?f.FileOperation.COPY:f.FileOperation.MOVE,a)),a}async doMoveCopy(e,t,i,r,o,s){if(t.toString()===r.toString())return o;let{exists:a,isSameResourceWithDifferentPathCase:n}=await this.doValidateMoveCopy(e,t,i,r,o,s);if(a&&!n&&s&&await this.del(r,{recursive:!0}),await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(r)),"copy"===o){if(e===i&&(0,f.hasFileFolderCopyCapability)(e))await e.copy(t,r,{overwrite:s});else{let o=await this.resolve(t);o.isDirectory?await this.doCopyFolder(e,o,i,r):await this.doCopyFile(e,t,i,r)}return o}return e===i?(await e.rename(t,r,{overwrite:s}),o):(await this.doMoveCopy(e,t,i,r,"copy",s),await this.del(t,{recursive:!0}),"copy")}async doCopyFile(e,t,i,r){return(0,f.hasOpenReadWriteCloseCapability)(e)&&(0,f.hasOpenReadWriteCloseCapability)(i)?this.doPipeBuffered(e,t,i,r):(0,f.hasOpenReadWriteCloseCapability)(e)&&(0,f.hasReadWriteCapability)(i)?this.doPipeBufferedToUnbuffered(e,t,i,r):(0,f.hasReadWriteCapability)(e)&&(0,f.hasOpenReadWriteCloseCapability)(i)?this.doPipeUnbufferedToBuffered(e,t,i,r):(0,f.hasReadWriteCapability)(e)&&(0,f.hasReadWriteCapability)(i)?this.doPipeUnbuffered(e,t,i,r):void 0}async doCopyFolder(e,t,i,r){await i.mkdir(r),Array.isArray(t.children)&&await o.Promises.settled(t.children.map(async t=>{let o=this.getExtUri(i).providerExtUri.joinPath(r,t.name);return t.isDirectory?this.doCopyFolder(e,await this.resolve(t.resource),i,o):this.doCopyFile(e,t.resource,i,o)}))}async doValidateMoveCopy(e,t,i,r,o,s){let a=!1;if(e===i){let{providerExtUri:i,isPathCaseSensitive:s}=this.getExtUri(e);if(s||(a=i.isEqual(t,r)),a&&"copy"===o)throw Error((0,g.localize)(1929,"Unable to copy when source '{0}' is same as target '{1}' with different path case on a case insensitive file system",this.resourceForError(t),this.resourceForError(r)));if(!a&&i.isEqualOrParent(r,t))throw Error((0,g.localize)(1930,"Unable to move/copy when source '{0}' is parent of target '{1}'.",this.resourceForError(t),this.resourceForError(r)))}let n=await this.exists(r);if(n&&!a){if(!s)throw new f.FileOperationError((0,g.localize)(1931,"Unable to move/copy '{0}' because target '{1}' already exists at destination.",this.resourceForError(t),this.resourceForError(r)),f.FileOperationResult.FILE_MOVE_CONFLICT);if(e===i){let{providerExtUri:i}=this.getExtUri(e);if(i.isEqualOrParent(t,r))throw Error((0,g.localize)(1932,"Unable to move/copy '{0}' into '{1}' since a file would replace the folder it is contained in.",this.resourceForError(t),this.resourceForError(r)))}}return{exists:n,isSameResourceWithDifferentPathCase:a}}getExtUri(e){let t=this.isPathCaseSensitive(e);return{providerExtUri:t?m.extUri:m.extUriIgnorePathCase,isPathCaseSensitive:t}}isPathCaseSensitive(e){return!!(e.capabilities&f.FileSystemProviderCapabilities.PathCaseSensitive)}async createFolder(e){let t=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e);await this.mkdirp(t,e);let i=await this.resolve(e,{resolveMetadata:!0});return this._onDidRunOperation.fire(new f.FileOperationEvent(e,f.FileOperation.CREATE,i)),i}async mkdirp(e,t){let{providerExtUri:i}=this.getExtUri(e);return F(i,e,t)}async canDelete(e,t){try{await this.doValidateDelete(e,t)}catch(e){return e}return!0}async doValidateDelete(e,t){let i,r=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e),o=!!t?.useTrash;if(o&&!(r.capabilities&f.FileSystemProviderCapabilities.Trash))throw Error((0,g.localize)(1933,"Unable to delete file '{0}' via trash because provider does not support it.",this.resourceForError(e)));let s=t?.atomic;if(s&&!(r.capabilities&f.FileSystemProviderCapabilities.FileAtomicDelete))throw Error((0,g.localize)(1934,"Unable to delete file '{0}' atomically because provider does not support it.",this.resourceForError(e)));if(o&&s)throw Error((0,g.localize)(1935,"Unable to atomically delete file '{0}' because using trash is enabled.",this.resourceForError(e)));try{i=await r.stat(e)}catch(e){}if(i)this.throwIfFileIsReadonly(e,i);else throw new f.FileOperationError((0,g.localize)(1936,"Unable to delete nonexistent file '{0}'",this.resourceForError(e)),f.FileOperationResult.FILE_NOT_FOUND);if(!t?.recursive){let t=await this.resolve(e);if(t.isDirectory&&Array.isArray(t.children)&&t.children.length>0)throw Error((0,g.localize)(1937,"Unable to delete non-empty folder '{0}'.",this.resourceForError(e)))}return r}async del(e,t){let i=await this.doValidateDelete(e,t),r=t;if((0,f.hasFileAtomicDeleteCapability)(i)&&!r?.atomic){let o=i.enforceAtomicDelete?.(e);o&&(r={...t,atomic:o})}let o=!!r?.useTrash,s=!!r?.recursive,a=r?.atomic??!1;await i.delete(e,{recursive:s,useTrash:o,atomic:a}),this._onDidRunOperation.fire(new f.FileOperationEvent(e,f.FileOperation.DELETE))}async cloneFile(e,t){let i=await this.withProvider(e),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);if(!(i===r&&this.getExtUri(i).providerExtUri.isEqual(e,t)))return i===r&&(0,f.hasFileCloneCapability)(i)?i.cloneFile(e,t):(await this.mkdirp(r,this.getExtUri(r).providerExtUri.dirname(t)),i===r&&(0,f.hasFileFolderCopyCapability)(i))?this.writeQueue.queueFor(e,()=>i.copy(e,t,{overwrite:!0}),this.getExtUri(i).providerExtUri):this.writeQueue.queueFor(e,()=>this.doCopyFile(i,e,r,t),this.getExtUri(i).providerExtUri)}static{this.WATCHER_CORRELATION_IDS=0}createWatcher(e,i){return this.watch(e,{...i,correlationId:t.WATCHER_CORRELATION_IDS++})}watch(e,t={recursive:!1,excludes:[]}){let i=new c.DisposableStore,r=!1,o=()=>{r=!0};i.add((0,c.toDisposable)(()=>o())),(async()=>{try{let i=await this.doWatch(e,t);r?(0,c.dispose)(i):o=()=>(0,c.dispose)(i)}catch(e){this.logService.error(e)}})();let s=t.correlationId;if("number"==typeof s){let e=i.add(new n.Emitter);return i.add(this.internalOnDidFilesChange.event(t=>{t.correlates(s)&&e.fire(t)})),{onDidChange:e.event,dispose:()=>i.dispose()}}return i}async doWatch(e,t){let i=await this.withProvider(e),r=(0,l.hash)([this.getExtUri(i).providerExtUri.getComparisonKey(e),t]),o=this.activeWatchers.get(r);return o||(o={count:0,disposable:i.watch(e,t)},this.activeWatchers.set(r,o)),o.count+=1,(0,c.toDisposable)(()=>{o&&(o.count--,0===o.count&&((0,c.dispose)(o.disposable),this.activeWatchers.delete(r)))})}dispose(){for(let[,e]of(super.dispose(),this.activeWatchers))(0,c.dispose)(e.disposable);this.activeWatchers.clear()}async doWriteBuffered(e,t,i,r){return this.writeQueue.queueFor(t,async()=>{let o=await e.open(t,{create:!0,unlock:i?.unlock??!1});try{(0,v.isReadableStream)(r)||(0,v.isReadableBufferedStream)(r)?await this.doWriteStreamBufferedQueued(e,o,r):await this.doWriteReadableBufferedQueued(e,o,r)}catch(e){throw(0,f.ensureFileSystemProviderError)(e)}finally{await e.close(o)}},this.getExtUri(e).providerExtUri)}async doWriteStreamBufferedQueued(e,t,i){let r,o=0;if((0,v.isReadableBufferedStream)(i)){if(i.buffer.length>0){let r=s.VSBuffer.concat(i.buffer);await this.doWriteBuffer(e,t,r,r.byteLength,o,0),o+=r.byteLength}if(i.ended)return;r=i.stream}else r=i;return new Promise((i,s)=>{(0,v.listenStream)(r,{onData:async i=>{r.pause();try{await this.doWriteBuffer(e,t,i,i.byteLength,o,0)}catch(e){return s(e)}o+=i.byteLength,setTimeout(()=>r.resume())},onError:e=>s(e),onEnd:()=>i()})})}async doWriteReadableBufferedQueued(e,t,i){let r,o=0;for(;null!==(r=i.read());)await this.doWriteBuffer(e,t,r,r.byteLength,o,0),o+=r.byteLength}async doWriteBuffer(e,t,i,r,o,s){let a=0;for(;a<r;){let n=await e.write(t,o+a,i.buffer,s+a,r-a);a+=n}}async doWriteUnbuffered(e,t,i,r){return this.writeQueue.queueFor(t,()=>this.doWriteUnbufferedQueued(e,t,i,r),this.getExtUri(e).providerExtUri)}async doWriteUnbufferedQueued(e,t,i,r){let o;o=r instanceof s.VSBuffer?r:(0,v.isReadableStream)(r)?await (0,s.streamToBuffer)(r):(0,v.isReadableBufferedStream)(r)?await (0,s.bufferedStreamToBuffer)(r):(0,s.readableToBuffer)(r),await e.writeFile(t,o.buffer,{create:!0,overwrite:!0,unlock:i?.unlock??!1,atomic:i?.atomic??!1})}async doPipeBuffered(e,t,i,r){return this.writeQueue.queueFor(r,()=>this.doPipeBufferedQueued(e,t,i,r),this.getExtUri(i).providerExtUri)}async doPipeBufferedQueued(e,t,i,r){let a,n;try{a=await e.open(t,{create:!1}),n=await i.open(r,{create:!0,unlock:!1});let o=s.VSBuffer.alloc(this.BUFFER_SIZE),l=0,d=0,c=0;do c=await e.read(a,l,o.buffer,d,o.byteLength-d),await this.doWriteBuffer(i,n,o,c,l,d),l+=c,(d+=c)===o.byteLength&&(d=0);while(c>0)}catch(e){throw(0,f.ensureFileSystemProviderError)(e)}finally{await o.Promises.settled(["number"==typeof a?e.close(a):Promise.resolve(),"number"==typeof n?i.close(n):Promise.resolve()])}}async doPipeUnbuffered(e,t,i,r){return this.writeQueue.queueFor(r,()=>this.doPipeUnbufferedQueued(e,t,i,r),this.getExtUri(i).providerExtUri)}async doPipeUnbufferedQueued(e,t,i,r){return i.writeFile(r,await e.readFile(t),{create:!0,overwrite:!0,unlock:!1,atomic:!1})}async doPipeUnbufferedToBuffered(e,t,i,r){return this.writeQueue.queueFor(r,()=>this.doPipeUnbufferedToBufferedQueued(e,t,i,r),this.getExtUri(i).providerExtUri)}async doPipeUnbufferedToBufferedQueued(e,t,i,r){let o=await i.open(r,{create:!0,unlock:!1});try{let r=await e.readFile(t);await this.doWriteBuffer(i,o,s.VSBuffer.wrap(r),r.byteLength,0,0)}catch(e){throw(0,f.ensureFileSystemProviderError)(e)}finally{await i.close(o)}}async doPipeBufferedToUnbuffered(e,t,i,r){let o=await (0,s.streamToBuffer)(this.readFileBuffered(e,t,a.CancellationToken.None));await this.doWriteUnbuffered(i,r,void 0,o)}throwIfFileSystemIsReadonly(e,t){if(e.capabilities&f.FileSystemProviderCapabilities.Readonly)throw new f.FileOperationError((0,g.localize)(1938,"Unable to modify read-only file '{0}'",this.resourceForError(t)),f.FileOperationResult.FILE_PERMISSION_DENIED);return e}throwIfFileIsReadonly(e,t){if((t.permissions??0)&f.FilePermission.Readonly)throw new f.FileOperationError((0,g.localize)(1938,"Unable to modify read-only file '{0}'",this.resourceForError(e)),f.FileOperationResult.FILE_PERMISSION_DENIED)}resourceForError(e){return C(e)}};D=t=(0,i.__decorate)([(0,i.__param)(0,b.ILogService)],D),e.s(["FileService",0,D,"mkdirp",0,F],254231);var x=c;class _{constructor(e){this.type=f.FileType.File,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=e}}class I{constructor(e){this.type=f.FileType.Directory,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=e,this.entries=new Map}}class R extends x.Disposable{constructor(){super(...arguments),this.memoryFdCounter=0,this.fdMemory=new Map,this._onDidChangeCapabilities=this._register(new n.Emitter),this.onDidChangeCapabilities=this._onDidChangeCapabilities.event,this._capabilities=f.FileSystemProviderCapabilities.FileReadWrite|f.FileSystemProviderCapabilities.PathCaseSensitive,this.root=new I(""),this._onDidChangeFile=this._register(new n.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._bufferedChanges=[]}get capabilities(){return this._capabilities}setReadOnly(e){!!(this._capabilities&f.FileSystemProviderCapabilities.Readonly)!==e&&(this._capabilities=e?f.FileSystemProviderCapabilities.Readonly|f.FileSystemProviderCapabilities.PathCaseSensitive|f.FileSystemProviderCapabilities.FileReadWrite:f.FileSystemProviderCapabilities.FileReadWrite|f.FileSystemProviderCapabilities.PathCaseSensitive,this._onDidChangeCapabilities.fire())}async stat(e){return this._lookup(e,!1)}async readdir(e){let t=this._lookupAsDirectory(e,!1),i=[];return t.entries.forEach((e,t)=>i.push([t,e.type])),i}async readFile(e){let t=this._lookupAsFile(e,!1).data;if(t)return t;throw(0,f.createFileSystemProviderError)("file not found",f.FileSystemProviderErrorCode.FileNotFound)}readFileStream(e){let t=this._lookupAsFile(e,!1).data,i=(0,v.newWriteableStream)(e=>s.VSBuffer.concat(e.map(e=>s.VSBuffer.wrap(e))).buffer);return i.end(t),i}async writeFile(e,t,i){let r=(0,m.basename)(e),o=this._lookupParentDirectory(e),s=o.entries.get(r);if(s instanceof I)throw(0,f.createFileSystemProviderError)("file is directory",f.FileSystemProviderErrorCode.FileIsADirectory);if(!s&&!i.create)throw(0,f.createFileSystemProviderError)("file not found",f.FileSystemProviderErrorCode.FileNotFound);if(s&&i.create&&!i.overwrite)throw(0,f.createFileSystemProviderError)("file exists already",f.FileSystemProviderErrorCode.FileExists);s||(s=new _(r),o.entries.set(r,s),this._fireSoon({type:f.FileChangeType.ADDED,resource:e})),s.mtime=Date.now(),s.size=t.byteLength,s.data=t,this._fireSoon({type:f.FileChangeType.UPDATED,resource:e})}open(e,t){let i=this._lookupAsFile(e,!1).data;if(i){let e=this.memoryFdCounter++;return this.fdMemory.set(e,i),Promise.resolve(e)}throw(0,f.createFileSystemProviderError)("file not found",f.FileSystemProviderErrorCode.FileNotFound)}close(e){return this.fdMemory.delete(e),Promise.resolve()}read(e,t,i,r,o){let a=this.fdMemory.get(e);if(!a)throw(0,f.createFileSystemProviderError)("No file with that descriptor open",f.FileSystemProviderErrorCode.Unavailable);let n=s.VSBuffer.wrap(a).slice(t,t+o);return i.set(n.buffer,r),Promise.resolve(n.byteLength)}write(e,t,i,r,o){let a=this.fdMemory.get(e);if(!a)throw(0,f.createFileSystemProviderError)("No file with that descriptor open",f.FileSystemProviderErrorCode.Unavailable);let n=s.VSBuffer.wrap(i).slice(r,r+o);return a.set(n.buffer,t),Promise.resolve(n.byteLength)}async rename(e,t,i){if(!i.overwrite&&this._lookup(t,!0))throw(0,f.createFileSystemProviderError)("file exists already",f.FileSystemProviderErrorCode.FileExists);let r=this._lookup(e,!1),o=this._lookupParentDirectory(e),s=this._lookupParentDirectory(t),a=(0,m.basename)(t);o.entries.delete(r.name),r.name=a,s.entries.set(a,r),this._fireSoon({type:f.FileChangeType.DELETED,resource:e},{type:f.FileChangeType.ADDED,resource:t})}async delete(e,t){let i=(0,m.dirname)(e),r=(0,m.basename)(e),o=this._lookupAsDirectory(i,!1);o.entries.delete(r)&&(o.mtime=Date.now(),o.size-=1,this._fireSoon({type:f.FileChangeType.UPDATED,resource:i},{resource:e,type:f.FileChangeType.DELETED}))}async mkdir(e){if(this._lookup(e,!0))throw(0,f.createFileSystemProviderError)("file exists already",f.FileSystemProviderErrorCode.FileExists);let t=(0,m.basename)(e),i=(0,m.dirname)(e),r=this._lookupAsDirectory(i,!1),o=new I(t);r.entries.set(o.name,o),r.mtime=Date.now(),r.size+=1,this._fireSoon({type:f.FileChangeType.UPDATED,resource:i},{type:f.FileChangeType.ADDED,resource:e})}_lookup(e,t){let i=e.path.split("/"),r=this.root;for(let e of i){let i;if(e){if(r instanceof I&&(i=r.entries.get(e)),!i)if(t)return;else throw(0,f.createFileSystemProviderError)("file not found",f.FileSystemProviderErrorCode.FileNotFound);r=i}}return r}_lookupAsDirectory(e,t){let i=this._lookup(e,t);if(i instanceof I)return i;throw(0,f.createFileSystemProviderError)("file not a directory",f.FileSystemProviderErrorCode.FileNotADirectory)}_lookupAsFile(e,t){let i=this._lookup(e,t);if(i instanceof _)return i;throw(0,f.createFileSystemProviderError)("file is a directory",f.FileSystemProviderErrorCode.FileIsADirectory)}_lookupParentDirectory(e){let t=(0,m.dirname)(e);return this._lookupAsDirectory(t,!1)}watch(e,t){return x.Disposable.None}_fireSoon(...e){this._bufferedChanges.push(...e),this._fireSoonHandle&&clearTimeout(this._fireSoonHandle),this._fireSoonHandle=setTimeout(()=>{this._onDidChangeFile.fire(this._bufferedChanges),this._bufferedChanges.length=0},5)}dispose(){super.dispose(),this.fdMemory.clear()}}e.s(["InMemoryFileSystemProvider",0,R],130572)},716767,853801,404726,e=>{"use strict";var t,i,r,o=e.i(650289),s=e.i(802136),a=e.i(107043),n=e.i(781808),l=e.i(611130),d=e.i(702320),c=e.i(771275),h=e.i(354244),u=e.i(693162),p=e.i(824357),m=e.i(652731);(t=i||(i={})).supported=function(e){return"function"==typeof e?.showDirectoryPicker},t.isFileSystemHandle=function(e){return!!e&&"string"==typeof e.kind&&"function"==typeof e.queryPermission&&"function"==typeof e.requestPermission},t.isFileSystemFileHandle=function(e){return"file"===e.kind},t.isFileSystemDirectoryHandle=function(e){return"directory"===e.kind},(r||(r={})).supported=function(e){return"function"==typeof e?.FileSystemObserver},e.s(["WebFileSystemAccess",0,i,"WebFileSystemObserver",0,r],853801);var v=e.i(290231);class g extends l.Disposable{get capabilities(){return!this._capabilities&&(this._capabilities=m.FileSystemProviderCapabilities.FileReadWrite|m.FileSystemProviderCapabilities.FileReadStream,h.isLinux&&(this._capabilities|=m.FileSystemProviderCapabilities.PathCaseSensitive)),this._capabilities}constructor(e,t,i){super(),this.indexedDB=e,this.store=t,this.logService=i,this.onDidChangeCapabilities=n.Event.None,this.extUri=h.isLinux?u.extUri:u.extUriIgnorePathCase,this._onDidChangeFileEmitter=this._register(new n.Emitter),this.onDidChangeFile=this._onDidChangeFileEmitter.event,this._files=new Map,this._directories=new Map}async stat(e){try{let t=await this.getHandle(e);if(!t)throw this.createFileSystemProviderError(e,"No such file or directory, stat",m.FileSystemProviderErrorCode.FileNotFound);if(i.isFileSystemFileHandle(t)){let e=await t.getFile();return{type:m.FileType.File,mtime:e.lastModified,ctime:0,size:e.size}}return{type:m.FileType.Directory,mtime:0,ctime:0,size:0}}catch(e){throw this.toFileSystemProviderError(e)}}async readdir(e){try{let t=await this.getDirectoryHandle(e);if(!t)throw this.createFileSystemProviderError(e,"No such file or directory, readdir",m.FileSystemProviderErrorCode.FileNotFound);let r=[];for await(let[e,o]of t)r.push([e,i.isFileSystemFileHandle(o)?m.FileType.File:m.FileType.Directory]);return r}catch(e){throw this.toFileSystemProviderError(e)}}readFileStream(e,t,i){let r=(0,p.newWriteableStream)(e=>a.VSBuffer.concat(e.map(e=>a.VSBuffer.wrap(e))).buffer,{highWaterMark:10});return(async()=>{try{let o=await this.getFileHandle(e);if(!o)throw this.createFileSystemProviderError(e,"No such file or directory, readFile",m.FileSystemProviderErrorCode.FileNotFound);let s=await o.getFile();if("number"==typeof t.length||"number"==typeof t.position){let e=new Uint8Array(await s.arrayBuffer());"number"==typeof t?.position&&(e=e.slice(t.position)),"number"==typeof t?.length&&(e=e.slice(0,t.length)),r.end(e)}else{let e=s.stream().getReader(),t=await e.read();for(;!t.done&&!i.isCancellationRequested&&(await r.write(t.value),!i.isCancellationRequested);){;t=await e.read()}r.end(void 0)}}catch(e){r.error(this.toFileSystemProviderError(e)),r.end()}})(),r}async readFile(e){try{let t=await this.getFileHandle(e);if(!t)throw this.createFileSystemProviderError(e,"No such file or directory, readFile",m.FileSystemProviderErrorCode.FileNotFound);let i=await t.getFile();return new Uint8Array(await i.arrayBuffer())}catch(e){throw this.toFileSystemProviderError(e)}}async writeFile(e,t,i){try{let r=await this.getFileHandle(e);if(!i.create||!i.overwrite){if(r){if(!i.overwrite)throw this.createFileSystemProviderError(e,"File already exists, writeFile",m.FileSystemProviderErrorCode.FileExists)}else if(!i.create)throw this.createFileSystemProviderError(e,"No such file, writeFile",m.FileSystemProviderErrorCode.FileNotFound)}if(!r){let t=await this.getDirectoryHandle(this.extUri.dirname(e));if(!t)throw this.createFileSystemProviderError(e,"No such parent directory, writeFile",m.FileSystemProviderErrorCode.FileNotFound);if(!(r=await t.getFileHandle(this.extUri.basename(e),{create:!0})))throw this.createFileSystemProviderError(e,"Unable to create file , writeFile",m.FileSystemProviderErrorCode.Unknown)}let o=await r.createWritable();await o.write(t),await o.close()}catch(e){throw this.toFileSystemProviderError(e)}}async mkdir(e){try{let t=await this.getDirectoryHandle(this.extUri.dirname(e));if(!t)throw this.createFileSystemProviderError(e,"No such parent directory, mkdir",m.FileSystemProviderErrorCode.FileNotFound);await t.getDirectoryHandle(this.extUri.basename(e),{create:!0})}catch(e){throw this.toFileSystemProviderError(e)}}async delete(e,t){try{let i=await this.getDirectoryHandle(this.extUri.dirname(e));if(!i)throw this.createFileSystemProviderError(e,"No such parent directory, delete",m.FileSystemProviderErrorCode.FileNotFound);return i.removeEntry(this.extUri.basename(e),{recursive:t.recursive})}catch(e){throw this.toFileSystemProviderError(e)}}async rename(e,t,i){try{if(this.extUri.isEqual(e,t))return;let r=await this.getFileHandle(e);if(r){let o=await r.getFile(),s=new Uint8Array(await o.arrayBuffer());await this.writeFile(t,s,{create:!0,overwrite:i.overwrite,unlock:!1,atomic:!1}),await this.delete(e,{recursive:!1,useTrash:!1,atomic:!1})}else throw this.createFileSystemProviderError(e,(0,o.localize)(1905,"Rename is only supported for files."),m.FileSystemProviderErrorCode.Unavailable)}catch(e){throw this.toFileSystemProviderError(e)}}watch(e,t){let i=new l.DisposableStore;return this.doWatch(e,t,i).catch(t=>this.logService.error(`[File Watcher ('FileSystemObserver')] Error: ${t} (${e})`)),i}async doWatch(e,t,i){if(!r.supported(globalThis))return;let o=await this.getHandle(e);if(!o||i.isDisposed)return;let s=new globalThis.FileSystemObserver(t=>{if(i.isDisposed)return;let r=[];for(let o of t)switch(this.logService.getLevel()===v.LogLevel.Trace&&this.logService.trace(`[File Watcher ('FileSystemObserver')] [${o.type}] ${(0,u.joinPath)(e,...o.relativePathComponents)}`),o.type){case"appeared":r.push({resource:(0,u.joinPath)(e,...o.relativePathComponents),type:m.FileChangeType.ADDED});break;case"disappeared":r.push({resource:(0,u.joinPath)(e,...o.relativePathComponents),type:m.FileChangeType.DELETED});break;case"modified":r.push({resource:(0,u.joinPath)(e,...o.relativePathComponents),type:m.FileChangeType.UPDATED});break;case"errored":this.logService.trace(`[File Watcher ('FileSystemObserver')] errored, disposing observer (${e})`),i.dispose()}r.length&&this._onDidChangeFileEmitter.fire(r)});try{await s.observe(o,t.recursive?{recursive:!0}:void 0)}finally{i.isDisposed?s.disconnect():i.add((0,l.toDisposable)(()=>s.disconnect()))}}registerFileHandle(e){return this.registerHandle(e,this._files)}registerDirectoryHandle(e){return this.registerHandle(e,this._directories)}get directories(){return this._directories.values()}async registerHandle(e,t){let i=`/${e.name}`;if(t.has(i)&&!await t.get(i)?.isSameEntry(e)){let r=(0,c.extname)(e.name),o=(0,c.basename)(e.name,r),s=1;do i=`/${o}-${s++}${r}`;while(t.has(i)&&!await t.get(i)?.isSameEntry(e))}t.set(i,e);try{await this.indexedDB?.runInTransaction(this.store,"readwrite",t=>t.put(e,i))}catch(e){this.logService.error(e)}return s.URI.from({scheme:d.Schemas.file,path:i})}async getHandle(e){let t=await this.doGetHandle(e);if(!t){let i=await this.getDirectoryHandle(this.extUri.dirname(e));if(i){let r=u.extUri.basename(e);try{t=await i.getFileHandle(r)}catch(e){try{t=await i.getDirectoryHandle(r)}catch(e){}}}}return t}async getFileHandle(e){let t=await this.doGetHandle(e);if(t instanceof FileSystemFileHandle)return t;let i=await this.getDirectoryHandle(this.extUri.dirname(e));try{return await i?.getFileHandle(u.extUri.basename(e))}catch(e){return}}async getDirectoryHandle(e){let t=await this.doGetHandle(e);if(t instanceof FileSystemDirectoryHandle)return t;let i=this.extUri.dirname(e);if(this.extUri.isEqual(i,e))return;let r=await this.getDirectoryHandle(i);try{return await r?.getDirectoryHandle(u.extUri.basename(e))}catch(e){return}}async doGetHandle(e){if("/"!==this.extUri.dirname(e).path)return;let t=e.path.replace(/\/$/,""),r=this._files.get(t)??this._directories.get(t);if(r)return r;let o=await this.indexedDB?.runInTransaction(this.store,"readonly",e=>e.get(t));if(i.isFileSystemHandle(o)){let e=await o.queryPermission()==="granted";try{e||(e=await o.requestPermission()==="granted")}catch(e){this.logService.error(e)}if(e)return i.isFileSystemFileHandle(o)?this._files.set(t,o):i.isFileSystemDirectoryHandle(o)&&this._directories.set(t,o),o}throw this.createFileSystemProviderError(e,"No file system handle registered",m.FileSystemProviderErrorCode.Unavailable)}toFileSystemProviderError(e){if(e instanceof m.FileSystemProviderError)return e;let t=m.FileSystemProviderErrorCode.Unknown;return"NotAllowedError"===e.name&&(e=Error((0,o.localize)(1906,"Insufficient permissions. Please retry and allow the operation.")),t=m.FileSystemProviderErrorCode.Unavailable),(0,m.createFileSystemProviderError)(e,t)}createFileSystemProviderError(e,t,i){return(0,m.createFileSystemProviderError)(Error(`${t} (${(0,c.normalize)(e.path)})`),i)}}e.s(["HTMLFileSystemProvider",0,g],716767);var f=e.i(865562),y=e.i(619122),w=l;class S extends w.Disposable{constructor(e){if(super(),this.channelName=e,this._onDidReceiveData=this._register(new n.Emitter),this.onDidReceiveData=this._onDidReceiveData.event,"BroadcastChannel"in f.mainWindow)try{this.broadcastChannel=new BroadcastChannel(e);const t=e=>{this._onDidReceiveData.fire(e.data)};this.broadcastChannel.addEventListener("message",t),this._register((0,w.toDisposable)(()=>{this.broadcastChannel&&(this.broadcastChannel.removeEventListener("message",t),this.broadcastChannel.close())}))}catch(e){console.warn("Error while creating broadcast channel. Falling back to localStorage.",(0,y.getErrorMessage)(e))}this.broadcastChannel||(this.channelName=`BroadcastDataChannel.${e}`,this.createBroadcastChannel())}createBroadcastChannel(){let e=e=>{e.key===this.channelName&&e.newValue&&this._onDidReceiveData.fire(JSON.parse(e.newValue))};f.mainWindow.addEventListener("storage",e),this._register((0,w.toDisposable)(()=>f.mainWindow.removeEventListener("storage",e)))}postData(e){this.broadcastChannel?this.broadcastChannel.postMessage(e):(localStorage.removeItem(this.channelName),localStorage.setItem(this.channelName,JSON.stringify(e)))}}e.s(["BroadcastDataChannel",0,S],404726)},282091,195416,698107,e=>{"use strict";var t=e.i(590746),i=e.i(107043),r=e.i(781808),o=e.i(611130),s=e.i(693162),a=e.i(535567),n=e.i(802136),l=e.i(650289),d=e.i(652731),c=e.i(404726);let h=(0,d.createFileSystemProviderError)((0,l.localize)(1907,"File does not exist"),d.FileSystemProviderErrorCode.FileNotFound),u=(0,d.createFileSystemProviderError)((0,l.localize)(1908,"File is Directory"),d.FileSystemProviderErrorCode.FileIsADirectory),p=(0,d.createFileSystemProviderError)((0,l.localize)(1909,"File is not a directory"),d.FileSystemProviderErrorCode.FileNotADirectory),m=(0,d.createFileSystemProviderError)((0,l.localize)(1910,"Directory is not empty"),d.FileSystemProviderErrorCode.Unknown),v=(0,d.createFileSystemProviderError)((0,l.localize)(1911,"File exceeds available storage quota"),d.FileSystemProviderErrorCode.FileExceedsStorageQuota),g=e=>(0,d.createFileSystemProviderError)((0,l.localize)(1912,"Internal error occurred in IndexedDB File System Provider. ({0})",e),d.FileSystemProviderErrorCode.Unknown);class f{constructor(e){this.entry=e,this.type=e.type}read(e){return this.doRead(e.split("/").filter(e=>e.length))}doRead(e){if(0===e.length)return this.entry;if(this.entry.type!==d.FileType.Directory)throw g("Internal error reading from IndexedDBFSNode -- expected directory at "+this.entry.path);let t=this.entry.children.get(e[0]);if(t)return t.doRead(e.slice(1))}delete(e){let t=e.split("/").filter(e=>e.length);if(0!==t.length)return this.doDelete(t,e);if(this.entry.type!==d.FileType.Directory)throw g("Internal error deleting from IndexedDBFSNode. Expected root entry to be directory");this.entry.children.clear()}doDelete(e,t){if(0===e.length)throw g(`Internal error deleting from IndexedDBFSNode -- got no deletion path parts (encountered while deleting ${t})`);if(this.entry.type!==d.FileType.Directory)throw g("Internal error deleting from IndexedDBFSNode -- expected directory at "+this.entry.path);if(1===e.length)this.entry.children.delete(e[0]);else{let i=this.entry.children.get(e[0]);if(!i)throw g("Internal error deleting from IndexedDBFSNode -- expected entry at "+this.entry.path+"/"+i);i.doDelete(e.slice(1),t)}}add(e,t){this.doAdd(e.split("/").filter(e=>e.length),t,e)}doAdd(e,t,i){if(0===e.length)throw g(`Internal error creating IndexedDBFSNode -- adding empty path (encountered while adding ${i})`);if(this.entry.type!==d.FileType.Directory)throw g(`Internal error creating IndexedDBFSNode -- parent is not a directory (encountered while adding ${i})`);if(1===e.length){let r=e[0],o=this.entry.children.get(r);if("dir"===t.type){if(o?.entry.type===d.FileType.File)throw g(`Internal error creating IndexedDBFSNode -- overwriting file with directory: ${this.entry.path}/${r} (encountered while adding ${i})`);this.entry.children.set(r,o??new f({type:d.FileType.Directory,path:this.entry.path+"/"+r,children:new Map}))}else{if(o?.entry.type===d.FileType.Directory)throw g(`Internal error creating IndexedDBFSNode -- overwriting directory with file: ${this.entry.path}/${r} (encountered while adding ${i})`);this.entry.children.set(r,new f({type:d.FileType.File,path:this.entry.path+"/"+r,size:t.size}))}}else if(e.length>1){let r=e[0],o=this.entry.children.get(r);if(o){if(o.type===d.FileType.File)throw g(`Internal error creating IndexedDBFSNode -- overwriting file entry with directory: ${this.entry.path}/${r} (encountered while adding ${i})`)}else o=new f({children:new Map,path:this.entry.path+"/"+r,type:d.FileType.Directory}),this.entry.children.set(r,o);o.doAdd(e.slice(1),t,i)}}print(e=""){console.log(e+this.entry.path),this.entry.type===d.FileType.Directory&&this.entry.children.forEach(t=>t.print(e+" "))}}class y extends o.Disposable{constructor(e,i,o,a){super(),this.scheme=e,this.indexedDB=i,this.store=o,this.capabilities=d.FileSystemProviderCapabilities.FileReadWrite|d.FileSystemProviderCapabilities.PathCaseSensitive,this.onDidChangeCapabilities=r.Event.None,this.extUri=new s.ExtUri(()=>!1),this._onDidChangeFile=this._register(new r.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.mtimes=new Map,this.fileWriteBatch=[],this.writeManyThrottler=new t.Throttler,a&&(this.changesBroadcastChannel=this._register(new c.BroadcastDataChannel(`vscode.indexedDB.${e}.changes`)),this._register(this.changesBroadcastChannel.onDidReceiveData(e=>{this._onDidChangeFile.fire(e.map(e=>({type:e.type,resource:n.URI.revive(e.resource)})))})))}watch(e,t){return o.Disposable.None}async mkdir(e){try{if((await this.stat(e)).type===d.FileType.File)throw p}catch(e){}(await this.getFiletree()).add(e.path,{type:"dir"})}async stat(e){let t=(await this.getFiletree()).read(e.path);if(t?.type===d.FileType.File)return{type:d.FileType.File,ctime:0,mtime:this.mtimes.get(e.toString())||0,size:t.size??(await this.readFile(e)).byteLength};if(t?.type===d.FileType.Directory)return{type:d.FileType.Directory,ctime:0,mtime:0,size:0};throw h}async readdir(e){let t=(await this.getFiletree()).read(e.path);if(!t)return[];if(t.type===d.FileType.Directory)return[...t.children.entries()].map(([e,t])=>[e,t.type]);throw p}async readFile(e){let t=await this.indexedDB.runInTransaction(this.store,"readonly",t=>t.get(e.path));if(void 0===t)throw h;let r=t instanceof Uint8Array?t:(0,a.isString)(t)?i.VSBuffer.fromString(t).buffer:void 0;if(void 0===r)throw g(`IndexedDB entry at "${e.path}" in unexpected format`);return(await this.getFiletree()).add(e.path,{type:"file",size:r.byteLength}),r}async writeFile(e,t,i){let r=await this.stat(e).catch(()=>void 0);if(r?.type===d.FileType.Directory)throw u;await this.bulkWrite([[e,t]])}async rename(e,t,r){let o=await this.getFiletree(),s=o.read(e.path);if(!s)throw h;let n=o.read(t.path);if(n){if(!r.overwrite)throw(0,d.createFileSystemProviderError)("file exists already",d.FileSystemProviderErrorCode.FileExists);if(n.type!==s.type)throw(0,d.createFileSystemProviderError)("Cannot rename files with different types",d.FileSystemProviderErrorCode.Unknown);await this.delete(t,{recursive:!0,useTrash:!1,atomic:!1})}let l=i=>this.extUri.joinPath(t,this.extUri.relativePath(e,e.with({path:i}))||""),c=await this.tree(e),u=[];for(let e of c)e[1]===d.FileType.File?u.push(e):e[1]===d.FileType.Directory&&o.add(l(e[0]).path,{type:"dir"});if(u.length){let e=[],t=await this.indexedDB.runInTransaction(this.store,"readonly",e=>u.map(([t])=>e.get(t)));for(let r=0;r<u.length;r++){let o=t[r]instanceof Uint8Array?t[r]:(0,a.isString)(t[r])?i.VSBuffer.fromString(t[r]).buffer:void 0;o&&e.push([l(u[r][0]),o])}await this.bulkWrite(e)}await this.delete(e,{recursive:!0,useTrash:!1,atomic:!1})}async delete(e,t){let i,r;try{i=await this.stat(e)}catch(e){if(e.code===d.FileSystemProviderErrorCode.FileNotFound)return;throw e}if(t.recursive)r=(await this.tree(e)).map(([e])=>e);else{if(i.type===d.FileType.Directory&&(await this.readdir(e)).length)throw m;r=[e.path]}await this.deleteKeys(r),(await this.getFiletree()).delete(e.path),r.forEach(e=>this.mtimes.delete(e)),this.triggerChanges(r.map(t=>({resource:e.with({path:t}),type:d.FileChangeType.DELETED})))}async tree(e){let t=await this.stat(e),i=[[e.path,t.type]];if(t.type===d.FileType.Directory)for(let[t,r]of(await this.readdir(e))){let o=this.extUri.joinPath(e,t);if(i.push([o.path,r]),r===d.FileType.Directory){let e=await this.tree(o);i.push(...e)}}return i}triggerChanges(e){e.length&&(this._onDidChangeFile.fire(e),this.changesBroadcastChannel?.postData(e))}getFiletree(){return this.cachedFiletree||(this.cachedFiletree=(async()=>{let e=new f({children:new Map,path:"",type:d.FileType.Directory});return(await this.indexedDB.runInTransaction(this.store,"readonly",e=>e.getAllKeys())).map(e=>e.toString()).forEach(t=>e.add(t,{type:"file"})),e})()),this.cachedFiletree}async bulkWrite(e){e.forEach(([e,t])=>this.fileWriteBatch.push({content:t,resource:e})),await this.writeManyThrottler.queue(()=>this.writeMany());let t=await this.getFiletree();for(let[i,r]of e)t.add(i.path,{type:"file",size:r.byteLength}),this.mtimes.set(i.toString(),Date.now());this.triggerChanges(e.map(([e])=>({resource:e,type:d.FileChangeType.UPDATED})))}async writeMany(){if(this.fileWriteBatch.length){let e=this.fileWriteBatch.splice(0,this.fileWriteBatch.length);try{await this.indexedDB.runInTransaction(this.store,"readwrite",t=>e.map(e=>t.put(e.content,e.resource.path)))}catch(e){if(e instanceof DOMException&&"QuotaExceededError"===e.name)throw v;throw e}}}async deleteKeys(e){e.length&&await this.indexedDB.runInTransaction(this.store,"readwrite",t=>e.map(e=>t.delete(e)))}async reset(){await this.indexedDB.runInTransaction(this.store,"readwrite",e=>e.clear())}}e.s(["IndexedDBFileSystemProvider",0,y],282091);var w=e.i(431110),S=e.i(619122),E=e.i(40577);class b extends Error{constructor(e){super("Missing stores"),this.db=e}}class C extends Error{constructor(e){super(`IndexedDB database '${e}' is closed.`),this.code="DBClosed"}}class F{static async create(e,t,i){let r=await F.openDatabase(e,t,i);return new F(r,e)}static async openDatabase(e,t,i){(0,E.mark)(`code/willOpenDatabase/${e}`);try{return await F.doOpenDatabase(e,t,i)}catch(r){if(r instanceof b){console.info("Attempting to recreate the IndexedDB once.",e);try{await F.deleteDatabase(r.db)}catch(e){throw console.error("Error while deleting the IndexedDB",(0,S.getErrorMessage)(e)),e}return await F.doOpenDatabase(e,t,i)}throw r}finally{(0,E.mark)(`code/didOpenDatabase/${e}`)}}static doOpenDatabase(e,t,i){return new Promise((r,o)=>{let s=indexedDB.open(e,t);s.onerror=()=>o(s.error),s.onsuccess=()=>{let e=s.result;for(let t of i)if(!e.objectStoreNames.contains(t)){console.error(`Error while opening IndexedDB. Could not find '${t}'' object store`),o(new b(e));return}r(e)},s.onupgradeneeded=()=>{let e=s.result;for(let t of i)e.objectStoreNames.contains(t)||e.createObjectStore(t)}})}static deleteDatabase(e){return new Promise((t,i)=>{e.close();let r=indexedDB.deleteDatabase(e.name);r.onerror=e=>i(r.error),r.onsuccess=()=>t()})}constructor(e,t){this.name=t,this.database=null,this.pendingTransactions=[],this.database=e}hasPendingTransactions(){return this.pendingTransactions.length>0}close(){this.pendingTransactions.length&&this.pendingTransactions.splice(0,this.pendingTransactions.length).forEach(e=>e.abort()),this.database?.close(),this.database=null}async runInTransaction(e,t,i){if(!this.database)throw new C(this.name);let r=this.database.transaction(e,t);return this.pendingTransactions.push(r),new Promise((t,o)=>{r.oncomplete=()=>{Array.isArray(s)?t(s.map(e=>e.result)):t(s.result)},r.onerror=()=>o(r.error?S.ErrorNoTelemetry.fromError(r.error):new S.ErrorNoTelemetry("unknown error")),r.onabort=()=>o(r.error?S.ErrorNoTelemetry.fromError(r.error):new S.ErrorNoTelemetry("unknown error"));let s=i(r.objectStore(e))}).finally(()=>this.pendingTransactions.splice(this.pendingTransactions.indexOf(r),1))}async getKeyValues(e,t){if(!this.database)throw new C(this.name);let i=this.database.transaction(e,"readonly");return this.pendingTransactions.push(i),new Promise(r=>{let o=new Map,s=i.objectStore(e).openCursor();if(!s)return r(o);s.onsuccess=()=>{s.result?(t(s.result.value)&&o.set(s.result.key.toString(),s.result.value),s.result.continue()):r(o)};let a=e=>{console.error(`IndexedDB getKeyValues(): ${(0,w.toErrorMessage)(e,!0)}`),r(o)};s.onerror=()=>a(s.error),i.onerror=()=>a(i.error)}).finally(()=>this.pendingTransactions.splice(this.pendingTransactions.indexOf(i),1))}}e.s(["IndexedDB",0,F],195416);var D=e.i(290231);class x extends D.AbstractMessageLogger{constructor(e=D.DEFAULT_LOG_LEVEL){super(),this.buffer=[],this._logger=void 0,this._logLevelDisposable=this._register(new o.MutableDisposable),this.setLevel(e)}set logger(e){for(let{level:t,message:i}of(this._logger=e,this.setLevel(e.getLevel()),this._logLevelDisposable.value=e.onDidChangeLogLevel(this.setLevel,this),this.buffer))(0,D.log)(e,t,i);this.buffer=[]}log(e,t){this._logger?(0,D.log)(this._logger,e,t):this.getLevel()<=e&&this.buffer.push({level:e,message:t})}dispose(){this._logger?.dispose(),super.dispose()}flush(){this._logger?.flush()}}e.s(["BufferLogger",0,x],698107)},141103,e=>{"use strict";var t,i=e.i(281482),r=e.i(915775),o=e.i(58762),s=e.i(326659),a=e.i(781808),n=e.i(732157),l=e.i(554250),d=e.i(327634),c=e.i(7542),h=e.i(337161),u=e.i(170774),p=e.i(535567),m=e.i(370973),v=e.i(316321),g=e.i(362361),f=e.i(693205),y=e.i(647576),w=e.i(107043),S=e.i(58467),E=e.i(627886);let b=class extends r.BaseTextEditorModel{static{t=this}static{this.FIRST_LINE_NAME_MAX_LENGTH=40}static{this.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH=10*this.FIRST_LINE_NAME_MAX_LENGTH}static{this.ACTIVE_EDITOR_LANGUAGE_ID="${activeEditorLanguage}"}get name(){return"content"===this.configuredLabelFormat&&!this.hasAssociatedFilePath&&this.cachedModelFirstLineWords?this.cachedModelFirstLineWords:this.labelService.getUriBasenameLabel(this.resource)}constructor(e,t,i,r,o,s,n,l,d,c,u,p,m,v,g){super(n,s,v,g),this.resource=e,this.hasAssociatedFilePath=t,this.initialValue=i,this.preferredLanguageId=r,this.preferredEncoding=o,this.workingCopyBackupService=l,this.textResourceConfigurationService=d,this.workingCopyService=c,this.textFileService=u,this.labelService=p,this.editorService=m,this._onDidChangeContent=this._register(new a.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeName=this._register(new a.Emitter),this.onDidChangeName=this._onDidChangeName.event,this._onDidChangeDirty=this._register(new a.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeEncoding=this._register(new a.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onDidSave=this._register(new a.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new a.Emitter),this.onDidRevert=this._onDidRevert.event,this.typeId=h.NO_TYPE_ID,this.capabilities=h.WorkingCopyCapabilities.Untitled,this.configuredLabelFormat="content",this.cachedModelFirstLineWords=void 0,this.ignoreDirtyOnModelContentChange=!1,this.dirty=this.hasAssociatedFilePath||!!this.initialValue,this._register(this.workingCopyService.registerWorkingCopy(this)),r&&this.setLanguageId(r),this.onConfigurationChange(void 0,!1),this.registerListeners()}registerListeners(){this._register(this.textResourceConfigurationService.onDidChangeConfiguration(e=>this.onConfigurationChange(e,!0)))}onConfigurationChange(e,t){if(!e||e.affectsConfiguration(this.resource,"files.encoding")){let e=this.textResourceConfigurationService.getValue(this.resource,"files.encoding");this.configuredEncoding!==e&&"string"==typeof e&&(this.configuredEncoding=e,t&&!this.preferredEncoding&&this._onDidChangeEncoding.fire())}if(!e||e.affectsConfiguration(this.resource,"workbench.editor.untitled.labelFormat")){let e=this.textResourceConfigurationService.getValue(this.resource,"workbench.editor.untitled.labelFormat");this.configuredLabelFormat!==e&&("content"===e||"name"===e)&&(this.configuredLabelFormat=e,t&&this._onDidChangeName.fire())}}setLanguageId(e,i){let r=e===t.ACTIVE_EDITOR_LANGUAGE_ID?this.editorService.activeTextEditorLanguageId:e;this.preferredLanguageId=r,r&&super.setLanguageId(r,i)}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}getEncoding(){return this.preferredEncoding||this.configuredEncoding}async setEncoding(e){let t=this.getEncoding();this.preferredEncoding=e,t!==this.preferredEncoding&&this._onDidChangeEncoding.fire()}isDirty(){return this.dirty}isModified(){return this.isDirty()}setDirty(e){this.dirty!==e&&(this.dirty=e,this._onDidChangeDirty.fire())}async save(e){let t=await this.textFileService.save(this.resource,e);return t&&this._onDidSave.fire({reason:e?.reason,source:e?.source}),!!t}async revert(){this.ignoreDirtyOnModelContentChange=!0;try{this.updateTextEditorModel((0,d.createTextBufferFactory)(""))}finally{this.ignoreDirtyOnModelContentChange=!1}this.setDirty(!1),this._onDidRevert.fire()}async backup(e){let t;return this.isResolved()?t=await this.textFileService.getEncodedReadable(this.resource,this.createSnapshot()??void 0,{encoding:y.UTF8}):"string"==typeof this.initialValue&&(t=(0,w.bufferToReadable)(w.VSBuffer.fromString(this.initialValue))),{content:t}}async resolve(){let e=!1,t=!1;if(this.textEditorModel)this.updateTextEditorModel(void 0,this.preferredLanguageId);else{let i,r=await this.workingCopyBackupService.resolve(this);r?(i=r.value,t=!0):i=(0,w.bufferToStream)(w.VSBuffer.fromString(this.initialValue||""));let o=await (0,d.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,i,{encoding:y.UTF8}));this.createTextEditorModel(o,this.resource,this.preferredLanguageId),e=!0}let i=(0,p.assertReturnsDefined)(this.textEditorModel);return this.installModelListeners(i),e&&((t||this.initialValue)&&this.updateNameFromFirstLine(i),this.setDirty(this.hasAssociatedFilePath||!!t||!!this.initialValue),(t||this.initialValue)&&this._onDidChangeContent.fire()),super.resolve()}isResolved(){return!!this.textEditorModelHandle}installModelListeners(e){this._register(e.onDidChangeContent(t=>this.onModelContentChanged(e,t))),this._register(e.onDidChangeLanguage(()=>this.onConfigurationChange(void 0,!0))),super.installModelListeners(e)}onModelContentChanged(e,i){this.ignoreDirtyOnModelContentChange||(this.hasAssociatedFilePath||1!==e.getLineCount()||0!==e.getLineLength(1)?this.setDirty(!0):this.setDirty(!1)),i.changes.some(e=>(1===e.range.startLineNumber||1===e.range.endLineNumber)&&e.range.startColumn<=t.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH)&&this.updateNameFromFirstLine(e),this._onDidChangeContent.fire(),this.autoDetectLanguage()}updateNameFromFirstLine(e){let i;if(this.hasAssociatedFilePath)return;let r=e.getValueInRange({startLineNumber:1,endLineNumber:1,startColumn:1,endColumn:t.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH+1}).trim().replace(/\s+/g," ").replace(/\u202E/g,"");(r=r.substr(0,(0,f.getCharContainingOffset)(r,t.FIRST_LINE_NAME_MAX_LENGTH)[0]))&&(0,v.ensureValidWordDefinition)().exec(r)&&(i=r),i!==this.cachedModelFirstLineWords&&(this.cachedModelFirstLineWords=i,this._onDidChangeName.fire())}isReadonly(){return!1}};b=t=(0,i.__decorate)([(0,i.__param)(5,o.ILanguageService),(0,i.__param)(6,s.IModelService),(0,i.__param)(7,n.IWorkingCopyBackupService),(0,i.__param)(8,l.ITextResourceConfigurationService),(0,i.__param)(9,c.IWorkingCopyService),(0,i.__param)(10,u.ITextFileService),(0,i.__param)(11,m.ILabelService),(0,i.__param)(12,g.IEditorService),(0,i.__param)(13,S.ILanguageDetectionService),(0,i.__param)(14,E.IAccessibilityService)],b),e.s(["UntitledTextEditorModel",0,b])},935868,621900,e=>{"use strict";var t,i=e.i(281482),r=e.i(650289),o=e.i(781808),s=e.i(40577),a=e.i(535567),n=e.i(445152),l=e.i(170774),d=e.i(193391),c=e.i(915775),h=e.i(732157),u=e.i(652731),p=e.i(553638),m=e.i(58762),v=e.i(326659),g=e.i(590746),f=e.i(853457),y=e.i(771275),w=e.i(7542),S=e.i(337161),E=e.i(951129),b=e.i(370973),C=e.i(704994),F=e.i(647576),D=e.i(327634),x=e.i(58467),_=e.i(292035),I=e.i(693162),R=e.i(627886),T=e.i(429200),P=e.i(981399),A=e.i(34487),O=e.i(927842),k=e.i(619122),L=e.i(495723);let M=class extends c.BaseTextEditorModel{static{t=this}static{this.TEXTFILE_SAVE_ENCODING_SOURCE=d.SaveSourceRegistry.registerSource("textFileEncoding.source",(0,r.localize)(14310,"File Encoding Changed"))}static{this.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD=500}constructor(e,t,i,r,s,a,n,l,d,c,h,u,p,m,v,f,w){super(s,r,p,m),this.resource=e,this.preferredEncoding=t,this.preferredLanguageId=i,this.fileService=a,this.textFileService=n,this.workingCopyBackupService=l,this.logService=d,this.workingCopyService=c,this.filesConfigurationService=h,this.labelService=u,this.pathService=v,this.extensionService=f,this.progressService=w,this._onDidChangeContent=this._register(new o.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidResolve=this._register(new o.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new o.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSaveError=this._register(new o.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new o.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new o.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new o.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onDidChangeOrphaned=this._register(new o.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidChangeReadonly=this._register(new o.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.typeId=S.NO_TYPE_ID,this.capabilities=S.WorkingCopyCapabilities.None,this.versionId=0,this.ignoreDirtyOnModelContentChange=!1,this.ignoreSaveFromSaveParticipants=!1,this.lastModelContentChangeFromUndoRedo=void 0,this.saveSequentializer=new g.TaskSequentializer,this.dirty=!1,this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,this.hasEncodingSetExplicitly=!1,this.name=(0,y.basename)(this.labelService.getUriLabel(this.resource)),this.resourceHasExtension=!!I.extUri.extname(this.resource),this._register(this.workingCopyService.registerWorkingCopy(this)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(e=>this.onDidFilesChange(e))),this._register(this.filesConfigurationService.onDidChangeFilesAssociation(()=>this.onDidChangeFilesAssociation())),this._register(this.filesConfigurationService.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire()))}async onDidFilesChange(e){let t,i=!1;if(this.inOrphanMode?e.contains(this.resource,u.FileChangeType.ADDED)&&(t=!1,i=!0):e.contains(this.resource,u.FileChangeType.DELETED)&&(t=!0,i=!0),i&&this.inOrphanMode!==t){let e=!1;t&&(await (0,g.timeout)(100,C.CancellationToken.None),e=!!this.isDisposed()||!await this.fileService.exists(this.resource)),this.inOrphanMode===e||this.isDisposed()||this.setOrphaned(e)}}setOrphaned(e){this.inOrphanMode!==e&&(this.inOrphanMode=e,this._onDidChangeOrphaned.fire())}onDidChangeFilesAssociation(){if(!this.isResolved())return;let e=this.getFirstLineText(this.textEditorModel),t=this.getOrCreateLanguage(this.resource,this.languageService,this.preferredLanguageId,e);this.textEditorModel.setLanguage(t)}setLanguageId(e,t){super.setLanguageId(e,t),this.preferredLanguageId=e}async backup(e){let t;return this.lastResolvedFileStat&&(t={mtime:this.lastResolvedFileStat.mtime,ctime:this.lastResolvedFileStat.ctime,size:this.lastResolvedFileStat.size,etag:this.lastResolvedFileStat.etag,orphaned:this.inOrphanMode}),{meta:t,content:await this.textFileService.getEncodedReadable(this.resource,this.createSnapshot()??void 0,{encoding:F.UTF8})}}async revert(e){if(!this.isResolved())return;let t=this.dirty,i=this.doSetDirty(!1);if(!e?.soft)try{await this.forceResolveFromFile()}catch(e){if(e.fileOperationResult!==u.FileOperationResult.FILE_NOT_FOUND)throw i(),e}this._onDidRevert.fire(),t&&this._onDidChangeDirty.fire()}async resolve(e){(this.trace("resolve() - enter"),(0,s.mark)("code/willResolveTextFileEditorModel"),this.isDisposed())?this.trace("resolve() - exit - without resolving because model is disposed"):!e?.contents&&(this.dirty||this.saveSequentializer.isRunning())?this.trace("resolve() - exit - without resolving because model is dirty or being saved"):(await this.doResolve(e),(0,s.mark)("code/didResolveTextFileEditorModel"))}async doResolve(e){return e?.contents?this.resolveFromBuffer(e.contents,e):!this.isResolved()&&await this.resolveFromBackup(e)?void 0:this.resolveFromFile(e)}async resolveFromBuffer(e,t){let i,r,o,s;this.trace("resolveFromBuffer()");try{let e=await this.fileService.stat(this.resource);i=e.mtime,r=e.ctime,o=e.size,s=e.etag,this.setOrphaned(!1)}catch(e){i=Date.now(),r=Date.now(),o=0,s=u.ETAG_DISABLED,this.setOrphaned(e.fileOperationResult===u.FileOperationResult.FILE_NOT_FOUND)}let a=await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding);this.resolveFromContent({resource:this.resource,name:this.name,mtime:i,ctime:r,size:o,etag:s,value:e,encoding:a.encoding,readonly:!1,locked:!1,executable:!1},!0,t)}async resolveFromBackup(e){let t=await this.workingCopyBackupService.resolve(this),i=F.UTF8;return(t&&(i=(await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding)).encoding),this.isResolved())?(this.trace("resolveFromBackup() - exit - without resolving because previously new model got created meanwhile"),!0):!!t&&(await this.doResolveFromBackup(t,i,e),!0)}async doResolveFromBackup(e,t,i){this.trace("doResolveFromBackup()"),this.resolveFromContent({resource:this.resource,name:this.name,mtime:e.meta?e.meta.mtime:Date.now(),ctime:e.meta?e.meta.ctime:Date.now(),size:e.meta?e.meta.size:0,etag:e.meta?e.meta.etag:u.ETAG_DISABLED,value:await (0,D.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,e.value,{encoding:F.UTF8})),encoding:t,readonly:!1,locked:!1,executable:!1},!0,i),e.meta?.orphaned&&this.setOrphaned(!0)}async resolveFromFile(e){let t;this.trace("resolveFromFile()");let i=e?.forceReadFromFile,r=this.isResolved()||e?.allowBinary;i?t=u.ETAG_DISABLED:this.lastResolvedFileStat&&(t=this.lastResolvedFileStat.etag);let o=this.versionId;try{let i=await this.textFileService.readStream(this.resource,{acceptTextOnly:!r,etag:t,encoding:this.preferredEncoding,limits:e?.limits});if(this.setOrphaned(!1),o!==this.versionId)return void this.trace("resolveFromFile() - exit - without resolving because model content changed");return this.resolveFromContent(i,!1,e)}catch(t){let e=t.fileOperationResult;if(this.setOrphaned(e===u.FileOperationResult.FILE_NOT_FOUND),this.isResolved()&&e===u.FileOperationResult.FILE_NOT_MODIFIED_SINCE){t instanceof u.NotModifiedSinceFileOperationError&&this.updateLastResolvedFileStat(t.stat);return}if(this.isResolved()&&e===u.FileOperationResult.FILE_NOT_FOUND&&!i)return;throw t}}resolveFromContent(e,t,i){if(this.trace("resolveFromContent() - enter"),this.isDisposed())return void this.trace("resolveFromContent() - exit - because model is disposed");this.updateLastResolvedFileStat({resource:this.resource,name:e.name,mtime:e.mtime,ctime:e.ctime,size:e.size,etag:e.etag,readonly:e.readonly,locked:e.locked,executable:!1,isFile:!0,isDirectory:!1,isSymbolicLink:!1,children:void 0});let r=this.contentEncoding;this.contentEncoding=e.encoding,this.preferredEncoding?this.updatePreferredEncoding(this.contentEncoding):r!==this.contentEncoding&&this._onDidChangeEncoding.fire(),this.textEditorModel?this.doUpdateTextModel(e.value,L.EditSources.reloadFromDisk()):this.doCreateTextModel(e.resource,e.value),this.setDirty(!!t),this._onDidResolve.fire(i?.reason??n.TextFileResolveReason.OTHER)}doCreateTextModel(e,t){this.trace("doCreateTextModel()");let i=this.createTextEditorModel(t,e,this.preferredLanguageId);this.installModelListeners(i),this.autoDetectLanguage()}doUpdateTextModel(e,t){this.trace("doUpdateTextModel()"),this.ignoreDirtyOnModelContentChange=!0;try{this.updateTextEditorModel(e,this.preferredLanguageId,t)}finally{this.ignoreDirtyOnModelContentChange=!1}}installModelListeners(e){this._register(e.onDidChangeContent(t=>this.onModelContentChanged(e,t.isUndoing||t.isRedoing))),this._register(e.onDidChangeLanguage(()=>this.onMaybeShouldChangeEncoding())),super.installModelListeners(e)}onModelContentChanged(e,t){if(this.trace("onModelContentChanged() - enter"),this.versionId++,this.trace(`onModelContentChanged() - new versionId ${this.versionId}`),t&&(this.lastModelContentChangeFromUndoRedo=Date.now()),!this.ignoreDirtyOnModelContentChange&&!this.isReadonly())if(e.getAlternativeVersionId()===this.bufferSavedVersionId){this.trace("onModelContentChanged() - model content changed back to last saved version");let e=this.dirty;this.setDirty(!1),e&&this._onDidRevert.fire()}else this.trace("onModelContentChanged() - model content changed and marked as dirty"),this.setDirty(!0);this._onDidChangeContent.fire(),this.autoDetectLanguage()}async autoDetectLanguage(){await this.extensionService?.whenInstalledExtensionsRegistered();let e=this.getLanguageId();if(this.resource.scheme===this.pathService.defaultUriScheme&&(!e||e===T.PLAINTEXT_LANGUAGE_ID)&&!this.resourceHasExtension)return super.autoDetectLanguage()}async forceResolveFromFile(){this.isDisposed()||await this.textFileService.files.resolve(this.resource,{reload:{async:!1},forceReadFromFile:!0})}isDirty(){return this.dirty}isModified(){return this.isDirty()}setDirty(e){if(!this.isResolved())return;let t=this.dirty;this.doSetDirty(e),e!==t&&this._onDidChangeDirty.fire()}doSetDirty(e){let t=this.dirty,i=this.inConflictMode,r=this.inErrorMode,o=this.bufferSavedVersionId;return e?this.dirty=!0:(this.dirty=!1,this.inConflictMode=!1,this.inErrorMode=!1,this.updateSavedVersionId()),()=>{this.dirty=t,this.inConflictMode=i,this.inErrorMode=r,this.bufferSavedVersionId=o}}async save(e=Object.create(null)){return!!this.isResolved()&&(this.isReadonly()?(this.trace("save() - ignoring request for readonly resource"),!1):(this.hasState(n.TextFileEditorModelState.CONFLICT)||this.hasState(n.TextFileEditorModelState.ERROR))&&(e.reason===d.SaveReason.AUTO||e.reason===d.SaveReason.FOCUS_CHANGE||e.reason===d.SaveReason.WINDOW_CHANGE)?(this.trace("save() - ignoring auto save request for model that is in conflict or error"),!1):(this.trace("save() - enter"),await this.doSave(e),this.trace("save() - exit"),this.hasState(n.TextFileEditorModelState.SAVED)))}async doSave(e){"number"!=typeof e.reason&&(e.reason=d.SaveReason.EXPLICIT);let t=this.versionId;if(this.trace(`doSave(${t}) - enter with versionId ${t}`),this.ignoreSaveFromSaveParticipants)return void this.trace(`doSave(${t}) - exit - refusing to save() recursively from save participant`);if(this.saveSequentializer.isRunning(t))return this.trace(`doSave(${t}) - exit - found a running save for versionId ${t}`),this.saveSequentializer.running;if(!e.force&&!this.dirty)return void this.trace(`doSave(${t}) - exit - because not dirty and/or versionId is different (this.isDirty: ${this.dirty}, this.versionId: ${this.versionId})`);if(this.saveSequentializer.isRunning())return this.trace(`doSave(${t}) - exit - because busy saving`),this.saveSequentializer.cancelRunning(),this.saveSequentializer.queue(()=>this.doSave(e));this.isResolved()&&this.textEditorModel.pushStackElement();let i=new C.CancellationTokenSource;return this.progressService.withProgress({title:(0,r.localize)(14311,"Saving '{0}'",this.name),location:A.ProgressLocation.Window,cancellable:!0,delay:this.isDirty()?3e3:5e3},r=>this.doSaveSequential(t,e,r,i),()=>{i.cancel()}).finally(()=>{i.dispose()})}doSaveSequential(e,i,o,s){return this.saveSequentializer.run(e,(async()=>{if(this.isResolved()&&!i.skipSaveParticipants)try{if(i.reason===d.SaveReason.AUTO&&"number"==typeof this.lastModelContentChangeFromUndoRedo){let e=Date.now()-this.lastModelContentChangeFromUndoRedo;e<t.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD&&await (0,g.timeout)(t.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD-e)}if(!s.token.isCancellationRequested){this.ignoreSaveFromSaveParticipants=!0;try{await this.textFileService.files.runSaveParticipants(this,{reason:i.reason??d.SaveReason.EXPLICIT,savedFrom:i.from},o,s.token)}catch(e){(0,k.isCancellationError)(e)&&!s.token.isCancellationRequested&&s.cancel()}finally{this.ignoreSaveFromSaveParticipants=!1}}}catch(t){this.logService.error(`[text file model] runSaveParticipants(${e}) - resulted in an error: ${t.toString()}`,this.resource.toString())}if(s.token.isCancellationRequested)return;if(s.dispose(),this.isDisposed()||!this.isResolved())return;e=this.versionId,this.inErrorMode=!1,o.report({message:(0,r.localize)(14312,"Writing into file...")}),this.trace(`doSave(${e}) - before write()`);let n=(0,a.assertReturnsDefined)(this.lastResolvedFileStat),l=this;return this.saveSequentializer.run(e,(async()=>{try{let t=await this.textFileService.write(n.resource,l.createSnapshot(),{mtime:n.mtime,encoding:this.getEncoding(),etag:i.ignoreModifiedSince||!this.filesConfigurationService.preventSaveConflicts(n.resource,l.getLanguageId())?u.ETAG_DISABLED:n.etag,unlock:i.writeUnlock,writeElevated:i.writeElevated});this.handleSaveSuccess(t,e,i)}catch(t){this.handleSaveError(t,e,i)}})())})(),()=>s.cancel())}handleSaveSuccess(e,t,i){this.updateLastResolvedFileStat(e),t===this.versionId?(this.trace(`handleSaveSuccess(${t}) - setting dirty to false because versionId did not change`),this.setDirty(!1)):this.trace(`handleSaveSuccess(${t}) - not setting dirty to false because versionId did change meanwhile`),this.setOrphaned(!1),this._onDidSave.fire({reason:i.reason,stat:e,source:i.source})}handleSaveError(e,t,i){if((i.ignoreErrorHandler?this.logService.trace:this.logService.error).apply(this.logService,[`[text file model] handleSaveError(${t}) - exit - resulted in a save error: ${e.toString()}`,this.resource.toString()]),i.ignoreErrorHandler)throw e;this.setDirty(!0),this.inErrorMode=!0,e.fileOperationResult===u.FileOperationResult.FILE_MODIFIED_SINCE&&(this.inConflictMode=!0),this.textFileService.files.saveErrorHandler.onSaveError(e,this,i),this._onDidSaveError.fire()}updateSavedVersionId(){this.isResolved()&&(this.bufferSavedVersionId=this.textEditorModel.getAlternativeVersionId())}updateLastResolvedFileStat(e){let t=this.isReadonly();this.lastResolvedFileStat?this.lastResolvedFileStat.mtime<=e.mtime?this.lastResolvedFileStat=e:this.lastResolvedFileStat={...this.lastResolvedFileStat,readonly:e.readonly,locked:e.locked}:this.lastResolvedFileStat=e,this.isReadonly()!==t&&this._onDidChangeReadonly.fire()}hasState(e){switch(e){case n.TextFileEditorModelState.CONFLICT:return this.inConflictMode;case n.TextFileEditorModelState.DIRTY:return this.dirty;case n.TextFileEditorModelState.ERROR:return this.inErrorMode;case n.TextFileEditorModelState.ORPHAN:return this.inOrphanMode;case n.TextFileEditorModelState.PENDING_SAVE:return this.saveSequentializer.isRunning();case n.TextFileEditorModelState.SAVED:return!this.dirty}}async joinState(e){return this.saveSequentializer.running}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}async onMaybeShouldChangeEncoding(){if(this.hasEncodingSetExplicitly)return void this.trace("onMaybeShouldChangeEncoding() - ignoring because encoding was set explicitly");if(this.contentEncoding===F.UTF8_with_bom||this.contentEncoding===F.UTF16be||this.contentEncoding===F.UTF16le)return void this.trace("onMaybeShouldChangeEncoding() - ignoring because content encoding has a BOM");let{encoding:e}=await this.textFileService.encoding.getPreferredReadEncoding(this.resource);return"string"==typeof e&&this.isNewEncoding(e)?this.isDirty()?void this.trace("onMaybeShouldChangeEncoding() - ignoring because model is dirty"):(this.logService.info(`Adjusting encoding based on configured language override to '${e}' for ${this.resource.toString(!0)}.`),this.forceResolveFromFile()):void this.trace(`onMaybeShouldChangeEncoding() - ignoring because preferred encoding ${e} is not new`)}setEncoding(e,t){return this.hasEncodingSetExplicitly=!0,this.setEncodingInternal(e,t)}async setEncodingInternal(e,i){if(i===n.EncodingMode.Encode)this.updatePreferredEncoding(e),this.isDirty()||(this.versionId++,this.setDirty(!0)),this.inConflictMode||await this.save({source:t.TEXTFILE_SAVE_ENCODING_SOURCE});else{if(!this.isNewEncoding(e))return;if(this.isDirty())throw Error("Cannot re-open a dirty text document with different encoding. Save it first.");this.updatePreferredEncoding(e),await this.forceResolveFromFile()}}updatePreferredEncoding(e){this.isNewEncoding(e)&&(this.preferredEncoding=e,this._onDidChangeEncoding.fire())}isNewEncoding(e){return this.preferredEncoding!==e&&(!!this.preferredEncoding||this.contentEncoding!==e)}getEncoding(){return this.preferredEncoding||this.contentEncoding}trace(e){this.logService.trace(`[text file model] ${e}`,this.resource.toString())}isResolved(){return!!this.textEditorModel}isReadonly(){return this.filesConfigurationService.isReadonly(this.resource,this.lastResolvedFileStat)}dispose(){this.trace("dispose()"),this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,super.dispose()}};M=t=(0,i.__decorate)([(0,i.__param)(3,m.ILanguageService),(0,i.__param)(4,v.IModelService),(0,i.__param)(5,p.IFileService),(0,i.__param)(6,l.ITextFileService),(0,i.__param)(7,h.IWorkingCopyBackupService),(0,i.__param)(8,f.ILogService),(0,i.__param)(9,w.IWorkingCopyService),(0,i.__param)(10,E.IFilesConfigurationService),(0,i.__param)(11,b.ILabelService),(0,i.__param)(12,x.ILanguageDetectionService),(0,i.__param)(13,R.IAccessibilityService),(0,i.__param)(14,_.IPathService),(0,i.__param)(15,P.IExtensionService),(0,i.__param)(16,O.IProgressService)],M),e.s(["TextFileEditorModel",0,M],935868);var N=e.i(611130),W=e.i(195603),U=e.i(216822);let B=class extends N.Disposable{constructor(e,t){super(),this.logService=e,this.progressService=t,this.saveParticipants=new W.LinkedList}addSaveParticipant(e){let t=this.saveParticipants.push(e);return(0,N.toDisposable)(()=>t())}async participate(e,t,i,o){let s=new C.CancellationTokenSource(o);e.textEditorModel?.pushStackElement(),i.report({message:(0,r.localize)(14314,"Running Code Actions and Formatters...")});let a=!1;if(await this.progressService.withProgress({priority:U.NotificationPriority.URGENT,location:A.ProgressLocation.Notification,cancellable:(0,r.localize)(14315,"Skip"),delay:e.isDirty()?5e3:3e3},async i=>{for(let r of Array.from(this.saveParticipants).sort((e,t)=>(e.ordinal??0)-(t.ordinal??0))){if(s.token.isCancellationRequested||!e.textEditorModel)break;try{let o=r.participate(e,t,i,s.token);await (0,g.raceCancellation)(o,s.token)}catch(e){(0,k.isCancellationError)(e)?s.token.isCancellationRequested||(s.cancel(),a=!0):this.logService.error(e)}}},()=>{s.cancel()}),e.textEditorModel?.pushStackElement(),s.dispose(),a)throw new k.CancellationError}dispose(){this.saveParticipants.clear(),super.dispose()}};B=(0,i.__decorate)([(0,i.__param)(0,f.ILogService),(0,i.__param)(1,O.IProgressService)],B),e.s(["TextFileSaveParticipant",0,B],621900)},803333,e=>{"use strict";var t=e.i(281482),i=e.i(650289),r=e.i(431110),o=e.i(781808),s=e.i(802136),a=e.i(935868),n=e.i(611130),l=e.i(488259),d=e.i(802186),c=e.i(652731),h=e.i(553638),u=e.i(590746),p=e.i(619122),m=e.i(621900),v=e.i(975445),g=e.i(464172),f=e.i(693162),y=e.i(327634),w=e.i(429200),S=e.i(474320);let E=class extends n.Disposable{get models(){return[...this.mapResourceToModel.values()]}constructor(e,t,s,a,n){super(),this.instantiationService=e,this.fileService=t,this.notificationService=s,this.workingCopyFileService=a,this.uriIdentityService=n,this._onDidCreate=this._register(new o.Emitter({leakWarningThreshold:500})),this.onDidCreate=this._onDidCreate.event,this._onDidResolve=this._register(new o.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidRemove=this._register(new o.Emitter),this.onDidRemove=this._onDidRemove.event,this._onDidChangeDirty=this._register(new o.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeReadonly=this._register(new o.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeOrphaned=this._register(new o.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidSaveError=this._register(new o.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new o.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new o.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new o.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.mapResourceToModel=new d.ResourceMap,this.mapResourceToModelListeners=new d.ResourceMap,this.mapResourceToDisposeListener=new d.ResourceMap,this.mapResourceToPendingModelResolvers=new d.ResourceMap,this.modelResolveQueue=this._register(new u.ResourceQueue),this.saveErrorHandler=(()=>{let e=this.notificationService;return{onSaveError(t,o){e.error((0,i.localize)(14313,"Failed to save '{0}': {1}",o.name,(0,r.toErrorMessage)(t,!1)))}}})(),this.mapCorrelationIdToModelsToRestore=new Map,this.saveParticipants=this._register(this.instantiationService.createInstance(m.TextFileSaveParticipant)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(e=>this.onDidFilesChange(e))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(e=>this.onDidChangeFileSystemProviderCapabilities(e))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(e=>this.onDidChangeFileSystemProviderRegistrations(e))),this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(e=>this.onWillRunWorkingCopyFileOperation(e))),this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(e=>this.onDidFailWorkingCopyFileOperation(e))),this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(e=>this.onDidRunWorkingCopyFileOperation(e)))}onDidFilesChange(e){for(let t of this.models)!t.isDirty()&&e.contains(t.resource,c.FileChangeType.UPDATED,c.FileChangeType.ADDED)&&this.queueModelReload(t)}onDidChangeFileSystemProviderCapabilities(e){this.queueModelReloads(e.scheme)}onDidChangeFileSystemProviderRegistrations(e){e.added&&this.queueModelReloads(e.scheme)}queueModelReloads(e){for(let t of this.models)t.isDirty()||e===t.resource.scheme&&this.queueModelReload(t)}queueModelReload(e){1>=this.modelResolveQueue.queueSize(e.resource)&&this.modelResolveQueue.queueFor(e.resource,async()=>{try{await this.reload(e)}catch(e){(0,p.onUnexpectedError)(e)}})}onWillRunWorkingCopyFileOperation(e){if(e.operation===c.FileOperation.MOVE||e.operation===c.FileOperation.COPY){let t=[];for(let{source:i,target:r}of e.files)if(i){if(this.uriIdentityService.extUri.isEqual(i,r))continue;let e=[];for(let t of this.models)this.uriIdentityService.extUri.isEqualOrParent(t.resource,i)&&e.push(t);for(let o of e){let e,s=o.resource;e=this.uriIdentityService.extUri.isEqual(s,i)?r:(0,f.joinPath)(r,s.path.substr(i.path.length+1));let a=o.getLanguageId();t.push({source:s,target:e,language:a?{id:a,explicit:"user"===o.languageChangeSource}:void 0,encoding:o.getEncoding(),snapshot:o.isDirty()?o.createSnapshot():void 0})}}this.mapCorrelationIdToModelsToRestore.set(e.correlationId,t)}}onDidFailWorkingCopyFileOperation(e){if(e.operation===c.FileOperation.MOVE||e.operation===c.FileOperation.COPY){let t=this.mapCorrelationIdToModelsToRestore.get(e.correlationId);t&&(this.mapCorrelationIdToModelsToRestore.delete(e.correlationId),t.forEach(e=>{e.snapshot&&this.get(e.source)?.setDirty(!0)}))}}onDidRunWorkingCopyFileOperation(e){switch(e.operation){case c.FileOperation.CREATE:e.waitUntil((async()=>{for(let{target:t}of e.files){let e=this.get(t);e&&!e.isDisposed()&&await e.revert()}})());break;case c.FileOperation.MOVE:case c.FileOperation.COPY:e.waitUntil((async()=>{let t=this.mapCorrelationIdToModelsToRestore.get(e.correlationId);t&&(this.mapCorrelationIdToModelsToRestore.delete(e.correlationId),await u.Promises.settled(t.map(async e=>{let t=this.uriIdentityService.asCanonicalUri(e.target),i=await this.resolve(t,{reload:{async:!1},contents:e.snapshot?(0,y.createTextBufferFactoryFromSnapshot)(e.snapshot):void 0,encoding:e.encoding});e.language?.id&&e.language.id!==w.PLAINTEXT_LANGUAGE_ID&&(e.language.explicit?i.setLanguageId(e.language.id):i.getLanguageId()===w.PLAINTEXT_LANGUAGE_ID&&(0,f.extname)(t)!==w.PLAINTEXT_EXTENSION&&i.updateTextEditorModel(void 0,e.language.id))})))})())}}get(e){return this.mapResourceToModel.get(e)}has(e){return this.mapResourceToModel.has(e)}async reload(e){await this.joinPendingResolves(e.resource),!(e.isDirty()||e.isDisposed())&&this.has(e.resource)&&await this.doResolve(e,{reload:{async:!1}})}async resolve(e,t){let i=this.joinPendingResolves(e);return i&&await i,this.doResolve(e,t)}async doResolve(e,t){let i,r,o;s.URI.isUri(e)?(r=e,i=this.get(r)):(r=e.resource,i=e);let n=!1;if(i)t?.contents?o=i.resolve(t):t?.reload?t.reload.async?(o=Promise.resolve(),(async()=>{try{await i.resolve(t)}catch(e){i.isDisposed()||(0,p.onUnexpectedError)(e)}})()):o=i.resolve(t):o=Promise.resolve();else{n=!0;let e=i=this.instantiationService.createInstance(a.TextFileEditorModel,r,t?t.encoding:void 0,t?t.languageId:void 0);o=i.resolve(t),this.registerModel(e)}this.mapResourceToPendingModelResolvers.set(r,o),this.add(r,i),n&&(this._onDidCreate.fire(i),i.isDirty()&&this._onDidChangeDirty.fire(i));try{await o}catch(e){throw n&&i.dispose(),e}finally{this.mapResourceToPendingModelResolvers.delete(r)}return t?.languageId&&i.setLanguageId(t.languageId),n&&i.isDirty()&&this._onDidChangeDirty.fire(i),i}joinPendingResolves(e){if(this.mapResourceToPendingModelResolvers.get(e))return this.doJoinPendingResolves(e)}async doJoinPendingResolves(e){let t;for(;this.mapResourceToPendingModelResolvers.has(e);){let i=this.mapResourceToPendingModelResolvers.get(e);if(i===t)return;t=i;try{await i}catch(e){}}}registerModel(e){let t=new n.DisposableStore;t.add(e.onDidResolve(t=>this._onDidResolve.fire({model:e,reason:t}))),t.add(e.onDidChangeDirty(()=>this._onDidChangeDirty.fire(e))),t.add(e.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire(e))),t.add(e.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire(e))),t.add(e.onDidSaveError(()=>this._onDidSaveError.fire(e))),t.add(e.onDidSave(t=>this._onDidSave.fire({model:e,...t}))),t.add(e.onDidRevert(()=>this._onDidRevert.fire(e))),t.add(e.onDidChangeEncoding(()=>this._onDidChangeEncoding.fire(e))),this.mapResourceToModelListeners.set(e.resource,t)}add(e,t){if(this.mapResourceToModel.get(e)===t)return;let i=this.mapResourceToDisposeListener.get(e);i?.dispose(),this.mapResourceToModel.set(e,t),this.mapResourceToDisposeListener.set(e,t.onWillDispose(()=>this.remove(e)))}remove(e){let t=this.mapResourceToModel.delete(e),i=this.mapResourceToDisposeListener.get(e);i&&((0,n.dispose)(i),this.mapResourceToDisposeListener.delete(e));let r=this.mapResourceToModelListeners.get(e);r&&((0,n.dispose)(r),this.mapResourceToModelListeners.delete(e)),t&&this._onDidRemove.fire(e)}addSaveParticipant(e){return this.saveParticipants.addSaveParticipant(e)}runSaveParticipants(e,t,i,r){return this.saveParticipants.participate(e,t,i,r)}canDispose(e){return!(!e.isDisposed()&&(this.mapResourceToPendingModelResolvers.has(e.resource)||e.isDirty()))||this.doCanDispose(e)}async doCanDispose(e){let t=this.joinPendingResolves(e.resource);return t?(await t,this.canDispose(e)):!e.isDirty()||(await o.Event.toPromise(e.onDidChangeDirty),this.canDispose(e))}dispose(){super.dispose(),this.mapResourceToModel.clear(),this.mapResourceToPendingModelResolvers.clear(),(0,n.dispose)(this.mapResourceToDisposeListener.values()),this.mapResourceToDisposeListener.clear(),(0,n.dispose)(this.mapResourceToModelListeners.values()),this.mapResourceToModelListeners.clear()}};E=(0,t.__decorate)([(0,t.__param)(0,l.IInstantiationService),(0,t.__param)(1,h.IFileService),(0,t.__param)(2,v.INotificationService),(0,t.__param)(3,g.IWorkingCopyFileService),(0,t.__param)(4,S.IUriIdentityService)],E),e.s(["TextFileEditorModelManager",0,E])},384968,473610,e=>{"use strict";var t,i=e.i(281482),r=e.i(650289),o=e.i(445152),s=e.i(193391),a=e.i(278725),n=e.i(652731),l=e.i(553638),d=e.i(611130),c=e.i(771275),h=e.i(772383),u=e.i(219170),p=e.i(141103),m=e.i(803333),v=e.i(488259),g=e.i(702320),f=e.i(327634),y=e.i(326659),w=e.i(693162),S=e.i(324726),E=e.i(107043),b=e.i(554250),C=e.i(429200),F=e.i(951129),D=e.i(915775),x=e.i(79522),_=e.i(292035),I=e.i(464172),R=e.i(474320),T=e.i(578953),P=e.i(399362),A=e.i(647576),O=e.i(824357),k=e.i(58762),L=e.i(853457),M=e.i(704994),N=e.i(883685),W=e.i(359661),U=e.i(781808),B=e.i(155652);e.i(575129),e.i(698014),e.i(140331),e.i(471999),e.i(900329);var z=e.i(785266);e.i(181268),e.i(70177),e.i(575210),e.i(890787),e.i(67920);let V=class extends d.Disposable{static{t=this}static{this.TEXTFILE_SAVE_CREATE_SOURCE=s.SaveSourceRegistry.registerSource("textFileCreate.source",(0,r.localize)(14297,"File Created"))}static{this.TEXTFILE_SAVE_REPLACE_SOURCE=s.SaveSourceRegistry.registerSource("textFileOverwrite.source",(0,r.localize)(14298,"File Replaced"))}constructor(e,t,i,r,o,s,a,n,l,d,c,h,u,p,v,g,f,y){super(),this.fileService=e,this.lifecycleService=i,this.instantiationService=r,this.modelService=o,this.environmentService=s,this.dialogService=a,this.fileDialogService=n,this.textResourceConfigurationService=l,this.filesConfigurationService=d,this.codeEditorService=c,this.pathService=h,this.workingCopyFileService=u,this.uriIdentityService=p,this.languageService=v,this.logService=g,this.elevatedFileService=f,this.decorationsService=y,this.files=this._register(this.instantiationService.createInstance(m.TextFileEditorModelManager)),this.untitled=t,this.provideDecorations()}provideDecorations(){let e=this._register(new class extends d.Disposable{constructor(e){super(),this.files=e,this.label=(0,r.localize)(14299,"Text File Model Decorations"),this._onDidChange=this._register(new U.Emitter),this.onDidChange=this._onDidChange.event,this.registerListeners()}registerListeners(){this._register(this.files.onDidResolve(({model:e})=>{(e.isReadonly()||e.hasState(o.TextFileEditorModelState.ORPHAN))&&this._onDidChange.fire([e.resource])})),this._register(this.files.onDidRemove(e=>this._onDidChange.fire([e]))),this._register(this.files.onDidChangeReadonly(e=>this._onDidChange.fire([e.resource]))),this._register(this.files.onDidChangeOrphaned(e=>this._onDidChange.fire([e.resource])))}provideDecorations(e){let t=this.files.get(e);if(!t||t.isDisposed())return;let i=t.isReadonly(),s=t.hasState(o.TextFileEditorModelState.ORPHAN);return i&&s?{color:z.listErrorForeground,letter:B.Codicon.lockSmall,strikethrough:!0,tooltip:(0,r.localize)(14300,"Deleted, Read-only")}:i?{letter:B.Codicon.lockSmall,tooltip:(0,r.localize)(14301,"Read-only")}:s?{color:z.listErrorForeground,strikethrough:!0,tooltip:(0,r.localize)(14302,"Deleted")}:void 0}}(this.files));this._register(this.decorationsService.registerDecorationsProvider(e))}get encoding(){return this._encoding||(this._encoding=this._register(this.instantiationService.createInstance(K))),this._encoding}async read(e,t){let[i,r]=await this.doRead(e,{...t,preferUnbuffered:!0});return{...i,encoding:r.detected.encoding||A.UTF8,value:await (0,O.consumeStream)(r.stream,e=>e.join(""))}}async readStream(e,t){let[i,r]=await this.doRead(e,t);return{...i,encoding:r.detected.encoding||A.UTF8,value:await (0,f.createTextBufferFactoryFromStream)(r.stream)}}async doRead(e,t){let i,s=new M.CancellationTokenSource;if(t?.preferUnbuffered){let r=await this.fileService.readFile(e,t,s.token);i={...r,value:(0,E.bufferToStream)(r.value)}}else i=await this.fileService.readFileStream(e,t,s.token);try{let r=await this.doGetDecodedStream(e,i.value,t);return[i,r]}catch(e){if(s.dispose(!0),e.decodeStreamErrorKind===A.DecodeStreamErrorKind.STREAM_IS_BINARY)throw new o.TextFileOperationError((0,r.localize)(14303,"File seems to be binary and cannot be opened as text"),o.TextFileOperationResult.FILE_IS_BINARY,t);throw e}}async create(e,t){let i=await Promise.all(e.map(async e=>{let t=await this.getEncodedReadable(e.resource,e.value);return{resource:e.resource,contents:t,overwrite:e.options?.overwrite}}));return this.workingCopyFileService.create(i,M.CancellationToken.None,t)}async write(e,t,i){let r=await this.getEncodedReadable(e,t,i);return i?.writeElevated&&this.elevatedFileService.isSupported(e)?this.elevatedFileService.writeFileElevated(e,r,i):this.fileService.writeFile(e,r,i)}async getEncodedReadable(e,t,i){let{encoding:r,addBOM:s}=await this.encoding.getWriteEncoding(e,i);if(r===A.UTF8&&!s)return void 0===t?void 0:(0,o.toBufferOrReadable)(t);let a="string"==typeof(t=t||"")?(0,o.stringToSnapshot)(t):t;return(0,A.toEncodeReadable)(a,r,{addBOM:s})}async getDecodedStream(e,t,i){return(await this.doGetDecodedStream(e,t,i)).stream}doGetDecodedStream(e,t,i){return(0,A.toDecodeStream)(t,{acceptTextOnly:i?.acceptTextOnly??!1,guessEncoding:i?.autoGuessEncoding||this.textResourceConfigurationService.getValue(e,"files.autoGuessEncoding"),candidateGuessEncodings:i?.candidateGuessEncodings||this.textResourceConfigurationService.getValue(e,"files.candidateGuessEncodings"),overwriteEncoding:async t=>this.validateDetectedEncoding(e,t??void 0,i)})}getEncoding(e){let t=e.scheme===g.Schemas.untitled?this.untitled.get(e):this.files.get(e);return t?.getEncoding()??this.encoding.getUnvalidatedEncodingForResource(e)}async resolveDecoding(e,t){return{preferredEncoding:(await this.encoding.getPreferredReadEncoding(e,t,void 0)).encoding,guessEncoding:t?.autoGuessEncoding||this.textResourceConfigurationService.getValue(e,"files.autoGuessEncoding"),candidateGuessEncodings:t?.candidateGuessEncodings||this.textResourceConfigurationService.getValue(e,"files.candidateGuessEncodings")}}async validateDetectedEncoding(e,t,i){let{encoding:r}=await this.encoding.getPreferredReadEncoding(e,i,t);return r}resolveEncoding(e,t){return this.encoding.getWriteEncoding(e,t)}async save(e,t){if(e.scheme===g.Schemas.untitled){let i=this.untitled.get(e);if(i){let r;if(r=i.hasAssociatedFilePath?await this.suggestSavePath(e):await this.fileDialogService.pickFileToSave(await this.suggestSavePath(e),t?.availableFileSystems))return this.saveAs(e,r,t)}}else{let i=this.files.get(e);if(i)return await i.save(t)?e:void 0}}async saveAs(e,t,i){if(t||(t=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(i?.suggestedTarget??e),i?.availableFileSystems)),t){if(this.filesConfigurationService.isReadonly(t)){if(!await this.confirmMakeWriteable(t))return;this.filesConfigurationService.updateReadonly(t,!1)}return(0,w.isEqual)(e,t)?this.save(e,{...i,force:!0}):this.fileService.hasProvider(e)&&this.uriIdentityService.extUri.isEqual(e,t)&&await this.fileService.exists(e)?(await this.workingCopyFileService.move([{file:{source:e,target:t}}],M.CancellationToken.None),await this.save(e,i)||await this.save(t,i),t):this.doSaveAs(e,t,i)}}async doSaveAs(e,t,i){let r,o=!1;if(e.scheme!==g.Schemas.untitled){let t=this.files.get(e);t?.isResolved()&&(r=t)}else{let t=this.untitled.get(e);t?.isResolved()&&(r=t)}if(r)o=await this.doSaveAsTextFile(r,e,t,i);else if(this.fileService.hasProvider(e))await this.fileService.copy(e,t,!0),o=!0;else{let r=this.modelService.getModel(e);r&&(o=await this.doSaveAsTextFile(r,e,t,i))}if(o){try{await this.revert(e)}catch(e){this.logService.error(e)}return e.scheme===g.Schemas.untitled&&this.untitled.notifyDidSave(e,t),t}}async doSaveAsTextFile(e,i,r,s){let a,l,d;"function"==typeof e.getEncoding&&(a=e.getEncoding());let c=!1,h=this.files.get(r);if(h?.isResolved())c=!0;else{(c=await this.fileService.exists(r))||await this.create([{resource:r,value:""}]);try{h=await this.files.resolve(r,{encoding:a})}catch(t){if(c&&(t.textFileOperationResult===o.TextFileOperationResult.FILE_IS_BINARY||t.fileOperationResult===n.FileOperationResult.FILE_TOO_LARGE))return await this.fileService.del(r),this.doSaveAsTextFile(e,i,r,s);throw t}}if(!(!(e instanceof p.UntitledTextEditorModel&&e.hasAssociatedFilePath&&c&&this.uriIdentityService.extUri.isEqual(r,(0,w.toLocalResource)(e.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme)))||await this.confirmOverwrite(r)))return!1;if(e instanceof D.BaseTextEditorModel?e.isResolved()&&(l=e.textEditorModel??void 0):l=e,h.isResolved()&&(d=h.textEditorModel),l&&d){h.updatePreferredEncoding(a),this.modelService.updateModel(d,(0,f.createTextBufferFactoryFromSnapshot)(l.createSnapshot()));let e=l.getLanguageId(),t=d.getLanguageId();e!==C.PLAINTEXT_LANGUAGE_ID&&t===C.PLAINTEXT_LANGUAGE_ID&&d.setLanguage(e);let i=this.codeEditorService.getTransientModelProperties(l);if(i)for(let[e,t]of i)this.codeEditorService.setTransientModelProperty(d,e,t)}return s?.source||(s={...s,source:c?t.TEXTFILE_SAVE_REPLACE_SOURCE:t.TEXTFILE_SAVE_CREATE_SOURCE}),h.save({...s,from:i})}async confirmOverwrite(e){let{confirmed:t}=await this.dialogService.confirm({type:"warning",message:(0,r.localize)(14304,"'{0}' already exists. Do you want to replace it?",(0,w.basename)(e)),detail:(0,r.localize)(14305,"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",(0,w.basename)(e),(0,w.basename)((0,w.dirname)(e))),primaryButton:(0,r.localize)(14306,"&&Replace")});return t}async confirmMakeWriteable(e){let{confirmed:t}=await this.dialogService.confirm({type:"warning",message:(0,r.localize)(14307,"'{0}' is marked as read-only. Do you want to save anyway?",(0,w.basename)(e)),detail:(0,r.localize)(14308,"Paths can be configured as read-only via settings."),primaryButton:(0,r.localize)(14309,"&&Save Anyway")});return t}async suggestSavePath(e){let t;if(this.fileService.hasProvider(e))return e;let i=this.environmentService.remoteAuthority,r=await this.fileDialogService.defaultFilePath();if(e.scheme===g.Schemas.untitled){let o=this.untitled.get(e);if(o){let s;if(o.hasAssociatedFilePath)return(0,w.toLocalResource)(e,i,this.pathService.defaultUriScheme);s=await this.pathService.hasValidBasename((0,w.joinPath)(r,o.name),o.name)?o.name:(0,w.basename)(e);let a=o.getLanguageId();t=a&&a!==C.PLAINTEXT_LANGUAGE_ID?this.suggestFilename(a,s):s}}return t||(t=(0,w.basename)(e)),(0,w.joinPath)(r,t)}suggestFilename(e,t){if(!this.languageService.getLanguageName(e))return t;let i=(0,c.extname)(t),r=this.languageService.getExtensions(e);if(r.includes(i))return t;let o=r.at(0);if(o)return i?`${t.substring(0,t.indexOf(i))}${o}`:`${t}${o}`;let s=this.languageService.getFilenames(e);return s.includes(t)?t:s.at(0)??t}async revert(e,t){if(e.scheme===g.Schemas.untitled){let i=this.untitled.get(e);if(i)return i.revert(t)}else{let i=this.files.get(e);if(i&&(i.isDirty()||t?.force))return i.revert(t)}}isDirty(e){let t=e.scheme===g.Schemas.untitled?this.untitled.get(e):this.files.get(e);return!!t&&t.isDirty()}};V=t=(0,i.__decorate)([(0,i.__param)(0,l.IFileService),(0,i.__param)(1,u.IUntitledTextEditorService),(0,i.__param)(2,a.ILifecycleService),(0,i.__param)(3,v.IInstantiationService),(0,i.__param)(4,y.IModelService),(0,i.__param)(5,h.IWorkbenchEnvironmentService),(0,i.__param)(6,S.IDialogService),(0,i.__param)(7,S.IFileDialogService),(0,i.__param)(8,b.ITextResourceConfigurationService),(0,i.__param)(9,F.IFilesConfigurationService),(0,i.__param)(10,x.ICodeEditorService),(0,i.__param)(11,_.IPathService),(0,i.__param)(12,I.IWorkingCopyFileService),(0,i.__param)(13,R.IUriIdentityService),(0,i.__param)(14,k.ILanguageService),(0,i.__param)(15,L.ILogService),(0,i.__param)(16,N.IElevatedFileService),(0,i.__param)(17,W.IDecorationsService)],V);let K=class extends d.Disposable{get encodingOverrides(){return this._encodingOverrides}set encodingOverrides(e){this._encodingOverrides=e}constructor(e,t,i,r){super(),this.textResourceConfigurationService=e,this.environmentService=t,this.contextService=i,this.uriIdentityService=r,this._encodingOverrides=this.getDefaultEncodingOverrides(),this.registerListeners()}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.encodingOverrides=this.getDefaultEncodingOverrides()))}getDefaultEncodingOverrides(){let e=[];return e.push({parent:this.environmentService.userRoamingDataHome,encoding:A.UTF8}),e.push({extension:T.WORKSPACE_EXTENSION,encoding:A.UTF8}),e.push({parent:this.environmentService.untitledWorkspacesHome,encoding:A.UTF8}),this.contextService.getWorkspace().folders.forEach(t=>{e.push({parent:(0,w.joinPath)(t.uri,".vscode"),encoding:A.UTF8})}),e}async getWriteEncoding(e,t){let{encoding:i,hasBOM:r}=await this.getPreferredWriteEncoding(e,t?t.encoding:void 0);return{encoding:i,addBOM:r}}async getPreferredWriteEncoding(e,t){let i=await this.getValidatedEncodingForResource(e,t);return{encoding:i,hasBOM:i===A.UTF16be||i===A.UTF16le||i===A.UTF8_with_bom}}async getPreferredReadEncoding(e,t,i){let r;t?.encoding?r=i===A.UTF8_with_bom&&t.encoding===A.UTF8?A.UTF8_with_bom:t.encoding:"string"==typeof i?r=i:this.textResourceConfigurationService.getValue(e,"files.encoding")===A.UTF8_with_bom&&(r=A.UTF8);let o=await this.getValidatedEncodingForResource(e,r);return{encoding:o,hasBOM:o===A.UTF16be||o===A.UTF16le||o===A.UTF8_with_bom}}getUnvalidatedEncodingForResource(e,t){let i=this.getEncodingOverride(e);return i||t||this.textResourceConfigurationService.getValue(e,"files.encoding")||A.UTF8}async getValidatedEncodingForResource(e,t){let i=this.getUnvalidatedEncodingForResource(e,t);return i===A.UTF8||await (0,A.encodingExists)(i)||(i=A.UTF8),i}getEncodingOverride(e){if(e&&this.encodingOverrides?.length){for(let t of this.encodingOverrides)if(t.parent&&this.uriIdentityService.extUri.isEqualOrParent(e,t.parent)||t.extension&&(0,w.extname)(e)===`.${t.extension}`)return t.encoding}}};K=(0,i.__decorate)([(0,i.__param)(0,b.ITextResourceConfigurationService),(0,i.__param)(1,h.IWorkbenchEnvironmentService),(0,i.__param)(2,P.IWorkspaceContextService),(0,i.__param)(3,R.IUriIdentityService)],K),e.i(157255);let G=class extends V{constructor(e,t,i,r,o,s,a,n,l,d,c,h,u,p,m,v,g,f){super(e,t,i,r,o,s,a,n,l,d,c,h,u,p,m,g,v,f),this.registerListeners()}registerListeners(){this._register(this.lifecycleService.onBeforeShutdown(e=>e.veto(this.onBeforeShutdown(),"veto.textFiles")))}onBeforeShutdown(){return!!this.files.models.some(e=>e.hasState(o.TextFileEditorModelState.PENDING_SAVE))}};G=(0,i.__decorate)([(0,i.__param)(0,l.IFileService),(0,i.__param)(1,u.IUntitledTextEditorService),(0,i.__param)(2,a.ILifecycleService),(0,i.__param)(3,v.IInstantiationService),(0,i.__param)(4,y.IModelService),(0,i.__param)(5,h.IWorkbenchEnvironmentService),(0,i.__param)(6,S.IDialogService),(0,i.__param)(7,S.IFileDialogService),(0,i.__param)(8,b.ITextResourceConfigurationService),(0,i.__param)(9,F.IFilesConfigurationService),(0,i.__param)(10,x.ICodeEditorService),(0,i.__param)(11,_.IPathService),(0,i.__param)(12,I.IWorkingCopyFileService),(0,i.__param)(13,R.IUriIdentityService),(0,i.__param)(14,k.ILanguageService),(0,i.__param)(15,N.IElevatedFileService),(0,i.__param)(16,L.ILogService),(0,i.__param)(17,W.IDecorationsService)],G),e.s(["BrowserTextFileService",0,G],384968),e.s(["BrowserElevatedFileService",0,class{isSupported(e){return!1}async writeFileElevated(e,t,i){throw Error("Unsupported")}}],473610)},957994,e=>{"use strict";var t=e.i(488259),i=e.i(947278);let r=(0,t.refineServiceDecorator)(i.ILayoutService);e.s(["IWorkbenchLayoutService",0,r])},536561,e=>{"use strict";var t,i,r,o,s,a,n,l,d,c,h,u,p,m,v,g,f=e.i(354244),y=e.i(865562),w=e.i(670913),S=e.i(322193);function E(e){switch(e){case v.LEFT:return"left";case v.RIGHT:return"right";case v.BOTTOM:return"bottom";case v.TOP:return"top";default:return"bottom"}}(t=d||(d={})).TITLEBAR_PART="workbench.parts.titlebar",t.BANNER_PART="workbench.parts.banner",t.ACTIVITYBAR_PART="workbench.parts.activitybar",t.SIDEBAR_PART="workbench.parts.sidebar",t.PANEL_PART="workbench.parts.panel",t.AUXILIARYBAR_PART="workbench.parts.auxiliarybar",t.EDITOR_PART="workbench.parts.editor",t.STATUSBAR_PART="workbench.parts.statusbar",(i=c||(c={})).SHOW_TABS="zenMode.showTabs",i.HIDE_LINENUMBERS="zenMode.hideLineNumbers",i.HIDE_STATUSBAR="zenMode.hideStatusBar",i.HIDE_ACTIVITYBAR="zenMode.hideActivityBar",i.CENTER_LAYOUT="zenMode.centerLayout",i.FULLSCREEN="zenMode.fullScreen",i.RESTORE="zenMode.restore",i.SILENT_NOTIFICATIONS="zenMode.silentNotifications",(r=h||(h={})).ACTIVITY_BAR_LOCATION="workbench.activityBar.location",r.EDITOR_TABS_MODE="workbench.editor.showTabs",r.EDITOR_ACTIONS_LOCATION="workbench.editor.editorActionsLocation",r.COMMAND_CENTER="window.commandCenter",r.LAYOUT_ACTIONS="workbench.layoutControl.enabled",(o=u||(u={})).DEFAULT="default",o.TOP="top",o.BOTTOM="bottom",o.HIDDEN="hidden",(s=p||(p={})).MULTIPLE="multiple",s.SINGLE="single",s.NONE="none",(a=m||(m={})).DEFAULT="default",a.TITLEBAR="titleBar",a.HIDDEN="hidden",(n=v||(v={}))[n.LEFT=0]="LEFT",n[n.RIGHT=1]="RIGHT",n[n.BOTTOM=2]="BOTTOM",n[n.TOP=3]="TOP",(l=g||(g={}))[l.ALWAYS=0]="ALWAYS",l[l.NEVER=1]="NEVER",l[l.REMEMBER_LAST=2]="REMEMBER_LAST";let b={[E(v.LEFT)]:v.LEFT,[E(v.RIGHT)]:v.RIGHT,[E(v.BOTTOM)]:v.BOTTOM,[E(v.TOP)]:v.TOP};function C(e){switch(e){case g.ALWAYS:return"always";case g.NEVER:return"never";case g.REMEMBER_LAST:default:return"preserve"}}let F={[C(g.ALWAYS)]:g.ALWAYS,[C(g.NEVER)]:g.NEVER,[C(g.REMEMBER_LAST)]:g.REMEMBER_LAST};e.s(["ActivityBarPosition",0,u,"EditorActionsLocation",0,m,"EditorTabsMode",0,p,"LayoutSettings",0,h,"PartOpensMaximizedOptions",0,g,"Parts",0,d,"Position",0,v,"ZenModeSettings",0,c,"isHorizontal",0,function(e){return e===v.BOTTOM||e===v.TOP},"isMultiWindowPart",0,function(e){return e===d.EDITOR_PART||e===d.STATUSBAR_PART||e===d.TITLEBAR_PART},"partOpensMaximizedFromString",0,function(e){return F[e]},"positionFromString",0,function(e){return b[e]},"positionToString",0,E,"shouldShowCustomTitleBar",0,function(e,t,i){let r=(0,S.isFullscreen)(t),o=(0,w.hasNativeTitlebar)(e);if(!f.isWeb){let t=e.getValue(w.TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY);if(t===w.CustomTitleBarVisibility.NEVER&&o||t===w.CustomTitleBarVisibility.WINDOWED&&r)return!1}if(!function(e){if(e.getValue(h.COMMAND_CENTER))return!1;let t=e.getValue(h.ACTIVITY_BAR_LOCATION);if(t===u.TOP||t===u.BOTTOM)return!1;let i=e.getValue(h.EDITOR_ACTIONS_LOCATION),r=e.getValue(h.EDITOR_TABS_MODE);return!(i===m.TITLEBAR||i===m.DEFAULT&&r===p.NONE||e.getValue(h.LAYOUT_ACTIONS))}(e))return!0;if(o&&(0,w.hasNativeMenu)(e))return!1;if(f.isMacintosh&&f.isNative)return!r;if(f.isNative&&!r||(0,S.isWCOEnabled)()&&!r)return!0;switch((0,y.isAuxiliaryWindow)(t)?"hidden":(0,w.getMenuBarVisibility)(e)){case"classic":return!r||!!i;case"compact":case"hidden":return!1;case"toggle":return!!i;case"visible":return!0;default:return!f.isWeb&&(!r||!!i)}}])},130722,e=>{"use strict";var t=e.i(621826),i=e.i(697786),r=e.i(683578),o=e.i(278725),s=e.i(488259),a=e.i(590746),n=e.i(781808),l=e.i(193391),d=e.i(487106),c=e.i(611130),h=e.i(957994),u=e.i(841203),p=e.i(815378),m=e.i(400017),v=e.i(487495),g=e.i(281482),f=e.i(322193),y=e.i(865562),w=c,S=e.i(354244),E=e.i(731931),b=e.i(568101),C=e.i(9753),F=e.i(777997),D=e.i(853801),x=e.i(347589),_=e.i(821788),I=e.i(670913),R=e.i(927718),T=e.i(578953),P=e.i(399362),A=e.i(856884),O=e.i(1391),k=e.i(891110),L=e.i(362361),M=e.i(772383),N=e.i(536561),W=e.i(34422),U=e.i(7542);let B=class extends w.Disposable{constructor(e,t,i,r,o,s,a,n,l,d){super(),this.contextKeyService=e,this.contextService=t,this.configurationService=i,this.environmentService=r,this.productService=o,this.editorGroupService=s,this.editorService=a,this.layoutService=n,this.paneCompositeService=l,this.workingCopyService=d,F.IsMacContext.bindTo(this.contextKeyService),F.IsLinuxContext.bindTo(this.contextKeyService),F.IsWindowsContext.bindTo(this.contextKeyService),F.IsWebContext.bindTo(this.contextKeyService),F.IsMacNativeContext.bindTo(this.contextKeyService),F.IsIOSContext.bindTo(this.contextKeyService),F.IsMobileContext.bindTo(this.contextKeyService),A.RemoteNameContext.bindTo(this.contextKeyService).set((0,_.getRemoteName)(this.environmentService.remoteAuthority)||""),this.virtualWorkspaceContext=A.VirtualWorkspaceContext.bindTo(this.contextKeyService),this.temporaryWorkspaceContext=A.TemporaryWorkspaceContext.bindTo(this.contextKeyService),this.updateWorkspaceContextKeys(),A.HasWebFileSystemAccess.bindTo(this.contextKeyService).set(D.WebFileSystemAccess.supported(y.mainWindow));const c=!this.environmentService.isBuilt||this.environmentService.isExtensionDevelopment;F.IsDevelopmentContext.bindTo(this.contextKeyService).set(c),(0,b.setConstant)(F.IsDevelopmentContext.key,c),F.ProductQualityContext.bindTo(this.contextKeyService).set(this.productService.quality||""),A.EmbedderIdentifierContext.bindTo(this.contextKeyService).set(o.embedderIdentifier),this.inAutomationContext=A.InAutomationContext.bindTo(this.contextKeyService),this.inAutomationContext.set(!!this.environmentService.enableSmokeTestDriver),this.activeEditorGroupEmpty=A.ActiveEditorGroupEmptyContext.bindTo(this.contextKeyService),this.activeEditorGroupIndex=A.ActiveEditorGroupIndexContext.bindTo(this.contextKeyService),this.activeEditorGroupLast=A.ActiveEditorGroupLastContext.bindTo(this.contextKeyService),this.activeEditorGroupLocked=A.ActiveEditorGroupLockedContext.bindTo(this.contextKeyService),this.multipleEditorGroupsContext=A.MultipleEditorGroupsContext.bindTo(this.contextKeyService),this.editorsVisibleContext=A.EditorsVisibleContext.bindTo(this.contextKeyService),this.dirtyWorkingCopiesContext=A.DirtyWorkingCopiesContext.bindTo(this.contextKeyService),this.dirtyWorkingCopiesContext.set(this.workingCopyService.hasDirty),this.workbenchStateContext=A.WorkbenchStateContext.bindTo(this.contextKeyService),this.updateWorkbenchStateContextKey(),this.workspaceFolderCountContext=A.WorkspaceFolderCountContext.bindTo(this.contextKeyService),this.updateWorkspaceFolderCountContextKey(),this.openFolderWorkspaceSupportContext=A.OpenFolderWorkspaceSupportContext.bindTo(this.contextKeyService),this.openFolderWorkspaceSupportContext.set(S.isNative||"string"==typeof this.environmentService.remoteAuthority),this.emptyWorkspaceSupportContext=A.EmptyWorkspaceSupportContext.bindTo(this.contextKeyService),this.emptyWorkspaceSupportContext.set(S.isNative||"string"==typeof this.environmentService.remoteAuthority),this.enterMultiRootWorkspaceSupportContext=A.EnterMultiRootWorkspaceSupportContext.bindTo(this.contextKeyService),this.enterMultiRootWorkspaceSupportContext.set(S.isNative||"string"==typeof this.environmentService.remoteAuthority),this.splitEditorsVerticallyContext=A.SplitEditorsVertically.bindTo(this.contextKeyService),this.updateSplitEditorsVerticallyContext(),this.isMainWindowFullscreenContext=A.IsMainWindowFullscreenContext.bindTo(this.contextKeyService),this.isAuxiliaryWindowFocusedContext=A.IsAuxiliaryWindowFocusedContext.bindTo(this.contextKeyService),this.inZenModeContext=A.InEditorZenModeContext.bindTo(this.contextKeyService),this.isMainEditorCenteredLayoutContext=A.IsMainEditorCenteredLayoutContext.bindTo(this.contextKeyService),this.mainEditorAreaVisibleContext=A.MainEditorAreaVisibleContext.bindTo(this.contextKeyService),this.editorTabsVisibleContext=A.EditorTabsVisibleContext.bindTo(this.contextKeyService),this.sideBarVisibleContext=A.SideBarVisibleContext.bindTo(this.contextKeyService),this.titleAreaVisibleContext=A.TitleBarVisibleContext.bindTo(this.contextKeyService),this.titleBarStyleContext=A.TitleBarStyleContext.bindTo(this.contextKeyService),this.updateTitleBarContextKeys(),this.panelPositionContext=A.PanelPositionContext.bindTo(this.contextKeyService),this.panelPositionContext.set((0,N.positionToString)(this.layoutService.getPanelPosition())),this.panelVisibleContext=A.PanelVisibleContext.bindTo(this.contextKeyService),this.panelVisibleContext.set(this.layoutService.isVisible(N.Parts.PANEL_PART)),this.panelMaximizedContext=A.PanelMaximizedContext.bindTo(this.contextKeyService),this.panelMaximizedContext.set(this.layoutService.isPanelMaximized()),this.panelAlignmentContext=A.PanelAlignmentContext.bindTo(this.contextKeyService),this.panelAlignmentContext.set(this.layoutService.getPanelAlignment()),this.auxiliaryBarVisibleContext=A.AuxiliaryBarVisibleContext.bindTo(this.contextKeyService),this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(N.Parts.AUXILIARYBAR_PART)),this.auxiliaryBarMaximizedContext=A.AuxiliaryBarMaximizedContext.bindTo(this.contextKeyService),this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized()),A.IsSandboxWorkspaceContext.bindTo(this.contextKeyService),this.registerListeners()}registerListeners(){this.editorGroupService.whenReady.then(()=>{this.updateEditorAreaContextKeys(),this.updateActiveEditorGroupContextKeys(),this.updateVisiblePanesContextKeys()}),this._register(this.editorService.onDidActiveEditorChange(()=>this.updateActiveEditorGroupContextKeys())),this._register(this.editorService.onDidVisibleEditorsChange(()=>this.updateVisiblePanesContextKeys())),this._register(this.editorGroupService.onDidAddGroup(()=>this.updateEditorGroupsContextKeys())),this._register(this.editorGroupService.onDidRemoveGroup(()=>this.updateEditorGroupsContextKeys())),this._register(this.editorGroupService.onDidChangeGroupIndex(()=>this.updateActiveEditorGroupContextKeys())),this._register(this.editorGroupService.onDidChangeGroupLocked(()=>this.updateActiveEditorGroupContextKeys())),this._register(this.editorGroupService.onDidChangeEditorPartOptions(()=>this.updateEditorAreaContextKeys())),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.updateWorkbenchStateContextKey())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>{this.updateWorkspaceFolderCountContextKey(),this.updateWorkspaceContextKeys()})),this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("workbench.editor.openSideBySideDirection")&&this.updateSplitEditorsVerticallyContext()})),this._register(this.layoutService.onDidChangeZenMode(e=>this.inZenModeContext.set(e))),this._register(this.layoutService.onDidChangeActiveContainer(()=>this.isAuxiliaryWindowFocusedContext.set(this.layoutService.activeContainer!==this.layoutService.mainContainer))),this._register((0,f.onDidChangeFullscreen)(e=>{e===y.mainWindow.vscodeWindowId&&this.isMainWindowFullscreenContext.set((0,f.isFullscreen)(y.mainWindow))})),this._register(this.layoutService.onDidChangeMainEditorCenteredLayout(e=>this.isMainEditorCenteredLayoutContext.set(e))),this._register(this.layoutService.onDidChangePanelPosition(e=>this.panelPositionContext.set(e))),this._register(this.layoutService.onDidChangePanelAlignment(e=>this.panelAlignmentContext.set(e))),this._register(this.paneCompositeService.onDidPaneCompositeClose(()=>this.updateSideBarContextKeys())),this._register(this.paneCompositeService.onDidPaneCompositeOpen(()=>this.updateSideBarContextKeys())),this._register(this.layoutService.onDidChangePartVisibility(()=>{this.mainEditorAreaVisibleContext.set(this.layoutService.isVisible(N.Parts.EDITOR_PART,y.mainWindow)),this.panelVisibleContext.set(this.layoutService.isVisible(N.Parts.PANEL_PART)),this.panelMaximizedContext.set(this.layoutService.isPanelMaximized()),this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(N.Parts.AUXILIARYBAR_PART)),this.updateTitleBarContextKeys()})),this._register(this.layoutService.onDidChangeAuxiliaryBarMaximized(()=>{this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized())})),this._register(this.workingCopyService.onDidChangeDirty(e=>this.dirtyWorkingCopiesContext.set(e.isDirty()||this.workingCopyService.hasDirty)))}updateVisiblePanesContextKeys(){this.editorService.visibleEditorPanes.length>0?this.editorsVisibleContext.set(!0):this.editorsVisibleContext.reset()}updateActiveEditorGroupContextKeys(){this.editorService.activeEditor?this.activeEditorGroupEmpty.reset():this.activeEditorGroupEmpty.set(!0);let e=this.editorGroupService.activeGroup;this.activeEditorGroupIndex.set(e.index+1),this.activeEditorGroupLocked.set(e.isLocked),this.updateEditorGroupsContextKeys()}updateEditorGroupsContextKeys(){let e=this.editorGroupService.count;e>1?this.multipleEditorGroupsContext.set(!0):this.multipleEditorGroupsContext.reset();let t=this.editorGroupService.activeGroup;this.activeEditorGroupLast.set(t.index===e-1)}updateEditorAreaContextKeys(){this.editorTabsVisibleContext.set("multiple"===this.editorGroupService.partOptions.showTabs)}updateWorkbenchStateContextKey(){this.workbenchStateContext.set(this.getWorkbenchStateString())}updateWorkspaceFolderCountContextKey(){this.workspaceFolderCountContext.set(this.contextService.getWorkspace().folders.length)}updateSplitEditorsVerticallyContext(){let e=(0,O.preferredSideBySideGroupDirection)(this.configurationService);this.splitEditorsVerticallyContext.set(e===O.GroupDirection.DOWN)}getWorkbenchStateString(){switch(this.contextService.getWorkbenchState()){case T.WorkbenchState.EMPTY:return"empty";case T.WorkbenchState.FOLDER:return"folder";case T.WorkbenchState.WORKSPACE:return"workspace"}}updateSideBarContextKeys(){this.sideBarVisibleContext.set(this.layoutService.isVisible(N.Parts.SIDEBAR_PART))}updateTitleBarContextKeys(){this.titleAreaVisibleContext.set(this.layoutService.isVisible(N.Parts.TITLEBAR_PART,y.mainWindow)),this.titleBarStyleContext.set((0,I.getTitleBarStyle)(this.configurationService))}updateWorkspaceContextKeys(){this.virtualWorkspaceContext.set((0,R.getVirtualWorkspaceScheme)(this.contextService.getWorkspace())||""),this.temporaryWorkspaceContext.set((0,T.isTemporaryWorkspace)(this.contextService.getWorkspace()))}};B=(0,g.__decorate)([(0,g.__param)(0,C.IContextKeyService),(0,g.__param)(1,P.IWorkspaceContextService),(0,g.__param)(2,E.IConfigurationService),(0,g.__param)(3,M.IWorkbenchEnvironmentService),(0,g.__param)(4,x.IProductService),(0,g.__param)(5,k.IEditorGroupsService),(0,g.__param)(6,L.IEditorService),(0,g.__param)(7,h.IWorkbenchLayoutService),(0,g.__param)(8,W.IPaneCompositePartService),(0,g.__param)(9,U.IWorkingCopyService)],B);let z=new n.Emitter,V=z.event,K=new n.Emitter,G=K.event,H=new a.Barrier,q=new n.Emitter,$=[],j=[],X=[];async function Y(e){await e.invokeFunction(async e=>{await Promise.all($.map(t=>t(e)))}),await e.invokeFunction(async s=>{(0,u.setHoverDelegateFactory)((t,i)=>e.createInstance(m.WorkbenchHoverDelegate,t,{instantHover:i},{})),(0,p.setBaseLayerHoverDelegate)(s.get(v.IHoverService));let a=s.get(o.ILifecycleService);t.Registry.as(i.Extensions.Workbench).start(s),t.Registry.as(l.EditorExtensions.EditorFactory).start(s),await Promise.all(j.map(e=>e(s))),a.phase=r.LifecyclePhase.Ready}),await e.invokeFunction(async e=>{await Promise.all(X.map(t=>t(e)))}),H.open(),q.fire(),e.invokeFunction(async e=>{let t=e.get(o.ILifecycleService);G(e=>{e.get(s.IInstantiationService).createInstance(B)}),z.fire(e),K.fire(e),await Promise.race([e.get(h.IWorkbenchLayoutService).whenRestored,(0,a.timeout)(2e3)]),t.phase=r.LifecyclePhase.Restored,new a.RunOnceScheduler(()=>{(0,a._runWhenIdle)(window,()=>{t.phase=r.LifecyclePhase.Eventually},2500)},2500).schedule()})}let Q=!1;async function Z(){await H.wait()}d.StandaloneServices.withServices(()=>(Q=!0,c.Disposable.None)),e.s(["checkServicesNotInitialized",0,function(){if(Q)throw Error("Services are already initialized")},"checkServicesReady",0,function(){if(!H.isOpen())throw Error("Services are not ready yet")},"onLayout",0,V,"onRenderWorkbench",0,G,"registerServiceInitializePostParticipant",0,function(e){X.push(e)},"registerServiceInitializePreParticipant",0,function(e){$.push(e)},"serviceInitializedBarrier",0,H,"serviceInitializedEmitter",0,q,"servicesInitialized",()=>Q,"startup",0,Y,"waitServicesReady",0,Z],130722)},63876,775937,e=>{"use strict";var t=e.i(578953),i=e.i(670913),r=e.i(182504);function o(e){return{id:a(e),configPath:e}}function s(e){return{id:a(e),uri:e}}function a(e){return(0,r.hash)(e.toString()).toString(16)}e.s(["getSingleFolderWorkspaceIdentifier",0,s,"getWorkspaceIdentifier",0,o],775937);var n=e.i(802136),l=e.i(643116);let d=document.body,c={},h={},u=t.UNKNOWN_EMPTY_WINDOW_WORKSPACE,p=n.URI.file((0,l.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")).with({scheme:"vscode-log"});e.s(["getEnvironmentOverride",0,function(){return h},"getWorkbenchConstructionOptions",0,function(){return c},"getWorkbenchContainer",0,function(){return d},"getWorkspaceIdentifier",0,function(){return u},"initialize",0,function(e,r,a={}){let n;d=e,c=r,h=a,null!=r.workspaceProvider&&(n=r.workspaceProvider.workspace),u=null!=n&&(0,i.isWorkspaceToOpen)(n)?o(n.workspaceUri):null!=n&&(0,i.isFolderToOpen)(n)?s(n.folderUri):t.UNKNOWN_EMPTY_WINDOW_WORKSPACE},"logsPath",0,p],63876)},68629,e=>{"use strict";e.i(487106);var t,i=e.i(526097),r=e.i(254231);e.i(290231);var o=e.i(853457),s=e.i(130572),a=e.i(802136),n=e.i(553638),l=e.i(652731),d=e.i(611130),c=e.i(693162),h=e.i(781808);e.i(716767);var u=e.i(702320);e.i(282091),e.i(195416);var p=e.i(698107),m=e.i(170774),v=e.i(384968),g=e.i(836545),f=e.i(951129),y=e.i(473610),w=e.i(883685),S=e.i(107043),E=e.i(824357);e.i(704994);var b=e.i(130722),C=e.i(63876),F=e.i(354244),D=e.i(936915),x=e.i(650289),_=e.i(2267),I=e.i(621826),R=e.i(647576);let T=I.Registry.as(_.Extensions.Configuration),P=F.isNative?{type:"string",scope:_.ConfigurationScope.APPLICATION,enum:[l.HotExitConfiguration.OFF,l.HotExitConfiguration.ON_EXIT,l.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],default:l.HotExitConfiguration.ON_EXIT,markdownEnumDescriptions:[(0,x.localize)(8108,"Disable hot exit. A prompt will show when attempting to close a window with editors that have unsaved changes."),(0,x.localize)(8109,"Hot exit will be triggered when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (command palette, keybinding, menu). All windows without folders opened will be restored upon next launch. A list of previously opened windows with unsaved files can be accessed via `File > Open Recent > More...`"),(0,x.localize)(8110,"Hot exit will be triggered when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (command palette, keybinding, menu), and also for any window with a folder opened regardless of whether it's the last window. All windows without folders opened will be restored upon next launch. A list of previously opened windows with unsaved files can be accessed via `File > Open Recent > More...`")],markdownDescription:(0,x.localize)(8111,"[Hot Exit](https://aka.ms/vscode-hot-exit) controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.",l.HotExitConfiguration.ON_EXIT,l.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE)}:{type:"string",scope:_.ConfigurationScope.APPLICATION,enum:[l.HotExitConfiguration.OFF,l.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],default:l.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE,markdownEnumDescriptions:[(0,x.localize)(8108,"Disable hot exit. A prompt will show when attempting to close a window with editors that have unsaved changes."),(0,x.localize)(8112,"Hot exit will be triggered when the browser quits or the window or tab is closed.")],markdownDescription:(0,x.localize)(8111,"[Hot Exit](https://aka.ms/vscode-hot-exit) controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.",l.HotExitConfiguration.ON_EXIT,l.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE)};T.registerConfiguration({id:"files",order:9,title:(0,x.localize)(8113,"Files"),type:"object",properties:{[l.FILES_EXCLUDE_CONFIG]:{type:"object",markdownDescription:(0,x.localize)(8114,"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) for excluding files and folders. For example, the File Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search-specific excludes. Refer to the `#explorer.excludeGitIgnore#` setting for ignoring files based on your `.gitignore`."),default:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/.DS_Store":!0,"**/Thumbs.db":!0,...F.isWeb?{"**/*.crswap":!0}:void 0},scope:_.ConfigurationScope.RESOURCE,additionalProperties:{anyOf:[{type:"boolean",enum:[!0,!1],enumDescriptions:[(0,x.localize)(8115,"Enable the pattern."),(0,x.localize)(8116,"Disable the pattern.")],description:(0,x.localize)(8117,"The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")},{type:"object",properties:{when:{type:"string",pattern:"\\w*\\$\\(basename\\)\\w*",default:"$(basename).ext",markdownDescription:(0,x.localize)(8118,"Additional check on the siblings of a matching file. Use \\$(basename) as variable for the matching file name.")}}}]}},[l.FILES_ASSOCIATIONS_CONFIG]:{type:"object",markdownDescription:(0,x.localize)(8119,'Configure [glob patterns](https://aka.ms/vscode-glob-patterns) of file associations to languages (for example `"*.extension": "html"`). Patterns will match on the absolute path of a file if they contain a path separator and will match on the name of the file otherwise. These have precedence over the default associations of the languages installed.'),additionalProperties:{type:"string"}},"files.encoding":{type:"string",enum:Object.keys(R.SUPPORTED_ENCODINGS),default:"utf8",description:(0,x.localize)(8120,"The default character set encoding to use when reading and writing files. This setting can also be configured per language."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE,enumDescriptions:Object.keys(R.SUPPORTED_ENCODINGS).map(e=>R.SUPPORTED_ENCODINGS[e].labelLong),enumItemLabels:Object.keys(R.SUPPORTED_ENCODINGS).map(e=>R.SUPPORTED_ENCODINGS[e].labelLong)},"files.autoGuessEncoding":{type:"boolean",default:!1,markdownDescription:(0,x.localize)(8121,"When enabled, the editor will attempt to guess the character set encoding when opening files. This setting can also be configured per language. Note, this setting is not respected by text search. Only {0} is respected.","`#files.encoding#`"),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.candidateGuessEncodings":{type:"array",items:{type:"string",enum:Object.keys(R.GUESSABLE_ENCODINGS),enumDescriptions:Object.keys(R.GUESSABLE_ENCODINGS).map(e=>R.GUESSABLE_ENCODINGS[e].labelLong)},default:[],markdownDescription:(0,x.localize)(8122,"List of character set encodings that the editor should attempt to guess in the order they are listed. In case it cannot be determined, {0} is respected","`#files.encoding#`"),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.eol":{type:"string",enum:["\n","\r\n","auto"],enumDescriptions:[(0,x.localize)(8123,"LF"),(0,x.localize)(8124,"CRLF"),(0,x.localize)(8125,"Uses operating system specific end of line character.")],default:"auto",description:(0,x.localize)(8126,"The default end of line character."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.enableTrash":{type:"boolean",default:!0,description:(0,x.localize)(8127,"Moves files/folders to the OS trash (recycle bin on Windows) when deleting. Disabling this will delete files/folders permanently.")},"files.trimTrailingWhitespace":{type:"boolean",default:!1,description:(0,x.localize)(8128,"When enabled, will trim trailing whitespace when saving a file."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.trimTrailingWhitespaceInRegexAndStrings":{type:"boolean",default:!0,description:(0,x.localize)(8129,"When enabled, trailing whitespace will be removed from multiline strings and regexes will be removed on save or when executing 'editor.action.trimTrailingWhitespace'. This can cause whitespace to not be trimmed from lines when there isn't up-to-date token information."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.insertFinalNewline":{type:"boolean",default:!1,description:(0,x.localize)(8130,"When enabled, insert a final new line at the end of the file when saving it."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.trimFinalNewlines":{type:"boolean",default:!1,description:(0,x.localize)(8131,"When enabled, will trim all new lines after the final new line at the end of the file when saving it."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.autoSave":{type:"string",enum:[l.AutoSaveConfiguration.OFF,l.AutoSaveConfiguration.AFTER_DELAY,l.AutoSaveConfiguration.ON_FOCUS_CHANGE,l.AutoSaveConfiguration.ON_WINDOW_CHANGE],markdownEnumDescriptions:[(0,x.localize)(8132,"An editor with changes is never automatically saved."),(0,x.localize)(8133,"An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`."),(0,x.localize)(8134,"An editor with changes is automatically saved when the editor loses focus."),(0,x.localize)(8135,"An editor with changes is automatically saved when the window loses focus.")],default:F.isWeb?l.AutoSaveConfiguration.AFTER_DELAY:l.AutoSaveConfiguration.OFF,markdownDescription:(0,x.localize)(8136,"Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.",l.AutoSaveConfiguration.OFF,l.AutoSaveConfiguration.AFTER_DELAY,l.AutoSaveConfiguration.ON_FOCUS_CHANGE,l.AutoSaveConfiguration.ON_WINDOW_CHANGE,l.AutoSaveConfiguration.AFTER_DELAY),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.autoSaveDelay":{type:"number",default:1e3,minimum:0,markdownDescription:(0,x.localize)(8137,"Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.",l.AutoSaveConfiguration.AFTER_DELAY),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.autoSaveWorkspaceFilesOnly":{type:"boolean",default:!1,markdownDescription:(0,x.localize)(8138,"When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that are inside the opened workspace. Only applies when {0} is enabled.","`#files.autoSave#`"),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.autoSaveWhenNoErrors":{type:"boolean",default:!1,markdownDescription:(0,x.localize)(8139,"When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that have no errors reported in them at the time the auto save is triggered. Only applies when {0} is enabled.","`#files.autoSave#`"),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.watcherExclude":{type:"object",patternProperties:{".*":{type:"boolean"}},default:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/.hg/store/**":!0},markdownDescription:(0,x.localize)(8140,"Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to exclude from file watching. Paths can either be relative to the watched folder or absolute. Glob patterns are matched relative from the watched folder. When you experience the file watcher process consuming a lot of CPU, make sure to exclude large folders that are of less interest (such as build output folders)."),scope:_.ConfigurationScope.RESOURCE},"files.watcherInclude":{type:"array",items:{type:"string"},default:[],description:(0,x.localize)(8141,"Configure extra paths to watch for changes inside the workspace. By default, all workspace folders will be watched recursively, except for folders that are symbolic links. You can explicitly add absolute or relative paths to support watching folders that are symbolic links. Relative paths will be resolved to an absolute path using the currently opened workspace."),scope:_.ConfigurationScope.RESOURCE},"files.hotExit":P,"files.defaultLanguage":{type:"string",markdownDescription:(0,x.localize)(8142,"The default language identifier that is assigned to new files. If configured to `${activeEditorLanguage}`, will use the language identifier of the currently active text editor if any.")},[l.FILES_READONLY_INCLUDE_CONFIG]:{type:"object",patternProperties:{".*":{type:"boolean"}},default:{},markdownDescription:(0,x.localize)(8143,"Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to mark as read-only. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths. You can exclude matching paths via the `#files.readonlyExclude#` setting. Files from readonly file system providers will always be read-only independent of this setting."),scope:_.ConfigurationScope.RESOURCE},[l.FILES_READONLY_EXCLUDE_CONFIG]:{type:"object",patternProperties:{".*":{type:"boolean"}},default:{},markdownDescription:(0,x.localize)(8144,"Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to exclude from being marked as read-only if they match as a result of the `#files.readonlyInclude#` setting. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths. Files from readonly file system providers will always be read-only independent of this setting."),scope:_.ConfigurationScope.RESOURCE},[l.FILES_READONLY_FROM_PERMISSIONS_CONFIG]:{type:"boolean",markdownDescription:(0,x.localize)(8145,"Marks files as read-only when their file permissions indicate as such. This can be overridden via `#files.readonlyInclude#` and `#files.readonlyExclude#` settings."),default:!1},"files.restoreUndoStack":{type:"boolean",description:(0,x.localize)(8146,"Restore the undo stack when a file is reopened."),default:!0},"files.saveConflictResolution":{type:"string",enum:["askUser","overwriteFileOnDisk"],enumDescriptions:[(0,x.localize)(8147,"Will refuse to save and ask for resolving the save conflict manually."),(0,x.localize)(8148,"Will resolve the save conflict by overwriting the file on disk with the changes in the editor.")],description:(0,x.localize)(8149,"A save conflict can occur when a file is saved to disk that was changed by another program in the meantime. To prevent data loss, the user is asked to compare the changes in the editor with the version on disk. This setting should only be changed if you frequently encounter save conflict errors and may result in data loss if used without caution."),default:"askUser",scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"files.dialog.defaultPath":{type:"string",pattern:"^((\\/|\\\\\\\\|[a-zA-Z]:\\\\).*)?$",patternErrorMessage:(0,x.localize)(8150,"Default path for file dialogs must be an absolute path (e.g. C:\\\\myFolder or /myFolder)."),description:(0,x.localize)(8151,"Default path for file dialogs, overriding user's home path. Only used in the absence of a context-specific path, such as most recently opened file or folder."),scope:_.ConfigurationScope.MACHINE},"files.simpleDialog.enable":{type:"boolean",description:(0,x.localize)(8152,"Enables the simple file dialog for opening and saving files and folders. The simple file dialog replaces the system file dialog when enabled."),default:!1},"files.participants.timeout":{type:"number",default:6e4,markdownDescription:(0,x.localize)(8153,"Timeout in milliseconds after which file participants for create, rename, and delete are cancelled. Use `0` to disable participants.")}}}),T.registerConfiguration({...D.editorConfigurationBaseNode,properties:{"editor.formatOnSave":{type:"boolean",markdownDescription:(0,x.localize)(8154,"Format a file on save. A formatter must be available and the editor must not be shutting down. When {0} is set to `afterDelay`, the file will only be formatted when saved explicitly.","`#files.autoSave#`"),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE},"editor.formatOnSaveMode":{type:"string",default:"file",enum:["file","modifications","modificationsIfAvailable"],enumDescriptions:[(0,x.localize)(8155,"Format the whole file."),(0,x.localize)(8156,"Format modifications. Requires source control and a formatter that supports 'Format Selection'."),(0,x.localize)(8157,"Will attempt to format modifications only (requires source control and a formatter that supports 'Format Selection'). If source control can't be used, then the whole file will be formatted.")],markdownDescription:(0,x.localize)(8158,"Controls if format on save formats the whole file or only modifications. Only applies when `#editor.formatOnSave#` is enabled."),scope:_.ConfigurationScope.LANGUAGE_OVERRIDABLE}}});class A{constructor(){this.type=l.FileType.Directory,this._onDidChange=new h.Emitter,this.onDidChange=this._onDidChange.event,this._onDidDelete=new h.Emitter,this.onDidDelete=this._onDidDelete.event,this.ctime=Date.now(),this.mtime=Date.now(),this.type=l.FileType.Directory,this.entries=new Map}async stats(){return{ctime:this.ctime,mtime:this.mtime,size:0,type:l.FileType.Directory}}delete(){this._onDidDelete.fire()}addChild(e,t){this.entries.set(e,t),this._onDidChange.fire();let i={dispose:()=>{this.deleteChild(e)}};return t.onDidDelete(()=>{i.dispose()}),i}deleteChild(e){return!!this.entries.delete(e)&&(this.mtime=Date.now(),this._onDidChange.fire(),0===this.entries.size&&this.delete(),!0)}getChildren(e){return this.entries.get(e)}read(){return Array.from(this.entries.entries()).map(([e,t])=>[e,t.type])}}class O{constructor(e,t){this.uri=e,this.readonly=t,this.type=l.FileType.File,this._onDidChange=new h.Emitter,this.onDidChange=this._onDidChange.event,this._onDidDelete=new h.Emitter,this.onDidDelete=this._onDidDelete.event,this.ctime=Date.now(),this.mtime=Date.now(),this.onDidChange(()=>{this.mtime=Date.now()})}async stats(){return{ctime:this.ctime,mtime:this.mtime,size:await this.getSize(),type:l.FileType.File,permissions:this.readonly?l.FilePermission.Readonly:void 0}}async delete(){if(this.readonly)throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.FileWriteLocked);this._onDidDelete.fire()}}let k=new TextEncoder;class L extends d.Disposable{constructor(e){super(),this.memoryFdCounter=0,this.fdMemory=new Map,this.onDidChangeCapabilities=h.Event.None,this._onDidChangeFile=new h.Emitter,this.onDidChangeFile=this._onDidChangeFile.event,this._bufferedChanges=[],this.rootByAuthority=new Map,this.capabilities=l.FileSystemProviderCapabilities.FileReadWrite|l.FileSystemProviderCapabilities.PathCaseSensitive|l.FileSystemProviderCapabilities.FileReadStream,e&&(this.capabilities|=l.FileSystemProviderCapabilities.Readonly)}async open(e){let t=await this.readFile(e),i=this.memoryFdCounter++;return this.fdMemory.set(i,t),i}async close(e){this.fdMemory.delete(e)}async read(e,t,i,r,o){let s=this.fdMemory.get(e);if(null==s)throw(0,l.createFileSystemProviderError)("No file with that descriptor open",l.FileSystemProviderErrorCode.Unavailable);let a=S.VSBuffer.wrap(s).slice(t,t+o);return i.set(a.buffer,r),a.byteLength}write(e,t,i,r,o){let s=this.fdMemory.get(e);if(null==s)throw(0,l.createFileSystemProviderError)("No file with that descriptor open",l.FileSystemProviderErrorCode.Unavailable);let a=S.VSBuffer.wrap(i).slice(r,r+o);return s.set(a.buffer,t),Promise.resolve(a.byteLength)}_lookupRoot(e){let t=e.toLowerCase(),i=this.rootByAuthority.get(t);return null==i&&(i=new A,this.rootByAuthority.set(t,i)),i}_lookup(e,t){let i=e.path.split("/"),r=this._lookupRoot(e.authority);for(let e of i){let i;if(0!==e.length){if(r instanceof A&&(i=r.getChildren(e)),null==i)if(t)return;else throw(0,l.createFileSystemProviderError)("file not found",l.FileSystemProviderErrorCode.FileNotFound);r=i}}return r}_lookupAsDirectory(e,t){let i=this._lookup(e,t);if(i instanceof A)return i;throw(0,l.createFileSystemProviderError)("file not a directory",l.FileSystemProviderErrorCode.FileNotADirectory)}_lookupAsFile(e,t){let i=this._lookup(e,t);if(null!=i&&i.type===l.FileType.File)return i;throw(0,l.createFileSystemProviderError)("file is a directory",l.FileSystemProviderErrorCode.FileIsADirectory)}registerFile(e){let t=e.uri.path.split("/"),i=this._lookupRoot(e.uri.authority),r=e.uri.with({path:"/"});for(let e of t.slice(0,-1)){if(""===e)continue;r=c.extUri.joinPath(r,e);let t=i.getChildren(e);if(null==t&&(t=this.mkdirSync(r)),!(t instanceof A))throw Error(`file '${r.toString()}' is not a directory`);i=t}let o=t[t.length-1];if(null!=i.getChildren(o))throw Error(`file '${c.extUri.joinPath(r,o).toString()}/' already exists`);let s=new d.DisposableStore;return s.add((0,d.toDisposable)(()=>{this._fireSoon({resource:e.uri,type:l.FileChangeType.DELETED})})),s.add(e.onDidDelete(()=>{s.dispose()})),s.add(e.onDidChange(()=>{this._fireSoon({resource:e.uri,type:l.FileChangeType.UPDATED})})),s.add(i.addChild(o,e)),this._fireSoon({resource:e.uri,type:l.FileChangeType.ADDED}),s}async stat(e){let t=this._lookup(e,!1);return await t.stats()}readdirSync(e){return this._lookupAsDirectory(e,!1).read()}async readdir(e){return this.readdirSync(e)}async readFile(e){let t=this._lookupAsFile(e,!1);return await t.read()}readFileStream(e,t,i){let r=this._lookupAsFile(e,!1),o=(0,E.newWriteableStream)(e=>S.VSBuffer.concat(e.map(e=>S.VSBuffer.wrap(e))).buffer,{highWaterMark:10});return(async()=>{try{if(null==r.readStream||"number"==typeof t.length||"number"==typeof t.position){let e=await r.read();("number"==typeof t.position||"number"==typeof t.length)&&(e=e.slice(t.position??0,t.length)),o.end(e)}else{let e=(await r.readStream()).getReader(),t=await e.read();for(;!t.done&&!i.isCancellationRequested&&(await o.write(t.value),!i.isCancellationRequested);){;t=await e.read()}o.end(void 0)}}catch(e){o.error((0,l.createFileSystemProviderError)(e,l.FileSystemProviderErrorCode.Unknown)),o.end()}})(),o}watch(){return d.Disposable.None}async writeFile(e,t,i){let r=this._lookup(e,!0);if(null!=r&&!(r instanceof O))throw(0,l.createFileSystemProviderError)("file is directory",l.FileSystemProviderErrorCode.FileIsADirectory);if(null==r)throw(0,l.createFileSystemProviderError)("file not found",l.FileSystemProviderErrorCode.FileNotFound);if(!i.overwrite)throw(0,l.createFileSystemProviderError)("file exists already",l.FileSystemProviderErrorCode.FileExists);await r.write(t)}async rename(){throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.NoPermissions)}mkdirSync(e){if(null!=this._lookup(e,!0))throw(0,l.createFileSystemProviderError)("file exists already",l.FileSystemProviderErrorCode.FileExists);let t=(0,c.basename)(e),i=(0,c.dirname)(e),r=this._lookupAsDirectory(i,!1),o=new A,s=new d.DisposableStore;return s.add(o.onDidDelete(()=>{s.dispose(),this._fireSoon({resource:e,type:l.FileChangeType.DELETED})})),s.add(o.onDidChange(()=>{this._fireSoon({resource:e,type:l.FileChangeType.UPDATED})})),r.addChild(t,o),this._fireSoon({type:l.FileChangeType.ADDED,resource:e}),o}async mkdir(){throw(0,l.createFileSystemProviderError)("Can' create a directory",l.FileSystemProviderErrorCode.NoPermissions)}deleteSync(e){let t=this._lookup(e,!0);if(null==t)throw(0,l.createFileSystemProviderError)("Not found",l.FileSystemProviderErrorCode.FileNotFound);if(t.type===l.FileType.Directory)throw(0,l.createFileSystemProviderError)("Can't delete a directory",l.FileSystemProviderErrorCode.NoPermissions);t.delete()}async delete(e){this.deleteSync(e)}_fireSoon(...e){this._bufferedChanges.push(...e),null!=this._fireSoonHandle&&(clearTimeout(this._fireSoonHandle),this._fireSoonHandle=void 0),this._fireSoonHandle=window.setTimeout(()=>{this._onDidChangeFile.fire(this._bufferedChanges),this._bufferedChanges.length=0},5)}}function M(e){return"fulfilled"===e.status}class N{constructor(){this.providers=[],this.onDidChangeCapabilities=h.Event.None,this._onDidChangeFile=new h.Emitter,this.onDidChangeFile=this._onDidChangeFile.event,this._onDidChangeOverlays=new h.Emitter,this.onDidChangeOverlays=this._onDidChangeOverlays.event,this.capabilities=l.FileSystemProviderCapabilities.FileReadWrite|l.FileSystemProviderCapabilities.PathCaseSensitive|l.FileSystemProviderCapabilities.FileReadStream}register(e,t){let i={priority:e,provider:t};this.providers.push(i),this.providers.sort((e,t)=>t.priority-e.priority);let r=new d.DisposableStore;return r.add(t.onDidChangeFile(e=>{this._onDidChangeFile.fire(e)})),r.add({dispose:()=>{let e=this.providers.indexOf(i);e>=0&&(this.providers.splice(e,1),this._onDidChangeOverlays.fire())}}),this._onDidChangeOverlays.fire(),r}get delegates(){return this.providers.map(({provider:e})=>e)}async readFromDelegates(e,t){let i;if(0===this.delegates.length)throw(0,l.createFileSystemProviderError)("No delegate",l.FileSystemProviderErrorCode.Unavailable);for(let r of this.delegates){if(null!=t&&t.isCancellationRequested)throw Error("Cancelled");try{return await e(r)}catch(e){if(i??(i=e),e instanceof l.FileSystemProviderError&&[l.FileSystemProviderErrorCode.NoPermissions,l.FileSystemProviderErrorCode.FileNotFound,l.FileSystemProviderErrorCode.Unavailable].includes(e.code))continue;throw e}}throw i}async writeToDelegates(e,t){if(0===this.delegates.length)throw(0,l.createFileSystemProviderError)("No delegate",l.FileSystemProviderErrorCode.Unavailable);for(let i of this.delegates)if(!((i.capabilities&l.FileSystemProviderCapabilities.Readonly)>0)){try{await (0,r.mkdirp)(c.extUri,i,c.extUri.dirname(e))}catch{}try{return await t(i)}catch(e){if(e instanceof l.FileSystemProviderError&&[l.FileSystemProviderErrorCode.NoPermissions,l.FileSystemProviderErrorCode.FileNotFound,l.FileSystemProviderErrorCode.Unavailable].includes(e.code))continue;throw e}}throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.NoPermissions)}async stat(e){return await this.readFromDelegates(async t=>{let i=await t.stat(e),r=(t.capabilities&l.FileSystemProviderCapabilities.Readonly)>0;return{...i,permissions:i.permissions??(r?l.FilePermission.Readonly:void 0)}})}async readFile(e){return await this.readFromDelegates(t=>t.readFile(e))}readFileStream(e,t,i){let r=(0,E.newWriteableStream)(e=>S.VSBuffer.concat(e.map(e=>S.VSBuffer.wrap(e))).buffer);return this.readFromDelegates(async o=>{if((0,l.hasFileReadStreamCapability)(o)){let s=o.readFileStream(e,t,i);await new Promise((e,t)=>{let o=!1;(0,E.listenStream)(s,{onData(e){o=!0,r.write(e)},onEnd(){r.end(),e()},onError(e){o?r.error(e):t(e)}},i)})}else{let i=await this.readFile(e);return("number"==typeof t.position||"number"==typeof t.length)&&(i=i.slice(t.position??0,t.length)),r.end(i)}},i).catch(e=>{r.error(e)}),r}async readdir(e){let t=await Promise.allSettled(this.delegates.map(async t=>await t.readdir(e)));if(!t.some(M))throw t[0].reason;return Object.entries(Object.fromEntries(t.filter(M).map(e=>e.value).flat()))}watch(e,t){let i=new d.DisposableStore;for(let r of this.delegates)i.add(r.watch(e,t));return i}async writeFile(e,t,i){await this.writeToDelegates(e,async r=>{let o;try{o=await r.stat(e)}catch{}if(null!=o&&((o.permissions??0)&l.FilePermission.Readonly)>0)throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.NoPermissions);return await r.writeFile(e,t,i)})}async mkdir(e){await this.writeToDelegates(e,t=>t.mkdir(e))}async delete(e,t){await this.writeToDelegates(e,i=>i.delete(e,t))}async rename(e,t,i){await this.writeToDelegates(t,r=>r.rename(e,t,i))}}let W=new N;W.register(0,new s.InMemoryFileSystemProvider);let U=new L(!0),B=new s.InMemoryFileSystemProvider;B.mkdir(a.URI.from({scheme:u.Schemas.vscodeUserData,path:"/User/"})),(t||(t={})).extensionFile="extension-file";let z={[t.extensionFile]:U,[C.logsPath.scheme]:new s.InMemoryFileSystemProvider,[u.Schemas.vscodeUserData]:B,[u.Schemas.tmp]:new s.InMemoryFileSystemProvider,[u.Schemas.file]:W};class V extends r.FileService{constructor(e,t){for(const[i,r]of(super(e),this.options=t,Object.entries(z))){let e=this.registerProvider(i,r);r instanceof N&&r.onDidChangeOverlays(()=>{e.dispose(),e=this.registerProvider(i,r)})}}async withProvider(e){if("data"===e.scheme){let e=this.getProvider("http");if(null!=e)return e}return super.withProvider(e)}async toFileStat(e,t,i,r,o,s){let a=async()=>await super.toFileStat(e,t,i,r,o,s);return this.options.statMiddleware?.(t,a)??a()}}V.$di$dependencies=[];let K=new p.BufferLogger;async function G(e,t,i){(0,b.checkServicesNotInitialized)();let r=z[e.scheme];if(null==r||null==r.writeFile)throw Error(`${e.scheme} provider doesn't exist or doesn't support writing files`);if(!i?.overwrite)try{await r.stat(e);return}catch(e){e instanceof l.FileSystemProviderError&&e.code===l.FileSystemProviderErrorCode.FileNotFound||console.error("Unable to check if file exists",e)}await r.writeFile(e,t instanceof Uint8Array?t:k.encode(t),{atomic:!1,create:!0,overwrite:!1,unlock:!1,...i})}(0,b.registerServiceInitializePreParticipant)(async e=>{K.logger=e.get(o.ILogService)}),e.s(["CustomSchemas",0,t,"RegisteredUriFile",0,class extends O{constructor(e,t,i){super(e,!0),this.url=t,this.metadata=i}async fetch(){let e=await fetch(this.url,{headers:this.metadata?.mimeType!=null?{Accept:this.metadata.mimeType}:{}});if(200!==e.status)throw Error(e.statusText);return e}async getSize(){return this.metadata?.size??0}async read(){let e=await this.fetch();return new Uint8Array(await e.arrayBuffer())}async readStream(){return(await this.fetch()).body}write(){throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.FileWriteLocked)}async delete(){throw(0,l.createFileSystemProviderError)("Not allowed",l.FileSystemProviderErrorCode.FileWriteLocked)}},"default",0,function(e={}){return{[n.IFileService.toString()]:new i.SyncDescriptor(V,[K,e],!0),[m.ITextFileService.toString()]:new i.SyncDescriptor(v.BrowserTextFileService,[],!0),[f.IFilesConfigurationService.toString()]:new i.SyncDescriptor(g.FilesConfigurationService,[],!0),[w.IElevatedFileService.toString()]:new i.SyncDescriptor(y.BrowserElevatedFileService,[],!0)}},"initFile",0,G,"registerExtensionFile",0,function(e){return U.registerFile(e)}],68629)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,983725,e=>{e.q("/_next/static/media/onig.0dk~55st~1x8..wasm")},844141,e=>{"use strict";var t,r,o,i=e.i(590746),n=e.i(144881),l=e.i(781808),s=e.i(611130),a=e.i(650289),c=e.i(4160),d=e.i(621826);let u="\\w+[-_\\w+]*",y=`^${u}$`,f=`^(${u}|\\*)(\\.${u})*(:${u})?$`;class p{constructor(e,t,r,o,i){this.foreground=e,this.bold=t,this.underline=r,this.strikethrough=o,this.italic=i}}(t=p||(p={})).toJSONObject=function(e){return{_foreground:void 0===e.foreground?null:n.Color.Format.CSS.formatHexA(e.foreground,!0),_bold:void 0===e.bold?null:e.bold,_underline:void 0===e.underline?null:e.underline,_italic:void 0===e.italic?null:e.italic,_strikethrough:void 0===e.strikethrough?null:e.strikethrough}},t.fromJSONObject=function(e){if(e){let r,o=e=>"boolean"==typeof e?e:void 0;return new t("string"==typeof(r=e._foreground)?n.Color.fromHex(r):void 0,o(e._bold),o(e._underline),o(e._strikethrough),o(e._italic))}},t.equals=function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.foreground instanceof n.Color?e.foreground.equals(t.foreground):void 0===t.foreground)&&e.bold===t.bold&&e.underline===t.underline&&e.strikethrough===t.strikethrough&&e.italic===t.italic},t.is=function(e){return e instanceof t},t.fromData=function(e){return new t(e.foreground,e.bold,e.underline,e.strikethrough,e.italic)},t.fromSettings=function(e,r,o,i,l,s){let a;if(void 0!==e&&(a=n.Color.fromHex(e)),void 0!==r){let e;o=s=i=l=!1;let t=/italic|bold|underline|strikethrough/g;for(;e=t.exec(r);)switch(e[0]){case"bold":o=!0;break;case"italic":s=!0;break;case"underline":i=!0;break;case"strikethrough":l=!0}}return new t(a,o,i,l,s)},(r=o||(o={})).fromJSONObject=function(e,t){if(t&&"string"==typeof t._selector&&t._style){let r=p.fromJSONObject(t._style);if(r)try{return{selector:e.parseTokenSelector(t._selector),style:r}}catch(e){}}},r.toJSONObject=function(e){return{_selector:e.selector.id,_style:p.toJSONObject(e.style)}},r.equals=function(e,t){return e===t||void 0!==e&&void 0!==t&&e.selector&&t.selector&&e.selector.id===t.selector.id&&p.equals(e.style,t.style)},r.is=function(e){return e&&e.selector&&"string"==typeof e.selector.id&&p.is(e.style)};class h extends s.Disposable{constructor(){super(),this._onDidChangeSchema=this._register(new l.Emitter),this.onDidChangeSchema=this._onDidChangeSchema.event,this.currentTypeNumber=0,this.currentModifierBit=1,this.tokenStylingDefaultRules=[],this.tokenStylingSchema={type:"object",properties:{},patternProperties:{[f]:m()},additionalProperties:!1,definitions:{style:{type:"object",description:(0,a.localize)(2383,"Colors and styles for the token."),properties:{foreground:{type:"string",description:(0,a.localize)(2384,"Foreground color for the token."),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:(0,a.localize)(2385,"Token background colors are currently not supported.")},fontStyle:{type:"string",description:(0,a.localize)(2386,"Sets the all font styles of the rule: 'italic', 'bold', 'underline' or 'strikethrough' or a combination. All styles that are not listed are unset. The empty string unsets all styles."),pattern:"^(\\s*(italic|bold|underline|strikethrough))*\\s*$",patternErrorMessage:(0,a.localize)(2387,"Font style must be 'italic', 'bold', 'underline' or 'strikethrough' or a combination. The empty string unsets all styles."),defaultSnippets:[{label:(0,a.localize)(2388,"None (clear inherited style)"),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]},bold:{type:"boolean",description:(0,a.localize)(2389,"Sets or unsets the font style to bold. Note, the presence of 'fontStyle' overrides this setting.")},italic:{type:"boolean",description:(0,a.localize)(2390,"Sets or unsets the font style to italic. Note, the presence of 'fontStyle' overrides this setting.")},underline:{type:"boolean",description:(0,a.localize)(2391,"Sets or unsets the font style to underline. Note, the presence of 'fontStyle' overrides this setting.")},strikethrough:{type:"boolean",description:(0,a.localize)(2392,"Sets or unsets the font style to strikethrough. Note, the presence of 'fontStyle' overrides this setting.")}},defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}}},this.tokenTypeById=Object.create(null),this.tokenModifierById=Object.create(null),this.typeHierarchy=Object.create(null)}registerTokenType(e,t,r,o){if(!e.match(y))throw Error("Invalid token type id.");if(r&&!r.match(y))throw Error("Invalid token super type id.");let i=this.currentTypeNumber++;this.tokenTypeById[e]={num:i,id:e,superType:r,description:t,deprecationMessage:o};let n=m(t,o);this.tokenStylingSchema.properties[e]=n,this.typeHierarchy=Object.create(null)}registerTokenModifier(e,t,r){if(!e.match(y))throw Error("Invalid token modifier id.");let o=this.currentModifierBit;this.currentModifierBit=2*this.currentModifierBit,this.tokenModifierById[e]={num:o,id:e,description:t,deprecationMessage:r},this.tokenStylingSchema.properties[`*.${e}`]=m(t,r)}parseTokenSelector(e,t){let r=b(e,t);return r.type?{match:(e,t,o)=>{let i=0;if(void 0!==r.language){if(r.language!==o)return -1;i+=10}if("*"!==r.type){let t=this.getTypeHierarchy(e).indexOf(r.type);if(-1===t)return -1;i+=100-t}for(let e of r.modifiers)if(-1===t.indexOf(e))return -1;return i+100*r.modifiers.length},id:`${[r.type,...r.modifiers.sort()].join(".")}${void 0!==r.language?":"+r.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(e,t){this.tokenStylingDefaultRules.push({selector:e,defaults:t})}deregisterTokenStyleDefault(e){let t=e.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(e=>e.selector.id!==t)}deregisterTokenType(e){delete this.tokenTypeById[e],delete this.tokenStylingSchema.properties[e],this.typeHierarchy=Object.create(null)}deregisterTokenModifier(e){delete this.tokenModifierById[e],delete this.tokenStylingSchema.properties[`*.${e}`]}getTokenTypes(){return Object.keys(this.tokenTypeById).map(e=>this.tokenTypeById[e])}getTokenModifiers(){return Object.keys(this.tokenModifierById).map(e=>this.tokenModifierById[e])}getTokenStylingSchema(){return this.tokenStylingSchema}getTokenStylingDefaultRules(){return this.tokenStylingDefaultRules}getTypeHierarchy(e){let t=this.typeHierarchy[e];if(!t){this.typeHierarchy[e]=t=[e];let r=this.tokenTypeById[e];for(;r&&r.superType;)t.push(r.superType),r=this.tokenTypeById[r.superType]}return t}toString(){return Object.keys(this.tokenTypeById).sort((e,t)=>{let r=+(-1!==e.indexOf(".")),o=+(-1!==t.indexOf("."));return r!==o?r-o:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.tokenTypeById[e].description}`).join("\n")}}function b(e,t){let r=e.length,o=t,i=[];for(let t=r-1;t>=0;t--){let n=e.charCodeAt(t);if(58===n||46===n){let l=e.substring(t+1,r);r=t,58===n?o=l:i.push(l)}}return{type:e.substring(0,r),modifiers:i,language:o}}let g=function(){let e=new h;function t(o,i,n=[],l,s){return e.registerTokenType(o,i,l,s),n&&r(o,n),o}function r(t,r){try{let o=e.parseTokenSelector(t);e.registerTokenStyleDefault(o,{scopesToProbe:r})}catch(e){console.log(e)}}return t("comment",(0,a.localize)(2393,"Style for comments."),[["comment"]]),t("string",(0,a.localize)(2394,"Style for strings."),[["string"]]),t("keyword",(0,a.localize)(2395,"Style for keywords."),[["keyword.control"]]),t("number",(0,a.localize)(2396,"Style for numbers."),[["constant.numeric"]]),t("regexp",(0,a.localize)(2397,"Style for expressions."),[["constant.regexp"]]),t("operator",(0,a.localize)(2398,"Style for operators."),[["keyword.operator"]]),t("namespace",(0,a.localize)(2399,"Style for namespaces."),[["entity.name.namespace"]]),t("type",(0,a.localize)(2400,"Style for types."),[["entity.name.type"],["support.type"]]),t("struct",(0,a.localize)(2401,"Style for structs."),[["entity.name.type.struct"]]),t("class",(0,a.localize)(2402,"Style for classes."),[["entity.name.type.class"],["support.class"]]),t("interface",(0,a.localize)(2403,"Style for interfaces."),[["entity.name.type.interface"]]),t("enum",(0,a.localize)(2404,"Style for enums."),[["entity.name.type.enum"]]),t("typeParameter",(0,a.localize)(2405,"Style for type parameters."),[["entity.name.type.parameter"]]),t("function",(0,a.localize)(2406,"Style for functions"),[["entity.name.function"],["support.function"]]),t("member",(0,a.localize)(2407,"Style for member functions"),[],"method","Deprecated use `method` instead"),t("method",(0,a.localize)(2408,"Style for method (member functions)"),[["entity.name.function.member"],["support.function"]]),t("macro",(0,a.localize)(2409,"Style for macros."),[["entity.name.function.preprocessor"]]),t("variable",(0,a.localize)(2410,"Style for variables."),[["variable.other.readwrite"],["entity.name.variable"]]),t("parameter",(0,a.localize)(2411,"Style for parameters."),[["variable.parameter"]]),t("property",(0,a.localize)(2412,"Style for properties."),[["variable.other.property"]]),t("enumMember",(0,a.localize)(2413,"Style for enum members."),[["variable.other.enummember"]]),t("event",(0,a.localize)(2414,"Style for events."),[["variable.other.event"]]),t("decorator",(0,a.localize)(2415,"Style for decorators & annotations."),[["entity.name.decorator"],["entity.name.function"]]),t("label",(0,a.localize)(2416,"Style for labels. "),void 0),e.registerTokenModifier("declaration",(0,a.localize)(2417,"Style for all symbol declarations."),void 0),e.registerTokenModifier("documentation",(0,a.localize)(2418,"Style to use for references in documentation."),void 0),e.registerTokenModifier("static",(0,a.localize)(2419,"Style to use for symbols that are static."),void 0),e.registerTokenModifier("abstract",(0,a.localize)(2420,"Style to use for symbols that are abstract."),void 0),e.registerTokenModifier("deprecated",(0,a.localize)(2421,"Style to use for symbols that are deprecated."),void 0),e.registerTokenModifier("modification",(0,a.localize)(2422,"Style to use for write accesses."),void 0),e.registerTokenModifier("async",(0,a.localize)(2423,"Style to use for symbols that are async."),void 0),e.registerTokenModifier("readonly",(0,a.localize)(2424,"Style to use for symbols that are read-only."),void 0),r("variable.readonly",[["variable.other.constant"]]),r("property.readonly",[["variable.other.constant.property"]]),r("type.defaultLibrary",[["support.type"]]),r("class.defaultLibrary",[["support.class"]]),r("interface.defaultLibrary",[["support.class"]]),r("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),r("variable.defaultLibrary.readonly",[["support.constant"]]),r("property.defaultLibrary",[["support.variable.property"]]),r("property.defaultLibrary.readonly",[["support.constant.property"]]),r("function.defaultLibrary",[["support.function"]]),r("member.defaultLibrary",[["support.function"]]),e}();function m(e,t){return{description:e,deprecationMessage:t,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/style"}]}}d.Registry.add("base.contributions.tokenClassification",g);let k="vscode://schemas/token-styling",S=d.Registry.as(c.Extensions.JSONContribution);S.registerSchema(k,g.getTokenStylingSchema());let v=new i.RunOnceScheduler(()=>S.notifySchemaChanged(k),200);g.onDidChangeSchema(()=>{v.isScheduled()||v.schedule()}),e.s(["SemanticTokenRule",0,o,"TokenStyle",0,p,"getTokenClassificationRegistry",0,function(){return g},"parseClassifierString",0,b,"tokenStylingSchemaId",0,k,"typeAndModifierIdPattern",0,y])},895001,e=>{e.v(t=>Promise.all(["static/chunks/143.pbs8a1ivm.js","static/chunks/0amcocbojo4v2.js"].map(t=>e.l(t))).then(()=>t(494788)))},667804,e=>{e.v(t=>Promise.all(["static/chunks/0evjw7bao5_e~.js"].map(t=>e.l(t))).then(()=>t(580886)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,928565,t=>{t.q("/_next/static/media/continue-tb.0qei4mru4tzd2.png")},235929,t=>{t.q("/_next/static/media/pause-tb.0ttrm1r1uuz_c.png")},299e3,t=>{t.q("/_next/static/media/restart-tb.086872s_sc2qv.png")},553072,t=>{t.q("/_next/static/media/run-with-debugging-tb.0j1h52k~h~72z.png")},858636,t=>{t.q("/_next/static/media/stepinto-tb.0cl87yt4ub_j8.png")},904800,t=>{t.q("/_next/static/media/stepout-tb.0vjib_bn-_xax.png")},352833,t=>{t.q("/_next/static/media/stepover-tb.04beeu~7cxr4l.png")},132850,t=>{t.q("/_next/static/media/stop-tb.1498tmu97_y9j.png")},23537,t=>{t.q("/_next/static/media/service-worker.0_udu6mraxn4k.js")},331223,t=>{t.q("/_next/static/media/index.0jmafs_mwcjgg.html")},217486,t=>{t.q("/_next/static/media/fake.16yx0-xxqj4pc.html")},576061,t=>{t.v(e=>Promise.all(["static/chunks/04fk~8rnrvs44.js"].map(e=>t.l(e))).then(()=>e(836670)))},510304,t=>{t.v(e=>Promise.all(["static/chunks/0j00r2f_n-.lx.js"].map(e=>t.l(e))).then(()=>e(193971)))},833255,t=>{t.v(e=>Promise.all(["static/chunks/07xvadmf~8bow.js","static/chunks/0a1rewz7xr-xi.js"].map(e=>t.l(e))).then(()=>e(140976)))}]);
|