@pstdio/workbench 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +66 -72
  2. package/dist/composition-resolver-types-CWykPyEK.js +241 -0
  3. package/dist/composition-resolver-types-CWykPyEK.js.map +1 -0
  4. package/dist/extensions.d.ts +344 -28
  5. package/dist/extensions.js +1362 -883
  6. package/dist/extensions.js.map +1 -1
  7. package/dist/file-renderer-view-zpunbE4I.js +432 -0
  8. package/dist/file-renderer-view-zpunbE4I.js.map +1 -0
  9. package/dist/file-section-navigation-CfYqVObc.js +30 -0
  10. package/dist/file-section-navigation-CfYqVObc.js.map +1 -0
  11. package/dist/index.d.ts +268 -15
  12. package/dist/index.js +2334 -2082
  13. package/dist/index.js.map +1 -1
  14. package/dist/layout-types-DMoZz38-.js.map +1 -1
  15. package/dist/react.d.ts +141 -13
  16. package/dist/react.js +1969 -1994
  17. package/dist/react.js.map +1 -1
  18. package/dist/storage.js +132 -155
  19. package/dist/storage.js.map +1 -1
  20. package/dist/testing.d.ts +141 -13
  21. package/dist/webview-runtime.js +1 -1
  22. package/dist/webview-runtime.js.map +1 -1
  23. package/dist/workbench-built-ins-BtgeB274.js +1171 -0
  24. package/dist/workbench-built-ins-BtgeB274.js.map +1 -0
  25. package/dist/workbench-menu-paths-Bb0ICxeG.js +20 -0
  26. package/dist/workbench-menu-paths-Bb0ICxeG.js.map +1 -0
  27. package/package.json +3 -3
  28. package/dist/context-key-service-B2K9LAec.js +0 -1034
  29. package/dist/context-key-service-B2K9LAec.js.map +0 -1
  30. package/dist/file-renderer-view-DrrhYnb_.js +0 -171
  31. package/dist/file-renderer-view-DrrhYnb_.js.map +0 -1
  32. package/dist/workbench-menu-paths-B_QJzcNU.js +0 -12
  33. package/dist/workbench-menu-paths-B_QJzcNU.js.map +0 -1
@@ -0,0 +1,1171 @@
1
+ import { c as m, w as $ } from "./workbench-menu-paths-Bb0ICxeG.js";
2
+ import { w as p, r as Y } from "./layout-types-DMoZz38-.js";
3
+ import { r as ee, l as te, g as ne } from "./surface-map-C1pOTUmF.js";
4
+ import { devtools as ie } from "zustand/middleware";
5
+ import { createStore as oe } from "zustand/vanilla";
6
+ const re = (e, n) => Object.is(e, n), W = (e) => {
7
+ const n = oe()(ie(() => e.initialState, {
8
+ name: e.name ?? "workbench.store"
9
+ })), t = (r, s, i = {}) => {
10
+ const o = i.equalityFn ?? re;
11
+ let a = r(n.getState());
12
+ return i.fireImmediately && s(a, a), n.subscribe((c) => {
13
+ const l = r(c);
14
+ if (o(a, l)) return;
15
+ const g = a;
16
+ a = l, s(l, g);
17
+ });
18
+ };
19
+ return {
20
+ getState: n.getState,
21
+ getInitialState: n.getInitialState,
22
+ subscribe: n.subscribe,
23
+ subscribeSelector: t,
24
+ setState: n.setState,
25
+ api: n
26
+ };
27
+ }, Ke = (e, n) => {
28
+ for (const t of Object.values(e.regions)) {
29
+ const r = t.widgets.findIndex((s) => s.contributionId === n);
30
+ if (r >= 0) return {
31
+ regionId: t.id,
32
+ index: r,
33
+ placement: t.widgets[r]
34
+ };
35
+ }
36
+ }, je = (e, n, t) => {
37
+ for (const r of Object.values(e.regions)) {
38
+ const s = r.widgets.findIndex((i) => i.contributionId === n && i.resourceUri === t);
39
+ if (s >= 0) return {
40
+ regionId: r.id,
41
+ index: s,
42
+ placement: r.widgets[s]
43
+ };
44
+ }
45
+ }, se = (e, n) => {
46
+ for (const t of Object.values(e.regions)) {
47
+ const r = t.widgets.findIndex((s) => s.widgetId === n);
48
+ if (r >= 0) return {
49
+ regionId: t.id,
50
+ index: r,
51
+ placement: t.widgets[r]
52
+ };
53
+ }
54
+ }, Ee = (e, n) => {
55
+ const t = new Set(Object.values(e.regions).flatMap((r) => r.widgets.map((s) => s.widgetId)));
56
+ return Y(t, n);
57
+ }, j = (e) => e.widgets.find((n) => n.widgetId === e.activeWidgetId) ?? e.widgets[0], P = (e) => e.role === "location", _ = (e) => e.resourceUri ?? `${e.contributionId}:${e.widgetId}`, E = (e, n, t, r) => {
58
+ if (!n) return e;
59
+ const s = _(n), o = {
60
+ ...e.locationSubPanelSelections?.[s] ?? {}
61
+ };
62
+ return r ? o[t] = r : delete o[t], {
63
+ ...e,
64
+ locationSubPanelSelections: {
65
+ ...e.locationSubPanelSelections,
66
+ [s]: o
67
+ }
68
+ };
69
+ }, F = (e, n) => {
70
+ if (!e.locationSubPanelSelections) return e;
71
+ const t = Object.fromEntries(Object.entries(e.locationSubPanelSelections).map(([r, s]) => [r, Object.fromEntries(Object.entries(s).filter(([, i]) => i !== n))]));
72
+ return {
73
+ ...e,
74
+ locationSubPanelSelections: t
75
+ };
76
+ }, k = (e) => {
77
+ const n = e.regions.main.widgets.filter(P);
78
+ return n.find((t) => t.widgetId === e.activeLocationWidgetId) ?? n.at(-1);
79
+ }, $e = (e, n, t) => {
80
+ const r = {
81
+ ...e
82
+ };
83
+ return t.resource ? (r.resource = t.resource, r.resourceUri = t.resource.uri, r.title = t.title ?? t.resource.label ?? n.title) : t.title !== void 0 && (r.title = t.title), t.pinned !== void 0 && (r.pinned = t.pinned), t.closable !== void 0 && (r.closable = t.closable), t.mountStrategy !== void 0 && (r.mountStrategy = t.mountStrategy), t.hiddenByDefault !== void 0 && (r.hiddenByDefault = t.hiddenByDefault), t.tabRetention !== void 0 && (r.tabRetention = t.tabRetention), t.tab !== void 0 && (r.tab = t.tab), t.ownerId !== void 0 && (r.ownerId = t.ownerId), t.source !== void 0 && (r.source = t.source), t.role !== void 0 && (r.role = t.role), r;
84
+ }, De = (e, n, t) => ({
85
+ widgetId: e,
86
+ contributionId: n.id,
87
+ ownerId: t.ownerId ?? n.ownerId,
88
+ source: t.source ?? n.source,
89
+ resource: t.resource,
90
+ resourceUri: t.resource?.uri,
91
+ title: t.title ?? t.resource?.label ?? n.title,
92
+ pinned: t.pinned,
93
+ // Tabbed (non-singleton) widgets are closable unless they opt out; singleton
94
+ // panels stay non-closable by default.
95
+ closable: t.closable ?? n.closable ?? !n.singleton,
96
+ mountStrategy: t.mountStrategy ?? n.mountStrategy,
97
+ hiddenByDefault: t.hiddenByDefault ?? n.hiddenByDefault,
98
+ tabRetention: t.tabRetention,
99
+ tab: t.tab ?? n.tab,
100
+ role: t.role ?? "content"
101
+ }), He = (e, n, t, r = {}) => {
102
+ const s = e.regions[n], i = t(s.widgets), o = r.activeWidgetId !== void 0 ? r.activeWidgetId : r.clearActiveWidget ? void 0 : s.activeWidgetId;
103
+ return {
104
+ ...e,
105
+ activeLocationWidgetId: n === "main" && !i.some((a) => a.widgetId === e.activeLocationWidgetId) ? i.filter(P).at(-1)?.widgetId : e.activeLocationWidgetId,
106
+ regions: {
107
+ ...e.regions,
108
+ [n]: {
109
+ ...s,
110
+ widgets: i,
111
+ activeWidgetId: o
112
+ }
113
+ }
114
+ };
115
+ }, Be = (e, n) => {
116
+ let t = e;
117
+ for (const s of Object.values(e.regions)) {
118
+ const i = s.widgets.filter((c) => c.contributionId === n), o = s.widgets.filter((c) => c.contributionId !== n);
119
+ if (o.length === s.widgets.length) continue;
120
+ const a = s.activeWidgetId && !o.some((c) => c.widgetId === s.activeWidgetId) ? void 0 : s.activeWidgetId;
121
+ t = {
122
+ ...t,
123
+ regions: {
124
+ ...t.regions,
125
+ [s.id]: {
126
+ ...s,
127
+ widgets: o,
128
+ activeWidgetId: a
129
+ }
130
+ }
131
+ };
132
+ for (const c of i)
133
+ t = F(t, c.widgetId);
134
+ }
135
+ const r = Object.values(t.regions).some((s) => s.widgets.some((i) => i.widgetId === t.activeWidgetId));
136
+ return t.activeWidgetId && (!r || t.activeWidgetId.startsWith(`${n}:`) || t.activeWidgetId === n) && (t = {
137
+ ...t,
138
+ activeWidgetId: void 0,
139
+ activeResourceUri: void 0
140
+ }), t.activeLocationWidgetId && !t.regions.main.widgets.some((s) => s.widgetId === t.activeLocationWidgetId) && (t = {
141
+ ...t,
142
+ activeLocationWidgetId: t.regions.main.widgets.filter(P).at(-1)?.widgetId
143
+ }), t;
144
+ }, Te = (e, n) => {
145
+ const t = se(e, n);
146
+ if (!t) return;
147
+ const r = e.regions[t.regionId], s = r.widgets.filter((u) => u.widgetId !== n), i = r.activeWidgetId === n || !r.activeWidgetId && t.index === 0, a = (t.placement.role === "sub-panel" ? s.find((u) => u.role === "sub-panel" && u.ownerResourceUri === t.placement.ownerResourceUri) : void 0) ?? (t.placement.role === "sub-panel" && t.regionId === "main" ? k(e) : s[t.index] ?? s[t.index - 1]), c = i ? a?.widgetId : r.activeWidgetId, l = {
148
+ ...r,
149
+ widgets: s,
150
+ activeWidgetId: c
151
+ };
152
+ let g = F({
153
+ ...e,
154
+ activeLocationWidgetId: e.activeLocationWidgetId === n ? e.regions.main.widgets.filter((u) => u.widgetId !== n && P(u)).at(-1)?.widgetId : e.activeLocationWidgetId,
155
+ regions: {
156
+ ...e.regions,
157
+ [r.id]: l
158
+ }
159
+ }, n);
160
+ return i && t.regionId !== "side" && p.includes(t.regionId) && (g = E(g, k(g), t.regionId, a?.role === "sub-panel" ? a.widgetId : void 0)), e.activeWidgetId === n && (g = {
161
+ ...g,
162
+ activeWidgetId: a?.widgetId,
163
+ activeResourceUri: a?.resourceUri
164
+ }), {
165
+ regionId: t.regionId,
166
+ closedPlacement: t.placement,
167
+ activePlacement: j(l),
168
+ layout: g
169
+ };
170
+ }, _e = (e, n, t) => {
171
+ const r = e.regions[n];
172
+ if (n === "main" && P(t)) {
173
+ const i = e.locationSubPanelSelections?.[_(t)] ?? {}, o = {
174
+ ...e.regions
175
+ };
176
+ for (const a of p) {
177
+ const c = o[a], l = i[a], g = c.widgets.find((u) => u.widgetId === l && u.role === "sub-panel" && (!u.ownerResourceUri || u.ownerResourceUri === t.resourceUri));
178
+ o[a] = {
179
+ ...c,
180
+ activeWidgetId: a === "side" ? c.activeWidgetId : g?.widgetId ?? (a === "main" ? t.widgetId : void 0)
181
+ };
182
+ }
183
+ return {
184
+ ...e,
185
+ activeWidgetId: t.widgetId,
186
+ activeLocationWidgetId: t.widgetId,
187
+ activeResourceUri: t.resourceUri,
188
+ regions: o
189
+ };
190
+ }
191
+ const s = t.role === "sub-panel" && n !== "side" && p.includes(n) ? E(e, k(e), n, t.widgetId) : e;
192
+ return {
193
+ ...s,
194
+ activeWidgetId: t.widgetId,
195
+ activeLocationWidgetId: e.activeLocationWidgetId,
196
+ activeResourceUri: t.resourceUri,
197
+ regions: {
198
+ ...s.regions,
199
+ [n]: {
200
+ ...r,
201
+ activeWidgetId: t.widgetId
202
+ }
203
+ }
204
+ };
205
+ }, Fe = (e, n, t) => {
206
+ const r = e.regions[n], s = t ? r.widgets.find((a) => a.widgetId === t) : void 0;
207
+ if (t && !s) throw new Error(`Widget placement not found in ${n}: ${t}`);
208
+ if (r.activeWidgetId === t) return;
209
+ const i = e.activeWidgetId === r.activeWidgetId, o = {
210
+ ...e,
211
+ activeWidgetId: i ? s?.widgetId : e.activeWidgetId,
212
+ activeResourceUri: i ? s?.resourceUri : e.activeResourceUri,
213
+ activeLocationWidgetId: n === "main" && s?.role === "location" ? s.widgetId : e.activeLocationWidgetId,
214
+ regions: {
215
+ ...e.regions,
216
+ [n]: {
217
+ ...r,
218
+ activeWidgetId: s?.widgetId
219
+ }
220
+ }
221
+ };
222
+ return n === "side" || !p.includes(n) ? o : E(o, k(o), n, s?.role === "sub-panel" ? s.widgetId : void 0);
223
+ }, ce = (e, n) => !(e.resourceKinds?.length && (!n || !e.resourceKinds.includes(n.kind)) || e.canOpen && (!n || !e.canOpen(n))), Ve = (e, n, t, r = {}) => {
224
+ const s = e.regions[n];
225
+ return s.widgets.find((i) => i.widgetId === s.activeWidgetId && i.role === "sub-panel" && (r.ignoreOwnerResourceUri || !i.ownerResourceUri || i.ownerResourceUri === t?.uri));
226
+ }, Ne = (e) => k(e), ae = (e, n, t, r) => {
227
+ const s = e.eligibleLocations;
228
+ return !(!V(e, t) || s?.resourceKinds?.length && (!n || !s.resourceKinds.includes(n.kind)) || s?.resourceIds?.length && (!n?.id || !s.resourceIds.includes(n.id)) || s?.canOpen && (!n || !s.canOpen(n)) || r?.ownerResourceUri && r.ownerResourceUri !== n?.uri);
229
+ }, V = (e, n) => {
230
+ const t = e.eligibleLocations?.modeIds;
231
+ return !t?.length || n !== void 0 && t.includes(n);
232
+ }, qe = (e, n, t, r, s = {}) => ce(e, r?.resource ?? n) ? s.ignoreResourceLocation ? V(e, t) : ae(e, n, t, r) : !1, ze = (e, n) => {
233
+ const t = e.regions.main.widgets.find((r) => r.widgetId === e.regions.main.activeWidgetId) ?? k(e);
234
+ return t ? n.find((r) => r.id === t.contributionId)?.floatingPanels !== "hidden" : !0;
235
+ }, Qe = (e, n) => {
236
+ const t = e.panelMenuOwner ?? {
237
+ level: "panel"
238
+ };
239
+ return t.contributionId ? (n.subPanel ?? n.locationPanel)?.contributionId === t.contributionId : n.subPanel ? t.level === "sub-panel" : t.level === "panel";
240
+ }, de = "workbench.core", N = (e = {}) => ({
241
+ source: e.source ?? "module",
242
+ ownerId: e.ownerId ?? de,
243
+ priority: e.priority ?? 0
244
+ }), x = (e, n) => n.priority - e.priority || e.ownerId.localeCompare(n.ownerId), Ge = (e = {}, n) => {
245
+ const {
246
+ strategy: t,
247
+ ...r
248
+ } = e;
249
+ return t ? t.kind === "persistent" ? {
250
+ ...r,
251
+ tabPosition: t.position,
252
+ tabRetention: "persistent"
253
+ } : t.kind === "replace-active" ? {
254
+ ...r,
255
+ replaceActive: !0
256
+ } : t.kind === "replace-panel" ? {
257
+ ...r,
258
+ replaceWidgetId: t.instanceId,
259
+ tabRetention: t.retention
260
+ } : {
261
+ ...r,
262
+ tabRetention: "preview",
263
+ tabPosition: t.position
264
+ } : {
265
+ ...r,
266
+ tabRetention: n
267
+ };
268
+ }, Je = (e) => ({
269
+ instanceId: e.widgetId,
270
+ panelId: e.contributionId,
271
+ ownerId: e.ownerId,
272
+ source: e.source,
273
+ resource: e.resource,
274
+ resourceUri: e.resourceUri,
275
+ ownerResourceUri: e.ownerResourceUri,
276
+ title: e.title,
277
+ pinned: e.pinned,
278
+ closable: e.closable === !0,
279
+ mountStrategy: e.mountStrategy,
280
+ hiddenByDefault: e.hiddenByDefault,
281
+ tabRetention: e.tabRetention,
282
+ tab: e.tab
283
+ }), Xe = (e) => {
284
+ const {
285
+ closable: n,
286
+ ownedPanelMenuIds: t,
287
+ ...r
288
+ } = e;
289
+ return r;
290
+ }, D = (e) => e ? Array.isArray(e) ? [...e] : [e] : [], y = {
291
+ main: ["main-header", "main-left-menu", "main", "main-right-menu"],
292
+ secondary: ["secondary-header", "secondary-left-menu", "secondary", "secondary-right-menu"],
293
+ side: ["side-header", "side-left-menu", "side", "side-right-menu"]
294
+ }, H = Object.values(y).flat(), O = (e) => e.panels ?? p, Ze = (e) => Object.keys(y).find((n) => y[n].some((t) => t === e)), Ye = (e, n) => !e || O(e).includes(n), I = (e, n) => {
295
+ if (n)
296
+ return Object.values(e.regions).flatMap((t) => t.widgets).find((t) => t.widgetId === n);
297
+ }, A = (e, n) => {
298
+ const t = n.find((r) => r && I(e, r.widgetId));
299
+ return {
300
+ ...e,
301
+ activeWidgetId: t?.widgetId,
302
+ activeResourceUri: t?.resourceUri
303
+ };
304
+ }, le = (e, n) => {
305
+ if (n.length === 0) return e;
306
+ const t = new Set(Object.keys(y).filter((c) => y[c].some((l) => n.includes(l)))), r = n.some((c) => {
307
+ const l = e.regions[c];
308
+ return l.widgets.length > 0 || l.activeWidgetId !== void 0 || l.visible;
309
+ }), s = Object.values(e.locationSubPanelSelections ?? {}).some((c) => Object.keys(c).some((l) => t.has(l)));
310
+ if (!r && !s) return e;
311
+ const i = {
312
+ ...e.regions
313
+ };
314
+ for (const c of n)
315
+ i[c] = {
316
+ ...i[c],
317
+ widgets: [],
318
+ activeWidgetId: void 0,
319
+ visible: !1
320
+ };
321
+ const o = Object.fromEntries(Object.entries(e.locationSubPanelSelections ?? {}).map(([c, l]) => [c, Object.fromEntries(Object.entries(l).filter(([g]) => !t.has(g)))])), a = {
322
+ ...e,
323
+ regions: i
324
+ };
325
+ return {
326
+ ...A(a, [I(a, e.activeWidgetId)]),
327
+ activeLocationWidgetId: I(a, e.activeLocationWidgetId)?.widgetId,
328
+ locationSubPanelSelections: o
329
+ };
330
+ }, U = (e, n) => {
331
+ const t = new Set(n), r = Object.keys(y).filter((s) => !t.has(s)).flatMap((s) => y[s]);
332
+ return le(e, r);
333
+ }, ge = (e, n, t) => {
334
+ if (!n) {
335
+ const a = {
336
+ ...e.regions
337
+ };
338
+ for (const l of H) {
339
+ const g = a[l], u = g.widgets.filter((b) => b.role !== "content");
340
+ a[l] = {
341
+ ...g,
342
+ widgets: u,
343
+ activeWidgetId: u.some((b) => b.widgetId === g.activeWidgetId) ? g.activeWidgetId : void 0
344
+ };
345
+ }
346
+ const c = {
347
+ ...e,
348
+ regions: a
349
+ };
350
+ return U({
351
+ ...A(c, [I(c, e.activeWidgetId)]),
352
+ activeLocationWidgetId: I(c, e.activeLocationWidgetId)?.widgetId
353
+ }, t);
354
+ }
355
+ const r = {
356
+ ...e.regions
357
+ };
358
+ for (const a of H) r[a] = n.regions[a];
359
+ const s = U({
360
+ ...e,
361
+ regions: r
362
+ }, t), i = I(s, n.activeWidgetId), o = I(s, e.activeWidgetId);
363
+ return {
364
+ ...A(s, [i, o]),
365
+ activeLocationWidgetId: I(s, n.activeLocationWidgetId)?.widgetId ?? I(s, e.activeLocationWidgetId)?.widgetId,
366
+ locationSubPanelSelections: n.locationSubPanelSelections
367
+ };
368
+ }, C = (e) => {
369
+ for (let n = e.length - 1; n >= 0; n -= 1)
370
+ e[n]?.dispose();
371
+ }, B = (e, n) => {
372
+ n !== e.layout.getLayout() && e.layout.restoreLayout(n);
373
+ for (const t of p) e.panels.setOpen(t, n.regions[t].visible);
374
+ }, et = (e) => {
375
+ const n = W({
376
+ name: "workbench.modes",
377
+ initialState: {
378
+ modes: {},
379
+ activeModeId: void 0
380
+ }
381
+ }), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
382
+ let i = [], o, a, c = !1;
383
+ const l = (d) => {
384
+ if (t.has(d.id)) return;
385
+ const f = D(d.activate(e.resolveContext()));
386
+ t.set(d.id, f);
387
+ }, g = (d, f) => {
388
+ let v = !1, h = () => {
389
+ };
390
+ const S = () => {
391
+ if (v) return;
392
+ const w = f.layout.getActivePanel("main");
393
+ if (!w) return;
394
+ const L = f.layout.getLayout().regions.main.widgets.find((Z) => Z.widgetId === w.instanceId);
395
+ L && (L.role === "sub-panel" || L.role === "panel-menu") || (v = !0, h(), e.establishLocation?.(w.instanceId));
396
+ };
397
+ h = f.layout.store.subscribeSelector((w) => w.layout.regions.main, S);
398
+ try {
399
+ d.seed?.(f), S();
400
+ } finally {
401
+ h();
402
+ }
403
+ }, u = (d) => {
404
+ const f = e.resolveContext(), v = `${d.id}\0${f.layout.getPersistenceScope() ?? "unscoped"}`, h = U(f.layout.getLayout(), O(d));
405
+ B(f, h), f.layout.reconcilePanelMenus(), !r.has(v) && !f.layout.enteredWithPersistedLayout() && g(d, f), r.add(v);
406
+ }, b = (d) => {
407
+ u(d), d.reconcile?.(e.resolveContext());
408
+ }, Q = (d) => {
409
+ const f = e.resolveContext(), v = n.getState().activeModeId, h = f.layout.getPersistenceScope() === void 0;
410
+ if (v && h && s.set(v, f.layout.getLayout()), R(), d === void 0) {
411
+ n.setState({
412
+ ...n.getState(),
413
+ activeModeId: void 0
414
+ }, !1, "deactivateMode");
415
+ return;
416
+ }
417
+ const S = n.getState().modes[d];
418
+ if (!S) throw new Error(`Workbench mode not registered: ${d}`);
419
+ h && B(f, ge(f.layout.getLayout(), s.get(d), O(S))), G(d, {
420
+ seed: a !== d
421
+ });
422
+ }, R = () => {
423
+ C(i), i = [], o?.dispose(), o = void 0;
424
+ }, G = (d, f) => {
425
+ const v = e.resolveContext(), h = n.getState().modes[d];
426
+ if (!h) throw new Error(`Workbench mode not registered: ${d}`);
427
+ const S = v.context.createScope("workbench.mode");
428
+ S.set("activeWorkbenchMode", d), S.set(`workbenchMode.${d}`, !0), o = S;
429
+ try {
430
+ l(h), n.setState({
431
+ ...n.getState(),
432
+ activeModeId: d
433
+ }, !1, "activateMode"), f.seed && u(h), i = D(h.enter?.(v)), f.seed && h.reconcile?.(e.resolveContext());
434
+ } catch (w) {
435
+ throw R(), n.setState({
436
+ ...n.getState(),
437
+ activeModeId: void 0
438
+ }, !1, "deactivateMode"), w;
439
+ }
440
+ }, J = e.resolveContext().layout.onDidChangePersistenceScope(() => {
441
+ const d = n.getState().activeModeId;
442
+ if (d === a) return;
443
+ const f = d ? n.getState().modes[d] : void 0;
444
+ f && b(f);
445
+ }), X = m(() => {
446
+ J.dispose(), R();
447
+ for (const d of t.values()) C(d);
448
+ t.clear(), r.clear(), s.clear(), n.setState({
449
+ modes: {},
450
+ activeModeId: void 0
451
+ }, !1, "disposeModes");
452
+ });
453
+ return {
454
+ store: n,
455
+ dispose() {
456
+ X.dispose();
457
+ },
458
+ registerMode(d) {
459
+ const f = n.getState();
460
+ if (f.modes[d.id]) throw new Error(`Workbench mode already registered: ${d.id}`);
461
+ return n.setState({
462
+ ...f,
463
+ modes: {
464
+ ...f.modes,
465
+ [d.id]: d
466
+ }
467
+ }, !1, "registerMode"), m(() => {
468
+ const v = n.getState();
469
+ if (v.modes[d.id] !== d) return;
470
+ v.activeModeId === d.id && (R(), n.setState({
471
+ ...n.getState(),
472
+ activeModeId: void 0
473
+ }, !1, "deactivateMode")), C(t.get(d.id) ?? []), t.delete(d.id), s.delete(d.id);
474
+ for (const w of r)
475
+ w.startsWith(`${d.id}\0`) && r.delete(w);
476
+ const {
477
+ [d.id]: h,
478
+ ...S
479
+ } = v.modes;
480
+ n.setState({
481
+ ...n.getState(),
482
+ modes: S
483
+ }, !1, "unregisterMode");
484
+ });
485
+ },
486
+ getMode(d) {
487
+ return n.getState().modes[d];
488
+ },
489
+ listModes() {
490
+ return Object.values(n.getState().modes);
491
+ },
492
+ getActiveModeId() {
493
+ return n.getState().activeModeId;
494
+ },
495
+ // A deferred seed is the second half of one transition: the caller rotates the
496
+ // layout persistence scope between the two halves. Observers must not treat the
497
+ // gap as a settled context, so the transition is not over until the seed runs.
498
+ isTransitioning() {
499
+ return c || a !== void 0;
500
+ },
501
+ setActiveMode(d, f = {}) {
502
+ if (d === n.getState().activeModeId) {
503
+ const v = d ? n.getState().modes[d] : void 0;
504
+ v && d !== a && b(v);
505
+ return;
506
+ }
507
+ c = !0, a = f.deferSeed ? d : void 0;
508
+ try {
509
+ Q(d);
510
+ } finally {
511
+ c = !1;
512
+ }
513
+ },
514
+ seedActiveMode() {
515
+ const d = n.getState().activeModeId, f = d ? n.getState().modes[d] : void 0;
516
+ c = !0;
517
+ try {
518
+ f && b(f);
519
+ } finally {
520
+ a = void 0, c = !1;
521
+ }
522
+ },
523
+ onDidChangeActive(d) {
524
+ const f = n.subscribeSelector((v) => v.activeModeId, () => d());
525
+ return m(f);
526
+ }
527
+ };
528
+ }, ue = (e) => Array.isArray(e) ? e : e.trim().split(/\s+/).filter(Boolean), fe = (e) => {
529
+ const n = ue(e);
530
+ return n.length === 1 ? n[0] ?? "" : n;
531
+ }, tt = (e) => {
532
+ const n = W({
533
+ name: "workbench.keybindings",
534
+ initialState: {
535
+ keybindings: []
536
+ }
537
+ });
538
+ return {
539
+ store: n,
540
+ registerKeybinding(t, r) {
541
+ if (!e.commands.getCommand(t.commandId)) throw new Error(`Keybinding command not registered: ${t.commandId}`);
542
+ const s = {
543
+ ...N(r),
544
+ ...t,
545
+ keybinding: fe(t.keybinding)
546
+ }, i = n.getState();
547
+ return n.setState({
548
+ keybindings: [...i.keybindings, s]
549
+ }, !1, "registerKeybinding"), m(() => {
550
+ const o = n.getState(), a = o.keybindings.filter((c) => c !== s);
551
+ a.length !== o.keybindings.length && n.setState({
552
+ keybindings: a
553
+ }, !1, "unregisterKeybinding");
554
+ });
555
+ },
556
+ listKeybindings() {
557
+ return [...n.getState().keybindings].sort(x);
558
+ },
559
+ listActiveKeybindings() {
560
+ return n.getState().keybindings.filter((t) => e.context.matches(t.when)).sort(x);
561
+ }
562
+ };
563
+ }, nt = (e, n) => j(e.regions[ee(n)])?.resource, it = ({
564
+ layout: e,
565
+ primary: n,
566
+ isInScope: t
567
+ }) => {
568
+ const r = [];
569
+ for (const s of te()) {
570
+ const i = ne(s);
571
+ if (i.role !== "anchor" || i.persistence === "primary") continue;
572
+ const o = j(e.regions[s]);
573
+ if (o?.resource) {
574
+ if (o.role === "sub-panel" && o.ownerResourceUri) {
575
+ r.push({
576
+ region: s,
577
+ action: "keep"
578
+ });
579
+ continue;
580
+ }
581
+ if (i.persistence === "derived") {
582
+ r.push({
583
+ region: s,
584
+ action: "clear"
585
+ });
586
+ continue;
587
+ }
588
+ r.push({
589
+ region: s,
590
+ action: t(o.resource, n) ? "keep" : "clear"
591
+ });
592
+ }
593
+ }
594
+ return r;
595
+ }, M = (e, n) => {
596
+ const {
597
+ [n]: t,
598
+ ...r
599
+ } = e;
600
+ return r;
601
+ }, ve = () => {
602
+ if (typeof document > "u")
603
+ throw new Error("workbench.renderers.registerRenderer({ keepAlive: true }): no DOM available. The default host factory uses document.createElement. In a non-browser environment (Bun tests, SSR), pass a custom factory via createWorkbenchCore({ renderers: { createHost: () => myHost } }).");
604
+ const e = document.createElement("div");
605
+ return e.style.display = "contents", e.dataset.workbenchKeepAliveHost = "", e;
606
+ }, ot = (e = {}) => {
607
+ const n = e.createHost ?? ve, t = W({
608
+ name: "workbench.renderers",
609
+ initialState: {
610
+ renderers: {},
611
+ hosts: {},
612
+ claims: {}
613
+ }
614
+ }), r = (i) => {
615
+ const o = t.getState(), a = o.hosts[i], c = a?.attachedTo;
616
+ !a || !c || (c.contains(a.host) && c.removeChild(a.host), t.setState({
617
+ ...o,
618
+ hosts: {
619
+ ...o.hosts,
620
+ [i]: {
621
+ ...a,
622
+ attachedTo: void 0
623
+ }
624
+ },
625
+ claims: M(o.claims, i)
626
+ }, !1, "renderers.detach"));
627
+ }, s = {
628
+ store: t,
629
+ registerRenderer(i) {
630
+ const o = t.getState();
631
+ if (o.renderers[i.id]) throw new Error(`Renderer already registered: ${i.id}`);
632
+ const a = i.keepAlive ? n() : void 0, c = a ? {
633
+ ...o.hosts,
634
+ [i.id]: {
635
+ rendererId: i.id,
636
+ host: a
637
+ }
638
+ } : o.hosts;
639
+ return t.setState({
640
+ ...o,
641
+ renderers: {
642
+ ...o.renderers,
643
+ [i.id]: i
644
+ },
645
+ hosts: c
646
+ }, !1, "registerRenderer"), m(() => {
647
+ if (t.getState().renderers[i.id] !== i) return;
648
+ i.keepAlive && r(i.id);
649
+ const g = t.getState();
650
+ t.setState({
651
+ ...g,
652
+ renderers: M(g.renderers, i.id),
653
+ hosts: M(g.hosts, i.id),
654
+ claims: M(g.claims, i.id)
655
+ }, !1, "unregisterRenderer");
656
+ });
657
+ },
658
+ getRenderer(i) {
659
+ return t.getState().renderers[i];
660
+ },
661
+ listRenderers() {
662
+ return Object.values(t.getState().renderers);
663
+ },
664
+ onDidChange(i) {
665
+ const o = t.subscribeSelector((a) => a.renderers, () => i());
666
+ return m(o);
667
+ },
668
+ claim(i, o, a) {
669
+ const c = t.getState(), l = c.renderers[i];
670
+ if (!l) throw new Error(`Renderer is not registered: ${i}`);
671
+ if (!l.keepAlive) throw new Error(`Renderer ${i} is not keep-alive; cannot claim`);
672
+ const g = c.hosts[i];
673
+ if (!g) throw new Error(`Renderer ${i} has no host`);
674
+ if (g.attachedTo === o)
675
+ t.setState({
676
+ ...c,
677
+ claims: {
678
+ ...c.claims,
679
+ [i]: a
680
+ }
681
+ }, !1, "renderers.updateClaim");
682
+ else {
683
+ r(i);
684
+ const u = t.getState(), b = u.hosts[i];
685
+ o.appendChild(b.host), t.setState({
686
+ ...u,
687
+ hosts: {
688
+ ...u.hosts,
689
+ [i]: {
690
+ ...b,
691
+ attachedTo: o
692
+ }
693
+ },
694
+ claims: {
695
+ ...u.claims,
696
+ [i]: a
697
+ }
698
+ }, !1, "renderers.attach");
699
+ }
700
+ return m(() => {
701
+ const b = t.getState().hosts[i];
702
+ !b || b.attachedTo !== o || r(i);
703
+ });
704
+ },
705
+ getHost(i) {
706
+ return t.getState().hosts[i]?.host;
707
+ },
708
+ getClaim(i) {
709
+ return t.getState().claims[i];
710
+ }
711
+ };
712
+ for (const i of e.initialRenderers ?? []) s.registerRenderer(i);
713
+ return s;
714
+ }, rt = {
715
+ project: "folder-root",
716
+ workspace: "computer",
717
+ worktree: "git-pull-request-draft",
718
+ settings: "settings",
719
+ kanbanRenderer: "table-properties"
720
+ }, be = "resource_hierarchy_cycle", q = (e) => [...e].sort((n, t) => t.priority - n.priority || n.id.localeCompare(t.id)), he = (e, n, t) => {
721
+ const r = q(e), s = [n], i = /* @__PURE__ */ new Set([n.uri]);
722
+ let o = n;
723
+ for (; ; ) {
724
+ const c = r.find((l) => l.canResolve(o))?.getParent(o);
725
+ if (!c) break;
726
+ if (i.has(c.uri)) {
727
+ t({
728
+ code: be,
729
+ path: [...s],
730
+ repeatedUri: c.uri
731
+ });
732
+ break;
733
+ }
734
+ s.unshift(c), i.add(c.uri), o = c;
735
+ }
736
+ return s;
737
+ }, me = "workbench.resource.kind", Se = "workbench.resource.id", we = (e) => `workbench.resource.metadata.${e}`, z = "workbench.selectionResourceUri", Ie = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean", st = (e) => {
738
+ if (!e) return {};
739
+ const n = {
740
+ [me]: e.kind,
741
+ [Se]: e.id ?? e.uri
742
+ };
743
+ for (const [t, r] of Object.entries(e.metadata ?? {}))
744
+ Ie(r) && (n[we(t)] = r);
745
+ return n;
746
+ }, ct = (e) => ({
747
+ [z]: e.uri
748
+ }), at = (e) => {
749
+ if (!e) return [];
750
+ const n = e.metadata?.[z];
751
+ return typeof n != "string" || n === e.uri ? [e.uri] : [e.uri, n];
752
+ }, T = (e) => [...e].sort((n, t) => t.priority - n.priority || n.id.localeCompare(t.id)), ye = (e) => (typeof e == "object" || typeof e == "function") && e !== null && "then" in e && typeof e.then == "function", dt = (e = {}) => {
753
+ const n = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), r = e.establishLocation;
754
+ let s = 0;
755
+ const i = W({
756
+ name: "workbench.resources",
757
+ initialState: {
758
+ kinds: {},
759
+ presenters: {},
760
+ providers: {},
761
+ hierarchyProviders: {}
762
+ }
763
+ });
764
+ return {
765
+ store: i,
766
+ registerKind(o, a) {
767
+ const c = i.getState();
768
+ if (c.kinds[o.kind]) throw new Error(`Resource kind already registered: ${o.kind}`);
769
+ const l = {
770
+ ...N(a),
771
+ ...o
772
+ };
773
+ return i.setState({
774
+ ...c,
775
+ kinds: {
776
+ ...c.kinds,
777
+ [o.kind]: l
778
+ }
779
+ }, !1, "registerKind"), m(() => {
780
+ const g = i.getState();
781
+ if (g.kinds[o.kind] !== l) return;
782
+ const {
783
+ [o.kind]: u,
784
+ ...b
785
+ } = g.kinds;
786
+ i.setState({
787
+ ...g,
788
+ kinds: b
789
+ }, !1, "unregisterKind");
790
+ });
791
+ },
792
+ getKind(o) {
793
+ return i.getState().kinds[o];
794
+ },
795
+ getSurface(o) {
796
+ return i.getState().kinds[o.kind]?.surface;
797
+ },
798
+ listKinds() {
799
+ return Object.values(i.getState().kinds).sort(x);
800
+ },
801
+ registerPresenter(o) {
802
+ const a = i.getState();
803
+ if (a.presenters[o.id]) throw new Error(`Resource presenter already registered: ${o.id}`);
804
+ const c = {
805
+ ...o,
806
+ priority: o.priority ?? 0
807
+ };
808
+ return i.setState({
809
+ ...a,
810
+ presenters: {
811
+ ...a.presenters,
812
+ [o.id]: c
813
+ }
814
+ }, !1, "registerPresenter"), m(() => {
815
+ const l = i.getState();
816
+ if (l.presenters[o.id] !== c) return;
817
+ const {
818
+ [o.id]: g,
819
+ ...u
820
+ } = l.presenters;
821
+ i.setState({
822
+ ...l,
823
+ presenters: u
824
+ }, !1, "unregisterPresenter");
825
+ });
826
+ },
827
+ listPresenters() {
828
+ return T(Object.values(i.getState().presenters));
829
+ },
830
+ registerProvider(o) {
831
+ const a = i.getState();
832
+ if (a.providers[o.id]) throw new Error(`Resource provider already registered: ${o.id}`);
833
+ return i.setState({
834
+ ...a,
835
+ providers: {
836
+ ...a.providers,
837
+ [o.id]: o
838
+ }
839
+ }, !1, "registerProvider"), m(() => {
840
+ const c = i.getState();
841
+ if (c.providers[o.id] !== o) return;
842
+ const {
843
+ [o.id]: l,
844
+ ...g
845
+ } = c.providers;
846
+ i.setState({
847
+ ...c,
848
+ providers: g
849
+ }, !1, "unregisterProvider");
850
+ });
851
+ },
852
+ listProviders() {
853
+ return Object.values(i.getState().providers);
854
+ },
855
+ listResources(o) {
856
+ const a = {
857
+ primary: e.getPrimary?.()
858
+ }, c = [];
859
+ for (const l of Object.values(i.getState().providers))
860
+ c.push(...l.list(o, a));
861
+ return c;
862
+ },
863
+ registerHierarchyProvider(o) {
864
+ const a = i.getState();
865
+ if (a.hierarchyProviders[o.id])
866
+ throw new Error(`Resource hierarchy provider already registered: ${o.id}`);
867
+ const c = {
868
+ ...o,
869
+ priority: o.priority ?? 0
870
+ };
871
+ return i.setState({
872
+ ...a,
873
+ hierarchyProviders: {
874
+ ...a.hierarchyProviders,
875
+ [o.id]: c
876
+ }
877
+ }, !1, "registerHierarchyProvider"), m(() => {
878
+ const l = i.getState();
879
+ if (l.hierarchyProviders[o.id] !== c) return;
880
+ const {
881
+ [o.id]: g,
882
+ ...u
883
+ } = l.hierarchyProviders;
884
+ i.setState({
885
+ ...l,
886
+ hierarchyProviders: u
887
+ }, !1, "unregisterHierarchyProvider");
888
+ });
889
+ },
890
+ listHierarchyProviders() {
891
+ return q(Object.values(i.getState().hierarchyProviders));
892
+ },
893
+ walkHierarchy(o) {
894
+ return o ? he(Object.values(i.getState().hierarchyProviders), o, (a) => {
895
+ for (const c of t) c(a);
896
+ }) : [];
897
+ },
898
+ onDidDetectHierarchyCycle(o) {
899
+ return t.add(o), m(() => {
900
+ t.delete(o);
901
+ });
902
+ },
903
+ isOpeningResource() {
904
+ return s > 0;
905
+ },
906
+ async openResource(o, a = {}) {
907
+ const c = i.getState();
908
+ if (!c.kinds[o.kind]) throw new Error(`Unknown resource kind: ${o.kind}`);
909
+ const l = T(Object.values(c.presenters)).find((u) => u.canOpen(o));
910
+ if (!l) throw new Error(`No presenter registered for resource kind: ${o.kind}`);
911
+ s += 1;
912
+ let g;
913
+ try {
914
+ const u = l.open(o, a);
915
+ g = ye(u) ? await u : u, g = r?.(g) ?? g;
916
+ } finally {
917
+ s -= 1;
918
+ }
919
+ for (const u of n) u(o);
920
+ return g;
921
+ },
922
+ onDidOpenResource(o) {
923
+ return n.add(o), m(() => {
924
+ n.delete(o);
925
+ });
926
+ }
927
+ };
928
+ }, pe = (e) => e.replace(/^['"]|['"]$/g, ""), ke = (e, n) => {
929
+ const t = n.trim();
930
+ if (t.length === 0) return !0;
931
+ const r = t.match(/^([A-Za-z0-9_.-]+)\s*(==|!=)\s*(.+)$/);
932
+ if (r) {
933
+ const [, s, i, o] = r, a = e[s ?? ""], c = pe(o ?? "");
934
+ return i === "==" ? String(a) === c : String(a) !== c;
935
+ }
936
+ return t.startsWith("!") ? !e[t.slice(1)] : !!e[t];
937
+ }, We = (e, n) => n ? n.split("||").some((t) => t.split("&&").every((r) => ke(e, r))) : !0, lt = () => {
938
+ const e = W({
939
+ name: "workbench.context",
940
+ initialState: {
941
+ values: {}
942
+ }
943
+ });
944
+ let n = {};
945
+ const t = /* @__PURE__ */ new Map(), r = () => {
946
+ const i = {
947
+ ...n
948
+ };
949
+ for (const o of t.values()) Object.assign(i, o);
950
+ return i;
951
+ }, s = (i) => {
952
+ e.setState({
953
+ values: r()
954
+ }, !1, i);
955
+ };
956
+ return {
957
+ store: e,
958
+ set(i, o) {
959
+ n[i] !== o && (n = {
960
+ ...n,
961
+ [i]: o
962
+ }, s("setContextKey"));
963
+ },
964
+ get(i) {
965
+ return e.getState().values[i];
966
+ },
967
+ delete(i) {
968
+ if (!(i in n)) return;
969
+ const {
970
+ [i]: o,
971
+ ...a
972
+ } = n;
973
+ n = a, s("deleteContextKey");
974
+ },
975
+ createScope(i) {
976
+ t.set(i, t.get(i) ?? {});
977
+ let o = !1;
978
+ const a = () => {
979
+ if (o) throw new Error(`Context key scope disposed: ${i}`);
980
+ };
981
+ return {
982
+ ownerId: i,
983
+ set(c, l) {
984
+ a();
985
+ const g = t.get(i) ?? {};
986
+ g[c] !== l && (t.set(i, {
987
+ ...g,
988
+ [c]: l
989
+ }), s("setScopedContextKey"));
990
+ },
991
+ get(c) {
992
+ return a(), t.get(i)?.[c];
993
+ },
994
+ delete(c) {
995
+ a();
996
+ const l = t.get(i);
997
+ if (!l || !(c in l)) return;
998
+ const {
999
+ [c]: g,
1000
+ ...u
1001
+ } = l;
1002
+ t.set(i, u), s("deleteScopedContextKey");
1003
+ },
1004
+ dispose() {
1005
+ o || (o = !0, t.delete(i) && s("disposeContextKeyScope"));
1006
+ }
1007
+ };
1008
+ },
1009
+ deleteOwner(i) {
1010
+ t.delete(i) && s("deleteContextKeyOwner");
1011
+ },
1012
+ snapshot() {
1013
+ return {
1014
+ ...e.getState().values
1015
+ };
1016
+ },
1017
+ matches(i) {
1018
+ return We(e.getState().values, i);
1019
+ }
1020
+ };
1021
+ }, Pe = "sidenav", Re = (e, n, t) => {
1022
+ e.panels.setOpen(n, t), e.layout.setRegionVisible(n, t);
1023
+ }, Me = (e, n) => {
1024
+ Re(e, n, !e.panels.isOpen(n));
1025
+ }, Le = [{
1026
+ id: "workbench.toggleCommandPalette",
1027
+ label: "Toggle Command Palette",
1028
+ icon: "Command",
1029
+ keybinding: "Mod+K",
1030
+ execute: (e) => e.commandPalette.toggle()
1031
+ }, {
1032
+ id: "workbench.action.showCommands",
1033
+ label: "Run Command",
1034
+ icon: "Terminal",
1035
+ keybinding: "Alt+Shift+K",
1036
+ execute: (e) => e.commandPalette.open({
1037
+ initialQuery: "> "
1038
+ })
1039
+ }, {
1040
+ id: "workbench.action.changeTheme",
1041
+ label: "Change Theme",
1042
+ icon: "Palette",
1043
+ keybinding: "Alt+Shift+T",
1044
+ execute: (e) => e.commandPalette.open({
1045
+ view: "theme"
1046
+ })
1047
+ }, {
1048
+ id: "workbench.action.navigateBack",
1049
+ label: "Navigate Back",
1050
+ icon: "ArrowLeft",
1051
+ keybinding: "Alt+Shift+ArrowLeft",
1052
+ execute: (e) => {
1053
+ e.history.goBack();
1054
+ }
1055
+ }, {
1056
+ id: "workbench.action.navigateForward",
1057
+ label: "Navigate Forward",
1058
+ icon: "ArrowRight",
1059
+ keybinding: "Alt+Shift+ArrowRight",
1060
+ execute: (e) => {
1061
+ e.history.goForward();
1062
+ }
1063
+ }, {
1064
+ id: "workbench.toggleSideBar",
1065
+ label: "Toggle Sidenav",
1066
+ icon: "PanelLeft",
1067
+ keybinding: "Mod+B",
1068
+ execute: (e) => Me(e, Pe)
1069
+ }], K = "workbench.action.switchMode", gt = (e) => {
1070
+ if (e.kind !== "command" || e.commandId !== K || !e.args || typeof e.args != "object") return;
1071
+ const n = "modeId" in e.args ? e.args.modeId : void 0;
1072
+ return typeof n == "string" && n.trim().length > 0 ? n : void 0;
1073
+ }, ut = (e) => {
1074
+ for (const n of Le)
1075
+ e.commands.registerCommand({
1076
+ id: n.id,
1077
+ label: n.label,
1078
+ category: "Workbench",
1079
+ icon: n.icon,
1080
+ when: "!inputFocus"
1081
+ }, {
1082
+ execute: () => n.execute(e)
1083
+ }), e.keybindings.registerKeybinding({
1084
+ commandId: n.id,
1085
+ keybinding: n.keybinding,
1086
+ when: "!inputFocus"
1087
+ }), e.layout.registerMenuItem($, {
1088
+ commandId: n.id,
1089
+ group: "Workbench"
1090
+ });
1091
+ e.commands.registerCommand({
1092
+ id: K,
1093
+ label: "Switch Mode",
1094
+ category: "Workbench",
1095
+ icon: "PanelTop",
1096
+ when: "!inputFocus"
1097
+ }, {
1098
+ execute: async (n) => {
1099
+ if (!n?.modeId) {
1100
+ e.commandPalette.open({
1101
+ view: "mode"
1102
+ });
1103
+ return;
1104
+ }
1105
+ const t = await e.navigator.open({
1106
+ modeId: n.modeId
1107
+ });
1108
+ !t.ok && t.code === "navigation_mode_missing" && e.notifications.show({
1109
+ level: "error",
1110
+ title: "Mode unavailable",
1111
+ message: t.message
1112
+ });
1113
+ }
1114
+ }), e.layout.registerMenuItem($, {
1115
+ commandId: K,
1116
+ group: "Workbench"
1117
+ });
1118
+ };
1119
+ export {
1120
+ ot as A,
1121
+ dt as B,
1122
+ tt as C,
1123
+ et as D,
1124
+ ut as E,
1125
+ st as F,
1126
+ ct as G,
1127
+ ue as H,
1128
+ gt as I,
1129
+ Ze as J,
1130
+ at as K,
1131
+ We as L,
1132
+ be as M,
1133
+ rt as N,
1134
+ Se as O,
1135
+ me as P,
1136
+ we as Q,
1137
+ z as R,
1138
+ K as S,
1139
+ Ve as T,
1140
+ Ne as U,
1141
+ V,
1142
+ Qe as W,
1143
+ ze as X,
1144
+ He as a,
1145
+ x as b,
1146
+ W as c,
1147
+ F as d,
1148
+ $e as e,
1149
+ je as f,
1150
+ j as g,
1151
+ k as h,
1152
+ Ke as i,
1153
+ Ee as j,
1154
+ De as k,
1155
+ se as l,
1156
+ Te as m,
1157
+ N as n,
1158
+ Ge as o,
1159
+ Xe as p,
1160
+ Fe as q,
1161
+ Be as r,
1162
+ E as s,
1163
+ Je as t,
1164
+ _e as u,
1165
+ Ye as v,
1166
+ qe as w,
1167
+ nt as x,
1168
+ it as y,
1169
+ lt as z
1170
+ };
1171
+ //# sourceMappingURL=workbench-built-ins-BtgeB274.js.map