@omniviewdev/editors 4.0.0 → 5.0.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.
package/dist/index.js CHANGED
@@ -1,285 +1,285 @@
1
- import Qe, { forwardRef as ve, useRef as Y, useState as Pe, useMemo as Ae, useEffect as V, useImperativeHandle as vt, useCallback as Ne, Suspense as $t, lazy as It, Children as Wt, isValidElement as Bt, useId as Ht, useLayoutEffect as bt, useSyncExternalStore as Ut } from "react";
2
- import * as $ from "monaco-editor";
3
- import { useTheme as zt, Checkbox as He, Separator as Ft, Blockquote as Vt, Link as Yt, Table as ye, CodeBlock as qt, Code as Jt, Accordion as nt, CommandList as ue, useCommandListConfig as Gt, useCommandListStoreContext as Xt } from "@omniviewdev/base-ui";
4
- import Qt from "remark-gfm";
5
- import Zt from "rehype-raw";
6
- import Kt, { defaultSchema as Ue } from "rehype-sanitize";
1
+ import et, { forwardRef as _e, useRef as G, useState as me, useMemo as Oe, useEffect as U, useImperativeHandle as xt, useCallback as De, Suspense as kt, lazy as Rt, Children as Ft, isValidElement as Ut, useId as Yt, useLayoutEffect as St, useSyncExternalStore as Gt } from "react";
2
+ import { useTheme as Jt, Checkbox as Ve, Separator as Kt, Blockquote as Xt, Link as Zt, Table as be, CodeBlock as Qt, Code as er, Accordion as st, CommandList as ue, useCommandListConfig as tr, useCommandListStoreContext as rr, utf16ToUtf8 as nr, utf8ToUtf16 as or } from "@omniviewdev/base-ui";
3
+ import * as W from "monaco-editor";
4
+ import ir from "remark-gfm";
5
+ import sr from "rehype-raw";
6
+ import ar, { defaultSchema as Fe } from "rehype-sanitize";
7
7
  import "@xterm/xterm/css/xterm.css";
8
- var Ee = { exports: {} }, ke = {};
9
- var ot;
10
- function er() {
11
- if (ot) return ke;
12
- ot = 1;
8
+ var je = { exports: {} }, Re = {};
9
+ var at;
10
+ function cr() {
11
+ if (at) return Re;
12
+ at = 1;
13
13
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
14
- function r(n, c, u) {
14
+ function r(n, c, i) {
15
15
  var l = null;
16
- if (u !== void 0 && (l = "" + u), c.key !== void 0 && (l = "" + c.key), "key" in c) {
17
- u = {};
18
- for (var a in c)
19
- a !== "key" && (u[a] = c[a]);
20
- } else u = c;
21
- return c = u.ref, {
16
+ if (i !== void 0 && (l = "" + i), c.key !== void 0 && (l = "" + c.key), "key" in c) {
17
+ i = {};
18
+ for (var d in c)
19
+ d !== "key" && (i[d] = c[d]);
20
+ } else i = c;
21
+ return c = i.ref, {
22
22
  $$typeof: e,
23
23
  type: n,
24
24
  key: l,
25
25
  ref: c !== void 0 ? c : null,
26
- props: u
26
+ props: i
27
27
  };
28
28
  }
29
- return ke.Fragment = t, ke.jsx = r, ke.jsxs = r, ke;
30
- }
31
- var xe = {};
32
- var it;
33
- function tr() {
34
- return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
35
- function e(o) {
36
- if (o == null) return null;
37
- if (typeof o == "function")
38
- return o.$$typeof === v ? null : o.displayName || o.name || null;
39
- if (typeof o == "string") return o;
40
- switch (o) {
41
- case N:
29
+ return Re.Fragment = t, Re.jsx = r, Re.jsxs = r, Re;
30
+ }
31
+ var Se = {};
32
+ var ct;
33
+ function lr() {
34
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && (function() {
35
+ function e(a) {
36
+ if (a == null) return null;
37
+ if (typeof a == "function")
38
+ return a.$$typeof === b ? null : a.displayName || a.name || null;
39
+ if (typeof a == "string") return a;
40
+ switch (a) {
41
+ case x:
42
42
  return "Fragment";
43
- case C:
43
+ case S:
44
44
  return "Profiler";
45
- case q:
45
+ case z:
46
46
  return "StrictMode";
47
- case P:
47
+ case N:
48
48
  return "Suspense";
49
- case F:
49
+ case q:
50
50
  return "SuspenseList";
51
- case ne:
51
+ case K:
52
52
  return "Activity";
53
53
  }
54
- if (typeof o == "object")
55
- switch (typeof o.tag == "number" && console.error(
54
+ if (typeof a == "object")
55
+ switch (typeof a.tag == "number" && console.error(
56
56
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
57
- ), o.$$typeof) {
57
+ ), a.$$typeof) {
58
58
  case H:
59
59
  return "Portal";
60
- case W:
61
- return o.displayName || "Context";
62
60
  case I:
63
- return (o._context.displayName || "Context") + ".Consumer";
64
- case U:
65
- var w = o.render;
66
- return o = o.displayName, o || (o = w.displayName || w.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
61
+ return a.displayName || "Context";
67
62
  case D:
68
- return w = o.displayName || null, w !== null ? w : e(o.type) || "Memo";
69
- case X:
70
- w = o._payload, o = o._init;
63
+ return (a._context.displayName || "Context") + ".Consumer";
64
+ case B:
65
+ var w = a.render;
66
+ return a = a.displayName, a || (a = w.displayName || w.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
67
+ case P:
68
+ return w = a.displayName || null, w !== null ? w : e(a.type) || "Memo";
69
+ case V:
70
+ w = a._payload, a = a._init;
71
71
  try {
72
- return e(o(w));
72
+ return e(a(w));
73
73
  } catch {
74
74
  }
75
75
  }
76
76
  return null;
77
77
  }
78
- function t(o) {
79
- return "" + o;
78
+ function t(a) {
79
+ return "" + a;
80
80
  }
81
- function r(o) {
81
+ function r(a) {
82
82
  try {
83
- t(o);
83
+ t(a);
84
84
  var w = !1;
85
85
  } catch {
86
86
  w = !0;
87
87
  }
88
88
  if (w) {
89
89
  w = console;
90
- var A = w.error, j = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
90
+ var A = w.error, L = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
91
91
  return A.call(
92
92
  w,
93
93
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
94
- j
95
- ), t(o);
94
+ L
95
+ ), t(a);
96
96
  }
97
97
  }
98
- function n(o) {
99
- if (o === N) return "<>";
100
- if (typeof o == "object" && o !== null && o.$$typeof === X)
98
+ function n(a) {
99
+ if (a === x) return "<>";
100
+ if (typeof a == "object" && a !== null && a.$$typeof === V)
101
101
  return "<...>";
102
102
  try {
103
- var w = e(o);
103
+ var w = e(a);
104
104
  return w ? "<" + w + ">" : "<...>";
105
105
  } catch {
106
106
  return "<...>";
107
107
  }
108
108
  }
109
109
  function c() {
110
- var o = s.A;
111
- return o === null ? null : o.getOwner();
110
+ var a = o.A;
111
+ return a === null ? null : a.getOwner();
112
112
  }
113
- function u() {
113
+ function i() {
114
114
  return Error("react-stack-top-frame");
115
115
  }
116
- function l(o) {
117
- if (_.call(o, "key")) {
118
- var w = Object.getOwnPropertyDescriptor(o, "key").get;
116
+ function l(a) {
117
+ if (v.call(a, "key")) {
118
+ var w = Object.getOwnPropertyDescriptor(a, "key").get;
119
119
  if (w && w.isReactWarning) return !1;
120
120
  }
121
- return o.key !== void 0;
121
+ return a.key !== void 0;
122
122
  }
123
- function a(o, w) {
123
+ function d(a, w) {
124
124
  function A() {
125
- d || (d = !0, console.error(
125
+ u || (u = !0, console.error(
126
126
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
127
127
  w
128
128
  ));
129
129
  }
130
- A.isReactWarning = !0, Object.defineProperty(o, "key", {
130
+ A.isReactWarning = !0, Object.defineProperty(a, "key", {
131
131
  get: A,
132
132
  configurable: !0
133
133
  });
134
134
  }
135
- function p() {
136
- var o = e(this.type);
137
- return h[o] || (h[o] = !0, console.error(
135
+ function y() {
136
+ var a = e(this.type);
137
+ return f[a] || (f[a] = !0, console.error(
138
138
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
139
- )), o = this.props.ref, o !== void 0 ? o : null;
139
+ )), a = this.props.ref, a !== void 0 ? a : null;
140
140
  }
141
- function g(o, w, A, j, B, O) {
142
- var L = A.ref;
143
- return o = {
141
+ function h(a, w, A, L, F, O) {
142
+ var $ = A.ref;
143
+ return a = {
144
144
  $$typeof: R,
145
- type: o,
145
+ type: a,
146
146
  key: w,
147
147
  props: A,
148
- _owner: j
149
- }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(o, "ref", {
148
+ _owner: L
149
+ }, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(a, "ref", {
150
150
  enumerable: !1,
151
- get: p
152
- }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
151
+ get: y
152
+ }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
153
153
  configurable: !1,
154
154
  enumerable: !1,
155
155
  writable: !0,
156
156
  value: 0
157
- }), Object.defineProperty(o, "_debugInfo", {
157
+ }), Object.defineProperty(a, "_debugInfo", {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
161
  value: null
162
- }), Object.defineProperty(o, "_debugStack", {
162
+ }), Object.defineProperty(a, "_debugStack", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: B
167
- }), Object.defineProperty(o, "_debugTask", {
166
+ value: F
167
+ }), Object.defineProperty(a, "_debugTask", {
168
168
  configurable: !1,
169
169
  enumerable: !1,
170
170
  writable: !0,
171
171
  value: O
172
- }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
172
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
173
173
  }
174
- function x(o, w, A, j, B, O) {
175
- var L = w.children;
176
- if (L !== void 0)
177
- if (j)
178
- if (k(L)) {
179
- for (j = 0; j < L.length; j++)
180
- M(L[j]);
181
- Object.freeze && Object.freeze(L);
174
+ function k(a, w, A, L, F, O) {
175
+ var $ = w.children;
176
+ if ($ !== void 0)
177
+ if (L)
178
+ if (p($)) {
179
+ for (L = 0; L < $.length; L++)
180
+ j($[L]);
181
+ Object.freeze && Object.freeze($);
182
182
  } else
183
183
  console.error(
184
184
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
185
185
  );
186
- else M(L);
187
- if (_.call(w, "key")) {
188
- L = e(o);
186
+ else j($);
187
+ if (v.call(w, "key")) {
188
+ $ = e(a);
189
189
  var J = Object.keys(w).filter(function(oe) {
190
190
  return oe !== "key";
191
191
  });
192
- j = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", b[L + j] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
192
+ L = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", C[$ + L] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
193
193
  `A props object containing a "key" prop is being spread into JSX:
194
194
  let props = %s;
195
195
  <%s {...props} />
196
196
  React keys must be passed directly to JSX without using spread:
197
197
  let props = %s;
198
198
  <%s key={someKey} {...props} />`,
199
- j,
200
199
  L,
200
+ $,
201
201
  J,
202
- L
203
- ), b[L + j] = !0);
202
+ $
203
+ ), C[$ + L] = !0);
204
204
  }
205
- if (L = null, A !== void 0 && (r(A), L = "" + A), l(w) && (r(w.key), L = "" + w.key), "key" in w) {
205
+ if ($ = null, A !== void 0 && (r(A), $ = "" + A), l(w) && (r(w.key), $ = "" + w.key), "key" in w) {
206
206
  A = {};
207
- for (var Q in w)
208
- Q !== "key" && (A[Q] = w[Q]);
207
+ for (var Z in w)
208
+ Z !== "key" && (A[Z] = w[Z]);
209
209
  } else A = w;
210
- return L && a(
210
+ return $ && d(
211
211
  A,
212
- typeof o == "function" ? o.displayName || o.name || "Unknown" : o
213
- ), g(
214
- o,
215
- L,
212
+ typeof a == "function" ? a.displayName || a.name || "Unknown" : a
213
+ ), h(
214
+ a,
215
+ $,
216
216
  A,
217
217
  c(),
218
- B,
218
+ F,
219
219
  O
220
220
  );
221
221
  }
222
- function M(o) {
223
- m(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === X && (o._payload.status === "fulfilled" ? m(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
222
+ function j(a) {
223
+ m(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === V && (a._payload.status === "fulfilled" ? m(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._store.validated = 1));
224
224
  }
225
- function m(o) {
226
- return typeof o == "object" && o !== null && o.$$typeof === R;
225
+ function m(a) {
226
+ return typeof a == "object" && a !== null && a.$$typeof === R;
227
227
  }
228
- var T = Qe, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), H = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), W = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), D = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), v = /* @__PURE__ */ Symbol.for("react.client.reference"), s = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, k = Array.isArray, i = console.createTask ? console.createTask : function() {
228
+ var T = et, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), H = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), S = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), q = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), V = /* @__PURE__ */ Symbol.for("react.lazy"), K = /* @__PURE__ */ Symbol.for("react.activity"), b = /* @__PURE__ */ Symbol.for("react.client.reference"), o = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, v = Object.prototype.hasOwnProperty, p = Array.isArray, s = console.createTask ? console.createTask : function() {
229
229
  return null;
230
230
  };
231
231
  T = {
232
- react_stack_bottom_frame: function(o) {
233
- return o();
232
+ react_stack_bottom_frame: function(a) {
233
+ return a();
234
234
  }
235
235
  };
236
- var d, h = {}, f = T.react_stack_bottom_frame.bind(
236
+ var u, f = {}, g = T.react_stack_bottom_frame.bind(
237
237
  T,
238
- u
239
- )(), y = i(n(u)), b = {};
240
- xe.Fragment = N, xe.jsx = function(o, w, A) {
241
- var j = 1e4 > s.recentlyCreatedOwnerStacks++;
242
- return x(
243
- o,
238
+ i
239
+ )(), _ = s(n(i)), C = {};
240
+ Se.Fragment = x, Se.jsx = function(a, w, A) {
241
+ var L = 1e4 > o.recentlyCreatedOwnerStacks++;
242
+ return k(
243
+ a,
244
244
  w,
245
245
  A,
246
246
  !1,
247
- j ? Error("react-stack-top-frame") : f,
248
- j ? i(n(o)) : y
247
+ L ? Error("react-stack-top-frame") : g,
248
+ L ? s(n(a)) : _
249
249
  );
250
- }, xe.jsxs = function(o, w, A) {
251
- var j = 1e4 > s.recentlyCreatedOwnerStacks++;
252
- return x(
253
- o,
250
+ }, Se.jsxs = function(a, w, A) {
251
+ var L = 1e4 > o.recentlyCreatedOwnerStacks++;
252
+ return k(
253
+ a,
254
254
  w,
255
255
  A,
256
256
  !0,
257
- j ? Error("react-stack-top-frame") : f,
258
- j ? i(n(o)) : y
257
+ L ? Error("react-stack-top-frame") : g,
258
+ L ? s(n(a)) : _
259
259
  );
260
260
  };
261
- })()), xe;
262
- }
263
- var st;
264
- function rr() {
265
- return st || (st = 1, process.env.NODE_ENV === "production" ? Ee.exports = er() : Ee.exports = tr()), Ee.exports;
261
+ })()), Se;
266
262
  }
267
- var S = rr(), Te = { exports: {} }, ze = {};
268
- var at;
269
- function nr() {
270
- if (at) return ze;
271
- at = 1;
272
- var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
273
- return ze.c = function(t) {
263
+ var lt;
264
+ function ur() {
265
+ return lt || (lt = 1, process.env.NODE_ENV === "production" ? je.exports = cr() : je.exports = lr()), je.exports;
266
+ }
267
+ var E = ur(), Ne = { exports: {} }, Ue = {};
268
+ var ut;
269
+ function dr() {
270
+ if (ut) return Ue;
271
+ ut = 1;
272
+ var e = et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
273
+ return Ue.c = function(t) {
274
274
  return e.H.useMemoCache(t);
275
- }, ze;
276
- }
277
- var Fe = {};
278
- var ct;
279
- function or() {
280
- return ct || (ct = 1, process.env.NODE_ENV !== "production" && (function() {
281
- var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
282
- Fe.c = function(t) {
275
+ }, Ue;
276
+ }
277
+ var Ye = {};
278
+ var dt;
279
+ function fr() {
280
+ return dt || (dt = 1, process.env.NODE_ENV !== "production" && (function() {
281
+ var e = et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
282
+ Ye.c = function(t) {
283
283
  var r = e.H;
284
284
  return r === null && console.error(
285
285
  `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
@@ -289,27 +289,27 @@ function or() {
289
289
  See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
290
290
  ), r.useMemoCache(t);
291
291
  };
292
- })()), Fe;
292
+ })()), Ye;
293
293
  }
294
- var lt;
295
- function ir() {
296
- return lt || (lt = 1, process.env.NODE_ENV === "production" ? Te.exports = nr() : Te.exports = or()), Te.exports;
294
+ var ft;
295
+ function gr() {
296
+ return ft || (ft = 1, process.env.NODE_ENV === "production" ? Ne.exports = dr() : Ne.exports = fr()), Ne.exports;
297
297
  }
298
- var be = ir();
299
- function wt(e) {
298
+ var Ce = gr();
299
+ function Et(e) {
300
300
  return typeof document > "u" ? null : e?.closest("[data-ov-theme]") ?? e ?? document.documentElement;
301
301
  }
302
- function Ze(e) {
303
- const t = wt(e);
302
+ function tt(e) {
303
+ const t = Et(e);
304
304
  return t ? getComputedStyle(t) : null;
305
305
  }
306
- function io(e, t) {
307
- return Ze(t)?.getPropertyValue(e).trim() ?? "";
306
+ function To(e, t) {
307
+ return tt(t)?.getPropertyValue(e).trim() ?? "";
308
308
  }
309
- function Ke() {
310
- const e = be.c(2), {
309
+ function rt() {
310
+ const e = Ce.c(2), {
311
311
  activeTheme: t
312
- } = zt();
312
+ } = Jt();
313
313
  let r;
314
314
  return e[0] !== t ? (r = {
315
315
  id: t.id,
@@ -317,22 +317,22 @@ function Ke() {
317
317
  registration: t
318
318
  }, e[0] = t, e[1] = r) : r = e[1], r;
319
319
  }
320
- const sr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, ar = /^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+))?\s*\)$/i;
320
+ const mr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, hr = /^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+))?\s*\)$/i;
321
321
  function he(e) {
322
322
  return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
323
323
  }
324
- function Ve(e) {
324
+ function Ge(e) {
325
325
  const t = e.trim();
326
- if (sr.test(t)) return t;
327
- const r = t.match(ar);
326
+ if (mr.test(t)) return t;
327
+ const r = t.match(hr);
328
328
  if (!r) return "";
329
329
  const n = r[4] === void 0 ? 1 : Number(r[4]), c = `#${he(Number(r[1]))}${he(Number(r[2]))}${he(Number(r[3]))}`;
330
330
  return n >= 1 ? c : `${c}${he(n * 255)}`;
331
331
  }
332
- function cr(e) {
332
+ function pr(e) {
333
333
  if (!e)
334
334
  return {
335
- normalize: Ve,
335
+ normalize: Ge,
336
336
  dispose() {
337
337
  }
338
338
  };
@@ -341,19 +341,19 @@ function cr(e) {
341
341
  let r;
342
342
  return {
343
343
  normalize(n) {
344
- const c = Ve(n);
344
+ const c = Ge(n);
345
345
  if (c) return c;
346
346
  if (t.style.color = "", t.style.color = n.trim(), !t.style.color) return "";
347
- const u = getComputedStyle(t).color, l = Ve(u);
347
+ const i = getComputedStyle(t).color, l = Ge(i);
348
348
  if (l) return l;
349
- if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(u)) return "";
349
+ if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(i)) return "";
350
350
  try {
351
351
  if (r ??= t.getContext("2d", {
352
352
  willReadFrequently: !0
353
- }), !r || (r.clearRect(0, 0, 1, 1), r.fillStyle = "#010203", r.fillStyle = u, r.fillStyle === "#010203")) return "";
353
+ }), !r || (r.clearRect(0, 0, 1, 1), r.fillStyle = "#010203", r.fillStyle = i, r.fillStyle === "#010203")) return "";
354
354
  r.fillRect(0, 0, 1, 1);
355
- const a = r.getImageData(0, 0, 1, 1).data, p = `#${he(a[0])}${he(a[1])}${he(a[2])}`;
356
- return a[3] === 255 ? p : `${p}${he(a[3])}`;
355
+ const d = r.getImageData(0, 0, 1, 1).data, y = `#${he(d[0])}${he(d[1])}${he(d[2])}`;
356
+ return d[3] === 255 ? y : `${y}${he(d[3])}`;
357
357
  } catch {
358
358
  return "";
359
359
  }
@@ -363,7 +363,7 @@ function cr(e) {
363
363
  }
364
364
  };
365
365
  }
366
- function lr(e) {
366
+ function yr(e) {
367
367
  switch (e) {
368
368
  case "light":
369
369
  case "solarized-light":
@@ -376,30 +376,30 @@ function lr(e) {
376
376
  return "vs-dark";
377
377
  }
378
378
  }
379
- function ur(e, t, r, n, c, u) {
379
+ function vr(e, t, r, n, c, i) {
380
380
  const l = n.normalize(r?.getPropertyValue(t).trim() ?? "");
381
381
  if (!l) return null;
382
- const a = {
382
+ const d = {
383
383
  token: e,
384
384
  foreground: l.slice(1)
385
385
  };
386
- return c && (a.fontStyle = r?.getPropertyValue(c).trim() || u || ""), a;
386
+ return c && (d.fontStyle = r?.getPropertyValue(c).trim() || i || ""), d;
387
387
  }
388
- function dr(e) {
388
+ function br(e) {
389
389
  const t = {};
390
390
  for (const [r, n] of Object.entries(e))
391
391
  n && (t[r] = n);
392
392
  return t;
393
393
  }
394
- function Oe(e, t) {
395
- const r = wt(t), n = Ze(r), c = cr(r), u = (a, p, g, x) => ur(a, p, n, c, g, x), l = (a) => c.normalize(n?.getPropertyValue(a).trim() ?? "");
394
+ function $e(e, t) {
395
+ const r = Et(t), n = tt(r), c = pr(r), i = (d, y, h, k) => vr(d, y, n, c, h, k), l = (d) => c.normalize(n?.getPropertyValue(d).trim() ?? "");
396
396
  try {
397
- const a = [u("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), u("string", "--ov-syntax-string"), u("string.escape", "--ov-syntax-string-escape"), u("number", "--ov-syntax-number"), u("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), u("keyword.control", "--ov-syntax-keyword-control"), u("keyword.operator", "--ov-syntax-keyword-operator"), u("type", "--ov-syntax-type", "--ov-syntax-style-type"), u("type.identifier", "--ov-syntax-type"), u("class", "--ov-syntax-class"), u("interface", "--ov-syntax-interface"), u("function", "--ov-syntax-function", "--ov-syntax-style-function"), u("function.declaration", "--ov-syntax-function"), u("method", "--ov-syntax-method"), u("variable", "--ov-syntax-variable"), u("parameter", "--ov-syntax-parameter"), u("property", "--ov-syntax-property"), u("namespace", "--ov-syntax-namespace"), u("decorator", "--ov-syntax-decorator"), u("regexp", "--ov-syntax-regexp"), u("operator", "--ov-syntax-operator"), u("delimiter", "--ov-syntax-punctuation"), u("delimiter.bracket", "--ov-syntax-punctuation")].filter((p) => p !== null);
397
+ const d = [i("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), i("string", "--ov-syntax-string"), i("string.escape", "--ov-syntax-string-escape"), i("number", "--ov-syntax-number"), i("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), i("keyword.control", "--ov-syntax-keyword-control"), i("keyword.operator", "--ov-syntax-keyword-operator"), i("type", "--ov-syntax-type", "--ov-syntax-style-type"), i("type.identifier", "--ov-syntax-type"), i("class", "--ov-syntax-class"), i("interface", "--ov-syntax-interface"), i("function", "--ov-syntax-function", "--ov-syntax-style-function"), i("function.declaration", "--ov-syntax-function"), i("method", "--ov-syntax-method"), i("variable", "--ov-syntax-variable"), i("parameter", "--ov-syntax-parameter"), i("property", "--ov-syntax-property"), i("namespace", "--ov-syntax-namespace"), i("decorator", "--ov-syntax-decorator"), i("regexp", "--ov-syntax-regexp"), i("operator", "--ov-syntax-operator"), i("delimiter", "--ov-syntax-punctuation"), i("delimiter.bracket", "--ov-syntax-punctuation")].filter((y) => y !== null);
398
398
  return {
399
- base: lr(e),
399
+ base: yr(e),
400
400
  inherit: !0,
401
- rules: a,
402
- colors: dr({
401
+ rules: d,
402
+ colors: br({
403
403
  "editor.background": l("--ov-color-editor-bg"),
404
404
  "editor.foreground": l("--ov-color-editor-fg"),
405
405
  "editorCursor.foreground": l("--ov-color-editor-cursor"),
@@ -442,7 +442,7 @@ function Oe(e, t) {
442
442
  c.dispose();
443
443
  }
444
444
  }
445
- const ge = "ov-theme", fr = {
445
+ const pe = "ov-theme", wr = {
446
446
  js: "javascript",
447
447
  jsx: "javascript",
448
448
  ts: "typescript",
@@ -501,32 +501,32 @@ const ge = "ov-theme", fr = {
501
501
  vue: "html",
502
502
  svelte: "html"
503
503
  };
504
- function mr(e) {
504
+ function _r(e) {
505
505
  const t = e.toLowerCase(), r = t.split("/").pop() ?? t;
506
506
  if (r === "dockerfile") return "dockerfile";
507
507
  if (r === "makefile") return "makefile";
508
508
  const n = r.split(".").pop();
509
509
  if (n)
510
- return fr[n];
510
+ return wr[n];
511
511
  }
512
512
  function se(...e) {
513
513
  }
514
- function hr(e, t) {
515
- let r = 0, n = 0, c = -1, u = -1;
514
+ function Cr(e, t) {
515
+ let r = 0, n = 0, c = -1, i = -1;
516
516
  for (; n < t.length; )
517
517
  if (r < e.length && (e[r] === t[n] || e[r] === "?"))
518
518
  r++, n++;
519
519
  else if (r < e.length && e[r] === "*")
520
- c = r, u = n, r++;
520
+ c = r, i = n, r++;
521
521
  else if (c >= 0)
522
- r = c + 1, u++, n = u;
522
+ r = c + 1, i++, n = i;
523
523
  else
524
524
  return !1;
525
525
  for (; r < e.length && e[r] === "*"; )
526
526
  r++;
527
527
  return r === e.length;
528
528
  }
529
- class gr {
529
+ class xr {
530
530
  _schemas = /* @__PURE__ */ new Map();
531
531
  _listeners = /* @__PURE__ */ new Set();
532
532
  _yamlHandle = null;
@@ -570,7 +570,7 @@ class gr {
570
570
  * model URI string. Uses the same glob-like matching that monaco-yaml uses.
571
571
  */
572
572
  getSchemasForUri(t) {
573
- return this.schemas.filter((r) => r.fileMatch.some((n) => hr(n, t)));
573
+ return this.schemas.filter((r) => r.fileMatch.some((n) => Cr(n, t)));
574
574
  }
575
575
  /** Whether the YAML handle has been injected (workers initialized). */
576
576
  get isYamlReady() {
@@ -615,10 +615,10 @@ class gr {
615
615
  applyJsonSchemas(t) {
616
616
  const r = t, n = {
617
617
  validate: !0,
618
- schemas: this.schemas.map((u) => ({
619
- uri: u.uri,
620
- fileMatch: u.fileMatch,
621
- schema: u.schema
618
+ schemas: this.schemas.map((i) => ({
619
+ uri: i.uri,
620
+ fileMatch: i.fileMatch,
621
+ schema: i.schema
622
622
  }))
623
623
  }, c = r.json?.jsonDefaults ?? r.languages?.json?.jsonDefaults;
624
624
  se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(n);
@@ -640,42 +640,42 @@ class gr {
640
640
  }
641
641
  }
642
642
  }
643
- const fe = new gr(), pr = "_Root_1729c_1", yr = "_Inner_1729c_17", ut = {
644
- Root: pr,
645
- Inner: yr
643
+ const fe = new xr(), kr = "_Root_1729c_1", Rr = "_Inner_1729c_17", gt = {
644
+ Root: kr,
645
+ Inner: Rr
646
646
  };
647
- function Me(...e) {
647
+ function Pe(...e) {
648
648
  }
649
- function vr(...e) {
649
+ function Sr(...e) {
650
650
  return e.filter(Boolean).join(" ");
651
651
  }
652
- function dt(e, t, r) {
652
+ function mt(e, t, r) {
653
653
  if (r) {
654
- const n = $.Uri.parse(r);
655
- Me("getOrCreateModel — parsed URI:", n.toString(), "| language:", t);
656
- const c = $.editor.getModel(n);
657
- return c || $.editor.createModel(e, t, n);
654
+ const n = W.Uri.parse(r);
655
+ Pe("getOrCreateModel — parsed URI:", n.toString(), "| language:", t);
656
+ const c = W.editor.getModel(n);
657
+ return c || W.editor.createModel(e, t, n);
658
658
  }
659
- return $.editor.createModel(e, t);
659
+ return W.editor.createModel(e, t);
660
660
  }
661
- function _t(e) {
661
+ function Tt(e) {
662
662
  switch (e) {
663
- case $.MarkerSeverity.Error:
663
+ case W.MarkerSeverity.Error:
664
664
  return "error";
665
- case $.MarkerSeverity.Warning:
665
+ case W.MarkerSeverity.Warning:
666
666
  return "warning";
667
- case $.MarkerSeverity.Info:
667
+ case W.MarkerSeverity.Info:
668
668
  return "info";
669
669
  default:
670
670
  return "hint";
671
671
  }
672
672
  }
673
- function ft(e) {
674
- return $.editor.getModelMarkers({
673
+ function ht(e) {
674
+ return W.editor.getModelMarkers({
675
675
  resource: e.uri
676
676
  }).map((t) => ({
677
677
  message: t.message,
678
- severity: _t(t.severity),
678
+ severity: Tt(t.severity),
679
679
  startLineNumber: t.startLineNumber,
680
680
  startColumn: t.startColumn,
681
681
  endLineNumber: t.endLineNumber,
@@ -684,39 +684,39 @@ function ft(e) {
684
684
  code: typeof t.code == "string" ? t.code : t.code?.value
685
685
  }));
686
686
  }
687
- const br = ve(function({
687
+ const Mt = _e(function({
688
688
  value: t,
689
689
  onChange: r,
690
690
  onMount: n,
691
691
  onDiagnostics: c,
692
- onCursorChange: u,
692
+ onCursorChange: i,
693
693
  language: l,
694
- filename: a,
695
- readOnly: p = !1,
696
- lineNumbers: g = !0,
697
- minimap: x = !1,
698
- wordWrap: M = !1,
694
+ filename: d,
695
+ readOnly: y = !1,
696
+ lineNumbers: h = !0,
697
+ minimap: k = !1,
698
+ wordWrap: j = !1,
699
699
  tabSize: m = 2,
700
700
  diagnostics: T = !1,
701
701
  quickSuggestions: R = !1,
702
702
  syntaxHighlighting: H = !0,
703
- height: N = "100%",
704
- width: q = "100%",
705
- bordered: C = !0,
706
- className: I
707
- }, W) {
708
- const U = Ke(), P = Y(null), F = Y(null), [D, X] = Pe(!1), ne = Y(!1), v = Y(null), s = Y(null), _ = Y(null), k = l ?? (a ? mr(a) : void 0), i = Ae(() => {
709
- if (k === "json" && t)
703
+ height: x = "100%",
704
+ width: z = "100%",
705
+ bordered: S = !0,
706
+ className: D
707
+ }, I) {
708
+ const B = rt(), N = G(null), q = G(null), [P, V] = me(!1), K = G(!1), b = G(null), o = G(null), v = G(null), p = l ?? (d ? _r(d) : void 0), s = Oe(() => {
709
+ if (p === "json" && t)
710
710
  try {
711
711
  return JSON.stringify(JSON.parse(t), null, 2);
712
712
  } catch {
713
713
  return t;
714
714
  }
715
715
  return t;
716
- }, [k, t]);
717
- V(() => {
718
- if (!F.current) return;
719
- $.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge), $.languages.typescript.typescriptDefaults.setCompilerOptions({
716
+ }, [p, t]);
717
+ U(() => {
718
+ if (!q.current) return;
719
+ W.editor.defineTheme(pe, $e(B.base, q.current)), W.editor.setTheme(pe), W.languages.typescript.typescriptDefaults.setCompilerOptions({
720
720
  jsx: 2,
721
721
  // JsxEmit.React
722
722
  jsxFactory: "React.createElement",
@@ -725,16 +725,16 @@ const br = ve(function({
725
725
  target: 99
726
726
  // ESNext
727
727
  });
728
- const f = dt(i, H ? k : "plaintext", a);
729
- Me(" model created — uri:", f.uri.toString());
730
- const y = $.editor.create(F.current, {
731
- model: f,
732
- readOnly: p,
733
- lineNumbers: g ? "on" : "off",
728
+ const g = mt(s, H ? p : "plaintext", d);
729
+ Pe(" model created — uri:", g.uri.toString());
730
+ const _ = W.editor.create(q.current, {
731
+ model: g,
732
+ readOnly: y,
733
+ lineNumbers: h ? "on" : "off",
734
734
  minimap: {
735
- enabled: x
735
+ enabled: k
736
736
  },
737
- wordWrap: M ? "on" : "off",
737
+ wordWrap: j ? "on" : "off",
738
738
  quickSuggestions: R ? {
739
739
  other: !0,
740
740
  strings: !0,
@@ -747,34 +747,34 @@ const br = ve(function({
747
747
  tabSize: m,
748
748
  renderValidationDecorations: T ? "on" : "off"
749
749
  });
750
- return P.current = y, fe.applyYamlSchemas(), fe.applyJsonSchemas($), n?.(y, $), X(!0), () => {
751
- v.current?.dispose(), v.current = null, s.current?.dispose(), s.current = null, _.current?.dispose(), _.current = null;
752
- const b = y.getModel();
753
- y.setModel(null), b?.dispose(), y.dispose(), P.current = null, X(!1);
750
+ return N.current = _, fe.applyYamlSchemas(), fe.applyJsonSchemas(W), n?.(_, W), V(!0), () => {
751
+ b.current?.dispose(), b.current = null, o.current?.dispose(), o.current = null, v.current?.dispose(), v.current = null;
752
+ const C = _.getModel();
753
+ _.setModel(null), C?.dispose(), _.dispose(), N.current = null, V(!1);
754
754
  };
755
- }, []), V(() => {
756
- const f = P.current;
757
- if (!(!f || !D || i === void 0)) {
758
- if (f.getOption($.editor.EditorOption.readOnly))
759
- f.setValue(i);
760
- else if (i !== f.getValue()) {
761
- const y = f.getModel();
762
- if (!y) return;
763
- ne.current = !0, f.executeEdits("", [{
764
- range: y.getFullModelRange(),
765
- text: i,
755
+ }, []), U(() => {
756
+ const g = N.current;
757
+ if (!(!g || !P || s === void 0)) {
758
+ if (g.getOption(W.editor.EditorOption.readOnly))
759
+ g.setValue(s);
760
+ else if (s !== g.getValue()) {
761
+ const _ = g.getModel();
762
+ if (!_) return;
763
+ K.current = !0, g.executeEdits("", [{
764
+ range: _.getFullModelRange(),
765
+ text: s,
766
766
  forceMoveMarkers: !0
767
- }]), f.pushUndoStop(), ne.current = !1;
767
+ }]), g.pushUndoStop(), K.current = !1;
768
768
  }
769
769
  }
770
- }, [i, D]), V(() => {
771
- !P.current || !D || P.current.updateOptions({
772
- readOnly: p,
773
- lineNumbers: g ? "on" : "off",
770
+ }, [s, P]), U(() => {
771
+ !N.current || !P || N.current.updateOptions({
772
+ readOnly: y,
773
+ lineNumbers: h ? "on" : "off",
774
774
  minimap: {
775
- enabled: x
775
+ enabled: k
776
776
  },
777
- wordWrap: M ? "on" : "off",
777
+ wordWrap: j ? "on" : "off",
778
778
  quickSuggestions: R ? {
779
779
  other: !0,
780
780
  strings: !0,
@@ -783,181 +783,184 @@ const br = ve(function({
783
783
  tabSize: m,
784
784
  renderValidationDecorations: T ? "on" : "off"
785
785
  });
786
- }, [p, g, x, M, R, m, T, D]), V(() => {
787
- if (!P.current || !D) return;
788
- const f = P.current.getModel();
789
- if (f) {
790
- const y = H ? k ?? "plaintext" : "plaintext";
791
- $.editor.setModelLanguage(f, y);
792
- }
793
- }, [k, H, D]);
794
- const d = Y(a);
795
- V(() => {
796
- const f = P.current;
797
- if (!f || !D || d.current === a) return;
798
- Me("filename changed:", d.current, "→", a), d.current = a;
799
- const y = f.getModel(), b = y?.getValue?.() ?? i;
800
- f.setModel(null), y?.dispose();
801
- const o = dt(b, H ? k : "plaintext", a);
802
- f.setModel(o), Me(" new model set — uri:", o.uri.toString());
803
- }, [a, D, k, H, i]), V(() => {
804
- D && ($.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge));
805
- }, [D, U.registration]), V(() => {
806
- !P.current || !D || (v.current?.dispose(), r && (v.current = P.current.onDidChangeModelContent(() => {
807
- ne.current || r(P.current.getValue());
786
+ }, [y, h, k, j, R, m, T, P]), U(() => {
787
+ if (!N.current || !P) return;
788
+ const g = N.current.getModel();
789
+ if (g) {
790
+ const _ = H ? p ?? "plaintext" : "plaintext";
791
+ W.editor.setModelLanguage(g, _);
792
+ }
793
+ }, [p, H, P]);
794
+ const u = G(d);
795
+ U(() => {
796
+ const g = N.current;
797
+ if (!g || !P || u.current === d) return;
798
+ Pe("filename changed:", u.current, "→", d), u.current = d;
799
+ const _ = g.getModel(), C = _?.getValue?.() ?? s;
800
+ g.setModel(null), _?.dispose();
801
+ const a = mt(C, H ? p : "plaintext", d);
802
+ g.setModel(a), Pe(" new model set — uri:", a.uri.toString());
803
+ }, [d, P, p, H, s]), U(() => {
804
+ P && (W.editor.defineTheme(pe, $e(B.base, q.current)), W.editor.setTheme(pe));
805
+ }, [P, B.registration]), U(() => {
806
+ !N.current || !P || (b.current?.dispose(), r && (b.current = N.current.onDidChangeModelContent(() => {
807
+ K.current || r(N.current.getValue());
808
808
  })));
809
- }, [r, D]), V(() => {
810
- D && (s.current?.dispose(), c && (s.current = $.editor.onDidChangeMarkers((f) => {
811
- const y = P.current?.getModel();
812
- if (!y) return;
813
- const b = y.uri.toString();
814
- f.some((o) => o.toString() === b) && c(ft(y));
809
+ }, [r, P]), U(() => {
810
+ P && (o.current?.dispose(), c && (o.current = W.editor.onDidChangeMarkers((g) => {
811
+ const _ = N.current?.getModel();
812
+ if (!_) return;
813
+ const C = _.uri.toString();
814
+ g.some((a) => a.toString() === C) && c(ht(_));
815
815
  })));
816
- }, [c, D]), V(() => {
817
- !P.current || !D || (_.current?.dispose(), u && (_.current = P.current.onDidChangeCursorPosition((f) => {
818
- u({
819
- lineNumber: f.position.lineNumber,
820
- column: f.position.column
816
+ }, [c, P]), U(() => {
817
+ !N.current || !P || (v.current?.dispose(), i && (v.current = N.current.onDidChangeCursorPosition((g) => {
818
+ i({
819
+ lineNumber: g.position.lineNumber,
820
+ column: g.position.column
821
821
  });
822
822
  })));
823
- }, [u, D]), V(() => {
824
- if (D)
823
+ }, [i, P]), U(() => {
824
+ if (P)
825
825
  return fe.onChange(() => {
826
- fe.applyYamlSchemas(), fe.applyJsonSchemas($);
826
+ fe.applyYamlSchemas(), fe.applyJsonSchemas(W);
827
827
  });
828
- }, [D]), vt(W, () => ({
829
- getEditor: () => P.current,
830
- getMonaco: () => $,
831
- focus: () => P.current?.focus(),
828
+ }, [P]), xt(I, () => ({
829
+ getEditor: () => N.current,
830
+ getMonaco: () => W,
831
+ focus: () => N.current?.focus(),
832
832
  getDiagnostics: () => {
833
- const f = P.current?.getModel();
834
- return f ? ft(f) : [];
833
+ const g = N.current?.getModel();
834
+ return g ? ht(g) : [];
835
835
  },
836
836
  getDebugState: () => {
837
- const f = P.current, y = f?.getModel() ?? null, b = y ? $.editor.getModelMarkers({
838
- resource: y.uri
839
- }) : [], o = y?.uri.toString() ?? null, w = {
837
+ const g = N.current, _ = g?.getModel() ?? null, C = _ ? W.editor.getModelMarkers({
838
+ resource: _.uri
839
+ }) : [], a = _?.uri.toString() ?? null, w = {
840
840
  error: 0,
841
841
  warning: 0,
842
842
  info: 0,
843
843
  hint: 0
844
844
  }, A = {};
845
- for (const L of b) {
846
- const J = _t(L.severity);
845
+ for (const $ of C) {
846
+ const J = Tt($.severity);
847
847
  w[J]++;
848
- const Q = L.source ?? "unknown";
849
- A[Q] = (A[Q] ?? 0) + 1;
848
+ const Z = $.source ?? "unknown";
849
+ A[Z] = (A[Z] ?? 0) + 1;
850
850
  }
851
- const j = o ? fe.getSchemasForUri(o).map((L) => ({
852
- uri: L.uri,
853
- name: L.name,
854
- fileMatch: L.fileMatch
855
- })) : [], B = f?.getPosition() ?? null, O = f?.getSelections() ?? [];
851
+ const L = a ? fe.getSchemasForUri(a).map(($) => ({
852
+ uri: $.uri,
853
+ name: $.name,
854
+ fileMatch: $.fileMatch
855
+ })) : [], F = g?.getPosition() ?? null, O = g?.getSelections() ?? [];
856
856
  return {
857
- modelUri: o,
858
- modelLanguage: y?.getLanguageId() ?? null,
859
- modelLineCount: y?.getLineCount() ?? 0,
860
- modelContentLength: y?.getValueLength() ?? 0,
861
- modelVersionId: y?.getVersionId() ?? 0,
862
- modelEOL: y?.getEOL() ?? null,
863
- cursorPosition: B ? {
864
- lineNumber: B.lineNumber,
865
- column: B.column
857
+ modelUri: a,
858
+ modelLanguage: _?.getLanguageId() ?? null,
859
+ modelLineCount: _?.getLineCount() ?? 0,
860
+ modelContentLength: _?.getValueLength() ?? 0,
861
+ modelVersionId: _?.getVersionId() ?? 0,
862
+ modelEOL: _?.getEOL() ?? null,
863
+ cursorPosition: F ? {
864
+ lineNumber: F.lineNumber,
865
+ column: F.column
866
866
  } : null,
867
- selections: O.map((L) => ({
868
- startLineNumber: L.startLineNumber,
869
- startColumn: L.startColumn,
870
- endLineNumber: L.endLineNumber,
871
- endColumn: L.endColumn
867
+ selections: O.map(($) => ({
868
+ startLineNumber: $.startLineNumber,
869
+ startColumn: $.startColumn,
870
+ endLineNumber: $.endLineNumber,
871
+ endColumn: $.endColumn
872
872
  })),
873
- diagnosticsTotal: b.length,
873
+ diagnosticsTotal: C.length,
874
874
  diagnosticsBySeverity: w,
875
875
  diagnosticsBySource: A,
876
876
  registeredSchemaCount: fe.schemas.length,
877
- matchingSchemas: j,
878
- isReadOnly: f?.getOption($.editor.EditorOption.readOnly) ?? !1,
879
- isFocused: f?.hasWidgetFocus() ?? !1,
880
- totalModelCount: $.editor.getModels().length,
881
- registeredLanguageCount: $.languages.getLanguages().length,
877
+ matchingSchemas: L,
878
+ isReadOnly: g?.getOption(W.editor.EditorOption.readOnly) ?? !1,
879
+ isFocused: g?.hasWidgetFocus() ?? !1,
880
+ totalModelCount: W.editor.getModels().length,
881
+ registeredLanguageCount: W.languages.getLanguages().length,
882
882
  yamlHandleSet: fe.isYamlReady
883
883
  };
884
884
  }
885
885
  }));
886
- const h = (f) => typeof f == "number" ? `${f}px` : f;
887
- return /* @__PURE__ */ S.jsx("div", { className: vr(ut.Root, I), style: {
888
- "--_editor-height": h(N),
889
- "--_editor-width": h(q)
890
- }, "data-testid": "code-editor", ...C ? {} : {
886
+ const f = (g) => typeof g == "number" ? `${g}px` : g;
887
+ return /* @__PURE__ */ E.jsx("div", { className: Sr(gt.Root, D), style: {
888
+ "--_editor-height": f(x),
889
+ "--_editor-width": f(z)
890
+ }, "data-testid": "code-editor", ...S ? {} : {
891
891
  "data-borderless": ""
892
- }, children: /* @__PURE__ */ S.jsx("div", { ref: F, className: ut.Inner }) });
892
+ }, children: /* @__PURE__ */ E.jsx("div", { ref: q, className: gt.Inner }) });
893
893
  });
894
- br.displayName = "CodeEditor";
895
- const wr = "_Root_1ltbg_1", _r = "_Inner_1ltbg_16", mt = {
896
- Root: wr,
897
- Inner: _r
894
+ Mt.displayName = "CodeEditor";
895
+ const Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
896
+ __proto__: null,
897
+ CodeEditor: Mt
898
+ }, Symbol.toStringTag, { value: "Module" })), Tr = "_Root_1ltbg_1", Mr = "_Inner_1ltbg_16", pt = {
899
+ Root: Tr,
900
+ Inner: Mr
898
901
  };
899
- function kr(...e) {
902
+ function jr(...e) {
900
903
  return e.filter(Boolean).join(" ");
901
904
  }
902
- const xr = ve(function({
905
+ const Nr = _e(function({
903
906
  original: t,
904
907
  modified: r,
905
908
  language: n,
906
909
  mode: c = "side-by-side",
907
- readOnly: u = !0,
910
+ readOnly: i = !0,
908
911
  height: l = "100%",
909
- bordered: a = !0,
910
- className: p
911
- }, g) {
912
- const x = Ke(), M = Y(null), m = Y(null), [T, R] = Pe(!1);
913
- V(() => {
914
- if (!M.current) return;
915
- $.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge);
916
- const N = $.editor.createDiffEditor(M.current, {
917
- readOnly: u,
912
+ bordered: d = !0,
913
+ className: y
914
+ }, h) {
915
+ const k = rt(), j = G(null), m = G(null), [T, R] = me(!1);
916
+ U(() => {
917
+ if (!j.current) return;
918
+ W.editor.defineTheme(pe, $e(k.base, j.current)), W.editor.setTheme(pe);
919
+ const x = W.editor.createDiffEditor(j.current, {
920
+ readOnly: i,
918
921
  renderSideBySide: c === "side-by-side",
919
922
  renderValidationDecorations: "off",
920
923
  scrollBeyondLastLine: !1,
921
924
  automaticLayout: !0,
922
925
  fontSize: 13,
923
926
  fontFamily: "var(--ov-font-family-mono, monospace)"
924
- }), q = $.editor.createModel(t, n), C = $.editor.createModel(r, n);
925
- return N.setModel({
926
- original: q,
927
- modified: C
928
- }), m.current = N, R(!0), () => {
929
- N.getModel()?.original?.dispose(), N.getModel()?.modified?.dispose(), N.dispose(), m.current = null, R(!1);
927
+ }), z = W.editor.createModel(t, n), S = W.editor.createModel(r, n);
928
+ return x.setModel({
929
+ original: z,
930
+ modified: S
931
+ }), m.current = x, R(!0), () => {
932
+ x.getModel()?.original?.dispose(), x.getModel()?.modified?.dispose(), x.dispose(), m.current = null, R(!1);
930
933
  };
931
- }, []), V(() => {
934
+ }, []), U(() => {
932
935
  if (!m.current || !T) return;
933
- const N = m.current.getModel()?.original;
934
- N && t !== N.getValue() && N.setValue(t);
935
- }, [t, T]), V(() => {
936
+ const x = m.current.getModel()?.original;
937
+ x && t !== x.getValue() && x.setValue(t);
938
+ }, [t, T]), U(() => {
936
939
  if (!m.current || !T) return;
937
- const N = m.current.getModifiedEditor();
938
- r !== N.getValue() && m.current.getModel()?.modified?.setValue(r);
939
- }, [r, T]), V(() => {
940
+ const x = m.current.getModifiedEditor();
941
+ r !== x.getValue() && m.current.getModel()?.modified?.setValue(r);
942
+ }, [r, T]), U(() => {
940
943
  if (!m.current || !T) return;
941
- const N = n ?? "plaintext", q = m.current.getModel();
942
- q?.original && $.editor.setModelLanguage(q.original, N), q?.modified && $.editor.setModelLanguage(q.modified, N);
943
- }, [n, T]), V(() => {
944
+ const x = n ?? "plaintext", z = m.current.getModel();
945
+ z?.original && W.editor.setModelLanguage(z.original, x), z?.modified && W.editor.setModelLanguage(z.modified, x);
946
+ }, [n, T]), U(() => {
944
947
  !m.current || !T || m.current.updateOptions({
945
- readOnly: u,
948
+ readOnly: i,
946
949
  renderSideBySide: c === "side-by-side"
947
950
  });
948
- }, [u, c, T]), V(() => {
949
- T && ($.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge));
950
- }, [T, x.registration]);
951
- const H = (N) => typeof N == "number" ? `${N}px` : N;
952
- return /* @__PURE__ */ S.jsx("div", { ref: g, className: kr(mt.Root, p), style: {
951
+ }, [i, c, T]), U(() => {
952
+ T && (W.editor.defineTheme(pe, $e(k.base, j.current)), W.editor.setTheme(pe));
953
+ }, [T, k.registration]);
954
+ const H = (x) => typeof x == "number" ? `${x}px` : x;
955
+ return /* @__PURE__ */ E.jsx("div", { ref: h, className: jr(pt.Root, y), style: {
953
956
  "--_diff-height": H(l ?? "100%")
954
- }, "data-testid": "diff-viewer", ...a ? {} : {
957
+ }, "data-testid": "diff-viewer", ...d ? {} : {
955
958
  "data-borderless": ""
956
- }, children: /* @__PURE__ */ S.jsx("div", { ref: M, className: mt.Inner }) });
959
+ }, children: /* @__PURE__ */ E.jsx("div", { ref: j, className: pt.Inner }) });
957
960
  });
958
- xr.displayName = "DiffViewer";
959
- function Ye(e) {
960
- const t = Ze(e), r = (n, c = "") => t?.getPropertyValue(n).trim() || c;
961
+ Nr.displayName = "DiffViewer";
962
+ function Je(e) {
963
+ const t = tt(e), r = (n, c = "") => t?.getPropertyValue(n).trim() || c;
961
964
  return {
962
965
  background: r("--ov-color-terminal-bg", "#0d0e10"),
963
966
  foreground: r("--ov-color-terminal-fg", "#e2e7ee"),
@@ -982,13 +985,13 @@ function Ye(e) {
982
985
  brightWhite: r("--ov-color-ansi-bright-white", "#eceff4")
983
986
  };
984
987
  }
985
- const Cr = "_Root_1s8vo_1", Rr = {
986
- Root: Cr
988
+ const Ar = "_Root_1s8vo_1", Lr = {
989
+ Root: Ar
987
990
  };
988
- function Sr(...e) {
991
+ function Pr(...e) {
989
992
  return e.filter(Boolean).join(" ");
990
993
  }
991
- function Er(e, t) {
994
+ function Or(e, t) {
992
995
  let r = null;
993
996
  return {
994
997
  run: (...n) => {
@@ -1001,91 +1004,91 @@ function Er(e, t) {
1001
1004
  }
1002
1005
  };
1003
1006
  }
1004
- const Tr = ve(function({
1007
+ const Dr = _e(function({
1005
1008
  onData: t,
1006
1009
  onBinaryData: r,
1007
1010
  onResize: n,
1008
1011
  onSignal: c,
1009
- onError: u,
1012
+ onError: i,
1010
1013
  onClose: l,
1011
- onReady: a,
1012
- onBell: p,
1013
- onTitleChange: g,
1014
- onKey: x,
1015
- onSelectionChange: M,
1014
+ onReady: d,
1015
+ onBell: y,
1016
+ onTitleChange: h,
1017
+ onKey: k,
1018
+ onSelectionChange: j,
1016
1019
  onLineFeed: m,
1017
1020
  onScroll: T,
1018
1021
  onWriteParsed: R,
1019
1022
  fontSize: H = 13,
1020
- fontFamily: N,
1021
- fontWeight: q,
1022
- fontWeightBold: C,
1023
- scrollback: I = 5e3,
1024
- cursorBlink: W = !0,
1025
- cursorStyle: U,
1026
- cursorWidth: P,
1027
- lineHeight: F,
1028
- letterSpacing: D,
1029
- drawBoldTextInBrightColors: X = !0,
1030
- convertEol: ne = !0,
1031
- allowTransparency: v = !0,
1032
- macOptionIsMeta: s = !0,
1033
- macOptionClickForcesSelection: _ = !0,
1034
- linkHandling: k = !0,
1035
- disableStdin: i,
1036
- customKeyEventHandler: d,
1037
- autoFocus: h = !1,
1038
- renderer: f = "auto",
1039
- rows: y,
1040
- cols: b,
1041
- screenReaderMode: o,
1023
+ fontFamily: x,
1024
+ fontWeight: z,
1025
+ fontWeightBold: S,
1026
+ scrollback: D = 5e3,
1027
+ cursorBlink: I = !0,
1028
+ cursorStyle: B,
1029
+ cursorWidth: N,
1030
+ lineHeight: q,
1031
+ letterSpacing: P,
1032
+ drawBoldTextInBrightColors: V = !0,
1033
+ convertEol: K = !0,
1034
+ allowTransparency: b = !0,
1035
+ macOptionIsMeta: o = !0,
1036
+ macOptionClickForcesSelection: v = !0,
1037
+ linkHandling: p = !0,
1038
+ disableStdin: s,
1039
+ customKeyEventHandler: u,
1040
+ autoFocus: f = !1,
1041
+ renderer: g = "auto",
1042
+ rows: _,
1043
+ cols: C,
1044
+ screenReaderMode: a,
1042
1045
  minimumContrastRatio: w,
1043
1046
  className: A
1044
- }, j) {
1045
- const B = Y(null), O = Y(null), L = Y(null), J = Y(null), Q = Y(null), oe = Y([]), le = Y(null), ae = Y(null), G = Y(null), ce = Ke(), ee = Y({
1047
+ }, L) {
1048
+ const F = G(null), O = G(null), $ = G(null), J = G(null), Z = G(null), oe = G([]), le = G(null), ae = G(null), X = G(null), ce = rt(), te = G({
1046
1049
  onData: t,
1047
1050
  onBinaryData: r,
1048
1051
  onResize: n,
1049
1052
  onSignal: c,
1050
- onError: u,
1053
+ onError: i,
1051
1054
  onClose: l,
1052
- onReady: a,
1053
- onBell: p,
1054
- onTitleChange: g,
1055
- onKey: x,
1056
- onSelectionChange: M,
1055
+ onReady: d,
1056
+ onBell: y,
1057
+ onTitleChange: h,
1058
+ onKey: k,
1059
+ onSelectionChange: j,
1057
1060
  onLineFeed: m,
1058
1061
  onScroll: T,
1059
1062
  onWriteParsed: R
1060
1063
  });
1061
- ee.current = {
1064
+ te.current = {
1062
1065
  onData: t,
1063
1066
  onBinaryData: r,
1064
1067
  onResize: n,
1065
1068
  onSignal: c,
1066
- onError: u,
1069
+ onError: i,
1067
1070
  onClose: l,
1068
- onReady: a,
1069
- onBell: p,
1070
- onTitleChange: g,
1071
- onKey: x,
1072
- onSelectionChange: M,
1071
+ onReady: d,
1072
+ onBell: y,
1073
+ onTitleChange: h,
1074
+ onKey: k,
1075
+ onSelectionChange: j,
1073
1076
  onLineFeed: m,
1074
1077
  onScroll: T,
1075
1078
  onWriteParsed: R
1076
1079
  };
1077
- const Le = Ne(() => {
1080
+ const Ie = De(() => {
1078
1081
  try {
1079
- L.current?.fit?.();
1082
+ $.current?.fit?.();
1080
1083
  } catch {
1081
1084
  }
1082
1085
  }, []);
1083
- return vt(j, () => ({
1084
- write: (E) => {
1085
- O.current?.write?.(E);
1086
+ return xt(L, () => ({
1087
+ write: (M) => {
1088
+ O.current?.write?.(M);
1086
1089
  },
1087
- writeln: (E) => {
1088
- O.current?.writeln?.(E);
1090
+ writeln: (M) => {
1091
+ O.current?.writeln?.(M);
1089
1092
  },
1090
1093
  clear: () => {
1091
1094
  O.current?.clear?.();
@@ -1096,12 +1099,12 @@ const Tr = ve(function({
1096
1099
  blur: () => {
1097
1100
  O.current?.blur?.();
1098
1101
  },
1099
- fit: Le,
1102
+ fit: Ie,
1100
1103
  getDimensions: () => {
1101
- const E = O.current;
1102
- return E && typeof E.cols == "number" && typeof E.rows == "number" ? {
1103
- cols: E.cols,
1104
- rows: E.rows
1104
+ const M = O.current;
1105
+ return M && typeof M.cols == "number" && typeof M.rows == "number" ? {
1106
+ cols: M.cols,
1107
+ rows: M.rows
1105
1108
  } : null;
1106
1109
  },
1107
1110
  reset: () => {
@@ -1110,8 +1113,8 @@ const Tr = ve(function({
1110
1113
  scrollToBottom: () => {
1111
1114
  O.current?.scrollToBottom?.();
1112
1115
  },
1113
- findNext: (E, te) => J.current?.findNext?.(E, te) ?? !1,
1114
- findPrevious: (E, te) => J.current?.findPrevious?.(E, te) ?? !1,
1116
+ findNext: (M, re) => J.current?.findNext?.(M, re) ?? !1,
1117
+ findPrevious: (M, re) => J.current?.findPrevious?.(M, re) ?? !1,
1115
1118
  clearSearch: () => {
1116
1119
  J.current?.clearDecorations?.();
1117
1120
  },
@@ -1123,229 +1126,229 @@ const Tr = ve(function({
1123
1126
  clearSelection: () => {
1124
1127
  O.current?.clearSelection?.();
1125
1128
  },
1126
- scrollToLine: (E) => {
1127
- O.current?.scrollToLine?.(E);
1129
+ scrollToLine: (M) => {
1130
+ O.current?.scrollToLine?.(M);
1128
1131
  },
1129
- scrollUp: (E) => {
1130
- O.current?.scrollLines?.(-E);
1132
+ scrollUp: (M) => {
1133
+ O.current?.scrollLines?.(-M);
1131
1134
  },
1132
- scrollDown: (E) => {
1133
- O.current?.scrollLines?.(E);
1135
+ scrollDown: (M) => {
1136
+ O.current?.scrollLines?.(M);
1134
1137
  },
1135
- paste: (E) => {
1136
- O.current?.paste?.(E);
1138
+ paste: (M) => {
1139
+ O.current?.paste?.(M);
1137
1140
  },
1138
- getBufferContent: () => Q.current?.serialize?.() ?? ""
1139
- })), V(() => {
1140
- const E = B.current;
1141
- if (!E) return;
1142
- let te = !1;
1143
- async function De() {
1141
+ getBufferContent: () => Z.current?.serialize?.() ?? ""
1142
+ })), U(() => {
1143
+ const M = F.current;
1144
+ if (!M) return;
1145
+ let re = !1;
1146
+ async function We() {
1144
1147
  await document.fonts.ready;
1145
1148
  const [{
1146
- Terminal: pe
1149
+ Terminal: ye
1147
1150
  }, {
1148
- FitAddon: $e
1151
+ FitAddon: He
1149
1152
  }, {
1150
- SearchAddon: Ot
1153
+ SearchAddon: Bt
1151
1154
  }, {
1152
- SerializeAddon: Pt
1155
+ SerializeAddon: qt
1153
1156
  }, {
1154
- Unicode11Addon: Lt
1157
+ Unicode11Addon: zt
1155
1158
  }] = await Promise.all([import("@xterm/xterm"), import("@xterm/addon-fit"), import("@xterm/addon-search"), import("@xterm/addon-serialize"), import("@xterm/addon-unicode11")]);
1156
- if (te) return;
1157
- const Dt = Ye(E), ie = {
1159
+ if (re) return;
1160
+ const Vt = Je(M), ie = {
1158
1161
  fontSize: H,
1159
- fontFamily: N || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
1160
- theme: Dt,
1161
- allowTransparency: v,
1162
- cursorBlink: W,
1163
- convertEol: ne,
1164
- scrollback: I,
1165
- macOptionIsMeta: s,
1166
- macOptionClickForcesSelection: _,
1162
+ fontFamily: x || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
1163
+ theme: Vt,
1164
+ allowTransparency: b,
1165
+ cursorBlink: I,
1166
+ convertEol: K,
1167
+ scrollback: D,
1168
+ macOptionIsMeta: o,
1169
+ macOptionClickForcesSelection: v,
1167
1170
  allowProposedApi: !0,
1168
- drawBoldTextInBrightColors: X
1171
+ drawBoldTextInBrightColors: V
1169
1172
  };
1170
- q !== void 0 && (ie.fontWeight = q), C !== void 0 && (ie.fontWeightBold = C), i !== void 0 && (ie.disableStdin = i), U !== void 0 && (ie.cursorStyle = U), P !== void 0 && (ie.cursorWidth = P), F !== void 0 && (ie.lineHeight = F), D !== void 0 && (ie.letterSpacing = D), y !== void 0 && (ie.rows = y), b !== void 0 && (ie.cols = b), o !== void 0 && (ie.screenReaderMode = o), w !== void 0 && (ie.minimumContrastRatio = w);
1171
- const z = new pe(ie);
1172
- d && z.attachCustomKeyEventHandler(d);
1173
- const we = [], _e = new $e(), Ie = new Ot(), We = new Pt(), et = new Lt();
1174
- if (z.loadAddon(_e), z.loadAddon(Ie), z.loadAddon(We), z.loadAddon(et), we.push(_e, Ie, We, et), z.unicode.activeVersion = "11", k)
1173
+ z !== void 0 && (ie.fontWeight = z), S !== void 0 && (ie.fontWeightBold = S), s !== void 0 && (ie.disableStdin = s), B !== void 0 && (ie.cursorStyle = B), N !== void 0 && (ie.cursorWidth = N), q !== void 0 && (ie.lineHeight = q), P !== void 0 && (ie.letterSpacing = P), _ !== void 0 && (ie.rows = _), C !== void 0 && (ie.cols = C), a !== void 0 && (ie.screenReaderMode = a), w !== void 0 && (ie.minimumContrastRatio = w);
1174
+ const Y = new ye(ie);
1175
+ u && Y.attachCustomKeyEventHandler(u);
1176
+ const xe = [], ke = new He(), Be = new Bt(), qe = new qt(), nt = new zt();
1177
+ if (Y.loadAddon(ke), Y.loadAddon(Be), Y.loadAddon(qe), Y.loadAddon(nt), xe.push(ke, Be, qe, nt), Y.unicode.activeVersion = "11", p)
1175
1178
  try {
1176
1179
  const {
1177
- WebLinksAddon: Z
1180
+ WebLinksAddon: Q
1178
1181
  } = await import("@xterm/addon-web-links");
1179
- if (!te) {
1180
- const de = new Z();
1181
- z.loadAddon(de), we.push(de);
1182
+ if (!re) {
1183
+ const de = new Q();
1184
+ Y.loadAddon(de), xe.push(de);
1182
1185
  }
1183
1186
  } catch {
1184
1187
  }
1185
- if (te) {
1186
- z.dispose();
1188
+ if (re) {
1189
+ Y.dispose();
1187
1190
  return;
1188
1191
  }
1189
- if (z.open(E), f === "auto" || f === "webgl")
1192
+ if (Y.open(M), g === "auto" || g === "webgl")
1190
1193
  try {
1191
1194
  const {
1192
- WebglAddon: Z
1195
+ WebglAddon: Q
1193
1196
  } = await import("@xterm/addon-webgl");
1194
- if (!te) {
1195
- const de = new Z();
1197
+ if (!re) {
1198
+ const de = new Q();
1196
1199
  de.onContextLoss(() => {
1197
1200
  de.dispose();
1198
- }), z.loadAddon(de), we.push(de);
1201
+ }), Y.loadAddon(de), xe.push(de);
1199
1202
  }
1200
1203
  } catch {
1201
1204
  }
1202
- if (te) {
1203
- for (const Z of we)
1205
+ if (re) {
1206
+ for (const Q of xe)
1204
1207
  try {
1205
- Z.dispose();
1208
+ Q.dispose();
1206
1209
  } catch {
1207
1210
  }
1208
- z.dispose();
1211
+ Y.dispose();
1209
1212
  return;
1210
1213
  }
1211
- z.options.theme = Ye(E), _e.fit(), O.current = z, L.current = _e, J.current = Ie, Q.current = We, oe.current = we, z.onData((Z) => {
1212
- ee.current.onData?.(Z);
1213
- }), z.onBinary((Z) => {
1214
- ee.current.onBinaryData?.(Z);
1215
- }), z.onResize(({
1216
- cols: Z,
1214
+ Y.options.theme = Je(M), ke.fit(), O.current = Y, $.current = ke, J.current = Be, Z.current = qe, oe.current = xe, Y.onData((Q) => {
1215
+ te.current.onData?.(Q);
1216
+ }), Y.onBinary((Q) => {
1217
+ te.current.onBinaryData?.(Q);
1218
+ }), Y.onResize(({
1219
+ cols: Q,
1217
1220
  rows: de
1218
1221
  }) => {
1219
- ee.current.onResize?.(Z, de);
1220
- }), z.onBell(() => {
1221
- ee.current.onBell?.();
1222
- }), z.onTitleChange((Z) => {
1223
- ee.current.onTitleChange?.(Z);
1224
- }), z.onKey((Z) => {
1225
- ee.current.onKey?.(Z);
1226
- }), z.onSelectionChange(() => {
1227
- ee.current.onSelectionChange?.();
1228
- }), z.onLineFeed(() => {
1229
- ee.current.onLineFeed?.();
1230
- }), z.onScroll((Z) => {
1231
- ee.current.onScroll?.(Z);
1232
- }), z.onWriteParsed(() => {
1233
- ee.current.onWriteParsed?.();
1222
+ te.current.onResize?.(Q, de);
1223
+ }), Y.onBell(() => {
1224
+ te.current.onBell?.();
1225
+ }), Y.onTitleChange((Q) => {
1226
+ te.current.onTitleChange?.(Q);
1227
+ }), Y.onKey((Q) => {
1228
+ te.current.onKey?.(Q);
1229
+ }), Y.onSelectionChange(() => {
1230
+ te.current.onSelectionChange?.();
1231
+ }), Y.onLineFeed(() => {
1232
+ te.current.onLineFeed?.();
1233
+ }), Y.onScroll((Q) => {
1234
+ te.current.onScroll?.(Q);
1235
+ }), Y.onWriteParsed(() => {
1236
+ te.current.onWriteParsed?.();
1234
1237
  });
1235
- const Be = Er(() => {
1238
+ const ze = Or(() => {
1236
1239
  try {
1237
- _e.fit();
1240
+ ke.fit();
1238
1241
  } catch {
1239
1242
  }
1240
1243
  }, 10);
1241
- ae.current = Be;
1242
- const tt = new ResizeObserver(() => {
1243
- Be.run();
1244
+ ae.current = ze;
1245
+ const ot = new ResizeObserver(() => {
1246
+ ze.run();
1244
1247
  });
1245
- tt.observe(E), le.current = tt;
1246
- const rt = () => {
1247
- Be.run();
1248
+ ot.observe(M), le.current = ot;
1249
+ const it = () => {
1250
+ ze.run();
1248
1251
  };
1249
- window.addEventListener("resize", rt), G.current = () => {
1250
- window.removeEventListener("resize", rt);
1251
- }, h && z.focus(), ee.current.onReady?.({
1252
- cols: z.cols,
1253
- rows: z.rows
1252
+ window.addEventListener("resize", it), X.current = () => {
1253
+ window.removeEventListener("resize", it);
1254
+ }, f && Y.focus(), te.current.onReady?.({
1255
+ cols: Y.cols,
1256
+ rows: Y.rows
1254
1257
  });
1255
1258
  }
1256
- return De().catch((pe) => {
1257
- ee.current.onError?.(pe instanceof Error ? pe : new Error(String(pe)));
1259
+ return We().catch((ye) => {
1260
+ te.current.onError?.(ye instanceof Error ? ye : new Error(String(ye)));
1258
1261
  }), () => {
1259
- te = !0, ae.current?.cancel(), ae.current = null, le.current?.disconnect(), le.current = null, G.current?.(), G.current = null;
1260
- for (const $e of oe.current)
1262
+ re = !0, ae.current?.cancel(), ae.current = null, le.current?.disconnect(), le.current = null, X.current?.(), X.current = null;
1263
+ for (const He of oe.current)
1261
1264
  try {
1262
- $e.dispose();
1265
+ He.dispose();
1263
1266
  } catch {
1264
1267
  }
1265
1268
  oe.current = [];
1266
- const pe = O.current;
1269
+ const ye = O.current;
1267
1270
  try {
1268
- pe?.dispose?.();
1271
+ ye?.dispose?.();
1269
1272
  } catch {
1270
1273
  }
1271
- O.current = null, L.current = null, J.current = null, Q.current = null;
1274
+ O.current = null, $.current = null, J.current = null, Z.current = null;
1272
1275
  };
1273
- }, []), V(() => {
1274
- const E = O.current;
1275
- E?.options && (E.options.theme = Ye(B.current));
1276
- }, [ce.registration]), V(() => {
1277
- const E = O.current;
1278
- E?.options && (E.options.fontSize = H, ae.current?.run());
1279
- }, [H]), V(() => {
1280
- const E = O.current;
1281
- E?.options && W !== void 0 && (E.options.cursorBlink = W);
1282
- }, [W]), V(() => {
1283
- const E = O.current;
1284
- E?.options && U !== void 0 && (E.options.cursorStyle = U);
1285
- }, [U]), V(() => {
1286
- const E = O.current;
1287
- E?.options && I !== void 0 && (E.options.scrollback = I);
1288
- }, [I]), V(() => {
1289
- const E = O.current;
1290
- E?.options && F !== void 0 && (E.options.lineHeight = F, ae.current?.run());
1291
- }, [F]), V(() => {
1292
- const E = O.current;
1293
- E?.options && D !== void 0 && (E.options.letterSpacing = D, ae.current?.run());
1294
- }, [D]), /* @__PURE__ */ S.jsx("div", { ref: B, className: Sr(Rr.Root, A), "data-testid": "terminal" });
1276
+ }, []), U(() => {
1277
+ const M = O.current;
1278
+ M?.options && (M.options.theme = Je(F.current));
1279
+ }, [ce.registration]), U(() => {
1280
+ const M = O.current;
1281
+ M?.options && (M.options.fontSize = H, ae.current?.run());
1282
+ }, [H]), U(() => {
1283
+ const M = O.current;
1284
+ M?.options && I !== void 0 && (M.options.cursorBlink = I);
1285
+ }, [I]), U(() => {
1286
+ const M = O.current;
1287
+ M?.options && B !== void 0 && (M.options.cursorStyle = B);
1288
+ }, [B]), U(() => {
1289
+ const M = O.current;
1290
+ M?.options && D !== void 0 && (M.options.scrollback = D);
1291
+ }, [D]), U(() => {
1292
+ const M = O.current;
1293
+ M?.options && q !== void 0 && (M.options.lineHeight = q, ae.current?.run());
1294
+ }, [q]), U(() => {
1295
+ const M = O.current;
1296
+ M?.options && P !== void 0 && (M.options.letterSpacing = P, ae.current?.run());
1297
+ }, [P]), /* @__PURE__ */ E.jsx("div", { ref: F, className: Pr(Lr.Root, A), "data-testid": "terminal" });
1295
1298
  });
1296
- Tr.displayName = "Terminal";
1297
- const jr = "_Root_1wl3o_1", Mr = "_Loading_1wl3o_92", ht = {
1298
- Root: jr,
1299
- Loading: Mr
1300
- }, Ar = [Qt], Nr = It(() => import("react-markdown"));
1301
- function Or(...e) {
1299
+ Dr.displayName = "Terminal";
1300
+ const $r = "_Root_1wl3o_1", Ir = "_Loading_1wl3o_92", yt = {
1301
+ Root: $r,
1302
+ Loading: Ir
1303
+ }, Wr = [ir], Hr = Rt(() => import("react-markdown"));
1304
+ function Br(...e) {
1302
1305
  return e.filter(Boolean).join(" ");
1303
1306
  }
1304
- function kt(e) {
1305
- return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(kt).join("") : "" : "";
1307
+ function jt(e) {
1308
+ return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(jt).join("") : "" : "";
1306
1309
  }
1307
- function Pr(e) {
1308
- const t = be.c(4), {
1310
+ function qr(e) {
1311
+ const t = Ce.c(4), {
1309
1312
  summaryText: r,
1310
1313
  children: n
1311
- } = e, u = `md-details-${Ht()}`;
1314
+ } = e, i = `md-details-${Yt()}`;
1312
1315
  let l;
1313
- return t[0] !== n || t[1] !== u || t[2] !== r ? (l = /* @__PURE__ */ S.jsx(nt, { animation: "fast", children: /* @__PURE__ */ S.jsx(nt.Item, { id: u, title: r, children: n }) }), t[0] = n, t[1] = u, t[2] = r, t[3] = l) : l = t[3], l;
1316
+ return t[0] !== n || t[1] !== i || t[2] !== r ? (l = /* @__PURE__ */ E.jsx(st, { animation: "fast", children: /* @__PURE__ */ E.jsx(st.Item, { id: i, title: r, children: n }) }), t[0] = n, t[1] = i, t[2] = r, t[3] = l) : l = t[3], l;
1314
1317
  }
1315
- const Lr = {
1318
+ const zr = {
1316
1319
  // Code blocks & inline code
1317
1320
  pre: ({
1318
1321
  children: e
1319
- }) => /* @__PURE__ */ S.jsx(S.Fragment, { children: e }),
1322
+ }) => /* @__PURE__ */ E.jsx(E.Fragment, { children: e }),
1320
1323
  code: ({
1321
1324
  className: e,
1322
1325
  children: t
1323
1326
  }) => {
1324
1327
  const r = /language-([^\s]+)/.exec(e ?? ""), n = String(t).replace(/\n$/, "");
1325
1328
  return r || n.includes(`
1326
- `) ? /* @__PURE__ */ S.jsx(qt, { language: r?.[1], copyable: !0, children: n }) : /* @__PURE__ */ S.jsx(Jt, { children: t });
1329
+ `) ? /* @__PURE__ */ E.jsx(Qt, { language: r?.[1], copyable: !0, children: n }) : /* @__PURE__ */ E.jsx(er, { children: t });
1327
1330
  },
1328
1331
  // Tables
1329
1332
  table: ({
1330
1333
  children: e
1331
- }) => /* @__PURE__ */ S.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1334
+ }) => /* @__PURE__ */ E.jsx(be.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1332
1335
  thead: ({
1333
1336
  children: e
1334
- }) => /* @__PURE__ */ S.jsx(ye.Head, { children: e }),
1337
+ }) => /* @__PURE__ */ E.jsx(be.Head, { children: e }),
1335
1338
  tbody: ({
1336
1339
  children: e
1337
- }) => /* @__PURE__ */ S.jsx(ye.Body, { children: e }),
1340
+ }) => /* @__PURE__ */ E.jsx(be.Body, { children: e }),
1338
1341
  tr: ({
1339
1342
  children: e
1340
- }) => /* @__PURE__ */ S.jsx(ye.Row, { children: e }),
1343
+ }) => /* @__PURE__ */ E.jsx(be.Row, { children: e }),
1341
1344
  th: ({
1342
1345
  children: e,
1343
1346
  style: t
1344
- }) => /* @__PURE__ */ S.jsx(ye.HeaderCell, { style: t, children: e }),
1347
+ }) => /* @__PURE__ */ E.jsx(be.HeaderCell, { style: t, children: e }),
1345
1348
  td: ({
1346
1349
  children: e,
1347
1350
  style: t
1348
- }) => /* @__PURE__ */ S.jsx(ye.Cell, { style: t, children: e }),
1351
+ }) => /* @__PURE__ */ E.jsx(be.Cell, { style: t, children: e }),
1349
1352
  // Links
1350
1353
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1351
1354
  a: ({
@@ -1353,13 +1356,13 @@ const Lr = {
1353
1356
  href: t,
1354
1357
  node: r,
1355
1358
  ...n
1356
- }) => /* @__PURE__ */ S.jsx(Yt, { ...n, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1359
+ }) => /* @__PURE__ */ E.jsx(Zt, { ...n, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1357
1360
  // Blockquotes
1358
1361
  blockquote: ({
1359
1362
  children: e
1360
- }) => /* @__PURE__ */ S.jsx(Vt, { variant: "plain", children: e }),
1363
+ }) => /* @__PURE__ */ E.jsx(Xt, { variant: "plain", children: e }),
1361
1364
  // Horizontal rules
1362
- hr: () => /* @__PURE__ */ S.jsx(Ft, {}),
1365
+ hr: () => /* @__PURE__ */ E.jsx(Kt, {}),
1363
1366
  // Details/summary → Accordion — extract title from the hast node's summary child
1364
1367
  details: ({
1365
1368
  children: e,
@@ -1367,365 +1370,365 @@ const Lr = {
1367
1370
  }) => {
1368
1371
  let r = "Details";
1369
1372
  if (t?.children) {
1370
- const c = t.children.find((u) => u.tagName === "summary");
1373
+ const c = t.children.find((i) => i.tagName === "summary");
1371
1374
  if (c) {
1372
- const u = kt(c).trim();
1373
- u && (r = u);
1375
+ const i = jt(c).trim();
1376
+ i && (r = i);
1374
1377
  }
1375
1378
  }
1376
1379
  const n = [];
1377
- return Wt.forEach(e, (c) => {
1378
- Bt(c) && c.props?.["data-md-summary"] || n.push(c);
1379
- }), /* @__PURE__ */ S.jsx(Pr, { summaryText: r, children: n });
1380
+ return Ft.forEach(e, (c) => {
1381
+ Ut(c) && c.props?.["data-md-summary"] || n.push(c);
1382
+ }), /* @__PURE__ */ E.jsx(qr, { summaryText: r, children: n });
1380
1383
  },
1381
1384
  // Mark summary so details can filter it out; text is extracted from hast node
1382
1385
  summary: ({
1383
1386
  children: e
1384
- }) => /* @__PURE__ */ S.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1387
+ }) => /* @__PURE__ */ E.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1385
1388
  // Task list checkboxes — use compound parts for inline rendering
1386
1389
  input: ({
1387
1390
  type: e,
1388
1391
  checked: t,
1389
1392
  disabled: r
1390
- }) => e === "checkbox" ? /* @__PURE__ */ S.jsx(He.Root, { checked: t, disabled: r, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ S.jsx(He.Control, { children: /* @__PURE__ */ S.jsx(He.Indicator, { keepMounted: !0 }) }) }) : null
1391
- }, Dr = ve(function(t, r) {
1392
- const n = be.c(16);
1393
- let c, u, l, a;
1393
+ }) => e === "checkbox" ? /* @__PURE__ */ E.jsx(Ve.Root, { checked: t, disabled: r, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ E.jsx(Ve.Control, { children: /* @__PURE__ */ E.jsx(Ve.Indicator, { keepMounted: !0 }) }) }) : null
1394
+ }, Vr = _e(function(t, r) {
1395
+ const n = Ce.c(16);
1396
+ let c, i, l, d;
1394
1397
  n[0] !== t ? ({
1395
- content: u,
1396
- allowHtml: a,
1398
+ content: i,
1399
+ allowHtml: d,
1397
1400
  className: c,
1398
1401
  ...l
1399
- } = t, n[0] = t, n[1] = c, n[2] = u, n[3] = l, n[4] = a) : (c = n[1], u = n[2], l = n[3], a = n[4]);
1400
- const p = a === void 0 ? !1 : a;
1401
- let g;
1402
- n[5] !== c ? (g = Or(ht.Root, c), n[5] = c, n[6] = g) : g = n[6];
1403
- let x;
1404
- n[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ S.jsx("div", { className: ht.Loading, "data-testid": "markdown-loading", children: "Loading…" }), n[7] = x) : x = n[7];
1405
- let M;
1406
- n[8] !== p || n[9] !== u ? (M = /* @__PURE__ */ S.jsx($t, { fallback: x, children: /* @__PURE__ */ S.jsx(Ir, { content: u, allowHtml: p }) }), n[8] = p, n[9] = u, n[10] = M) : M = n[10];
1402
+ } = t, n[0] = t, n[1] = c, n[2] = i, n[3] = l, n[4] = d) : (c = n[1], i = n[2], l = n[3], d = n[4]);
1403
+ const y = d === void 0 ? !1 : d;
1404
+ let h;
1405
+ n[5] !== c ? (h = Br(yt.Root, c), n[5] = c, n[6] = h) : h = n[6];
1406
+ let k;
1407
+ n[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ E.jsx("div", { className: yt.Loading, "data-testid": "markdown-loading", children: "Loading…" }), n[7] = k) : k = n[7];
1408
+ let j;
1409
+ n[8] !== y || n[9] !== i ? (j = /* @__PURE__ */ E.jsx(kt, { fallback: k, children: /* @__PURE__ */ E.jsx(Ur, { content: i, allowHtml: y }) }), n[8] = y, n[9] = i, n[10] = j) : j = n[10];
1407
1410
  let m;
1408
- return n[11] !== l || n[12] !== r || n[13] !== g || n[14] !== M ? (m = /* @__PURE__ */ S.jsx("div", { ref: r, className: g, "data-testid": "markdown-preview", ...l, children: M }), n[11] = l, n[12] = r, n[13] = g, n[14] = M, n[15] = m) : m = n[15], m;
1411
+ return n[11] !== l || n[12] !== r || n[13] !== h || n[14] !== j ? (m = /* @__PURE__ */ E.jsx("div", { ref: r, className: h, "data-testid": "markdown-preview", ...l, children: j }), n[11] = l, n[12] = r, n[13] = h, n[14] = j, n[15] = m) : m = n[15], m;
1409
1412
  });
1410
- Dr.displayName = "MarkdownPreview";
1411
- const $r = {
1412
- ...Ue,
1413
+ Vr.displayName = "MarkdownPreview";
1414
+ const Fr = {
1415
+ ...Fe,
1413
1416
  attributes: {
1414
- ...Ue.attributes,
1415
- "*": [...Ue.attributes?.["*"] ?? [], "className"]
1417
+ ...Fe.attributes,
1418
+ "*": [...Fe.attributes?.["*"] ?? [], "className"]
1416
1419
  }
1417
1420
  };
1418
- function Ir(e) {
1419
- const t = be.c(6), {
1421
+ function Ur(e) {
1422
+ const t = Ce.c(6), {
1420
1423
  content: r,
1421
1424
  allowHtml: n
1422
1425
  } = e;
1423
1426
  let c;
1424
- t[0] !== n ? (c = n ? [Zt, [Kt, $r]] : [], t[0] = n, t[1] = c) : c = t[1];
1425
- const u = c, l = !n, a = u;
1426
- let p;
1427
- return t[2] !== r || t[3] !== l || t[4] !== a ? (p = /* @__PURE__ */ S.jsx(Nr, { skipHtml: l, remarkPlugins: Ar, rehypePlugins: a, components: Lr, children: r }), t[2] = r, t[3] = l, t[4] = a, t[5] = p) : p = t[5], p;
1428
- }
1429
- const Wr = "_Overlay_pgin5_1", Br = "_Root_pgin5_12", Hr = "_CommandList_pgin5_25", Ur = "_Results_pgin5_30", zr = "_Message_pgin5_35", Ce = {
1430
- Overlay: Wr,
1431
- Root: Br,
1432
- CommandList: Hr,
1433
- Results: Ur,
1434
- Message: zr
1427
+ t[0] !== n ? (c = n ? [sr, [ar, Fr]] : [], t[0] = n, t[1] = c) : c = t[1];
1428
+ const i = c, l = !n, d = i;
1429
+ let y;
1430
+ return t[2] !== r || t[3] !== l || t[4] !== d ? (y = /* @__PURE__ */ E.jsx(Hr, { skipHtml: l, remarkPlugins: Wr, rehypePlugins: d, components: zr, children: r }), t[2] = r, t[3] = l, t[4] = d, t[5] = y) : y = t[5], y;
1431
+ }
1432
+ const Yr = "_Overlay_pgin5_1", Gr = "_Root_pgin5_12", Jr = "_CommandList_pgin5_25", Kr = "_Results_pgin5_30", Xr = "_Message_pgin5_35", Ee = {
1433
+ Overlay: Yr,
1434
+ Root: Gr,
1435
+ CommandList: Jr,
1436
+ Results: Kr,
1437
+ Message: Xr
1435
1438
  };
1436
- function Fr(e) {
1439
+ function Zr(e) {
1437
1440
  return e.id;
1438
1441
  }
1439
- function qe(e, t) {
1442
+ function Ke(e, t) {
1440
1443
  const r = e.toLowerCase(), n = t.toLowerCase();
1441
1444
  let c = 0;
1442
- for (let u = 0; u < r.length && c < n.length; u++)
1443
- r[u] === n[c] && c++;
1445
+ for (let i = 0; i < r.length && c < n.length; i++)
1446
+ r[i] === n[c] && c++;
1444
1447
  return c === n.length;
1445
1448
  }
1446
- function Vr(e, t) {
1447
- return qe(e.label, t) || (e.description ? qe(e.description, t) : !1) || (e.group ? qe(e.group, t) : !1);
1449
+ function Qr(e, t) {
1450
+ return Ke(e.label, t) || (e.description ? Ke(e.description, t) : !1) || (e.group ? Ke(e.group, t) : !1);
1448
1451
  }
1449
- const Yr = [];
1450
- function qr(e) {
1451
- const t = be.c(7), {
1452
+ const en = [];
1453
+ function tn(e) {
1454
+ const t = Ce.c(7), {
1452
1455
  inputRef: r
1453
1456
  } = e, {
1454
1457
  listId: n
1455
- } = Gt(), c = Xt(), {
1456
- activeKey: u
1457
- } = Ut(c.subscribe, c.getSnapshot, c.getSnapshot), l = u != null ? `${n}-item-${u}` : void 0;
1458
- let a, p;
1459
- t[0] !== l || t[1] !== r ? (a = () => {
1458
+ } = tr(), c = rr(), {
1459
+ activeKey: i
1460
+ } = Gt(c.subscribe, c.getSnapshot, c.getSnapshot), l = i != null ? `${n}-item-${i}` : void 0;
1461
+ let d, y;
1462
+ t[0] !== l || t[1] !== r ? (d = () => {
1460
1463
  l && r.current?.ownerDocument.getElementById(l)?.scrollIntoView?.({
1461
1464
  block: "nearest"
1462
1465
  });
1463
- }, p = [l, r], t[0] = l, t[1] = r, t[2] = a, t[3] = p) : (a = t[2], p = t[3]), bt(a, p);
1464
- let g;
1465
- return t[4] !== l || t[5] !== r ? (g = /* @__PURE__ */ S.jsx(ue.Input, { ref: r, autoFocus: !1, role: "combobox", "aria-label": "Search commands", "aria-expanded": "true", "aria-haspopup": "listbox", "aria-activedescendant": l, autoComplete: "off", spellCheck: !1, "data-testid": "command-palette-input" }), t[4] = l, t[5] = r, t[6] = g) : g = t[6], g;
1466
+ }, y = [l, r], t[0] = l, t[1] = r, t[2] = d, t[3] = y) : (d = t[2], y = t[3]), St(d, y);
1467
+ let h;
1468
+ return t[4] !== l || t[5] !== r ? (h = /* @__PURE__ */ E.jsx(ue.Input, { ref: r, autoFocus: !1, role: "combobox", "aria-label": "Search commands", "aria-expanded": "true", "aria-haspopup": "listbox", "aria-activedescendant": l, autoComplete: "off", spellCheck: !1, "data-testid": "command-palette-input" }), t[4] = l, t[5] = r, t[6] = h) : h = t[6], h;
1466
1469
  }
1467
- const Jr = ve(function({
1470
+ const rn = _e(function({
1468
1471
  open: t,
1469
1472
  onClose: r,
1470
1473
  commands: n,
1471
1474
  onSelect: c,
1472
- placeholder: u = "Type a command…",
1475
+ placeholder: i = "Type a command…",
1473
1476
  loading: l = !1,
1474
- error: a
1475
- }, p) {
1476
- const g = Y(null), x = Y(null), M = Y(!1), m = a !== void 0, T = Ae(() => n.filter((C) => !C.disabled), [n]), R = m || l ? Yr : T, H = Ae(() => {
1477
- const C = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
1478
- let W, U = -1;
1479
- for (const P of R) {
1480
- const F = P.group || "Other commands";
1481
- F !== W && U++, W = F;
1482
- const D = String(U);
1483
- C.set(P.id, D), I.set(D, F);
1477
+ error: d
1478
+ }, y) {
1479
+ const h = G(null), k = G(null), j = G(!1), m = d !== void 0, T = Oe(() => n.filter((S) => !S.disabled), [n]), R = m || l ? en : T, H = Oe(() => {
1480
+ const S = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map();
1481
+ let I, B = -1;
1482
+ for (const N of R) {
1483
+ const q = N.group || "Other commands";
1484
+ q !== I && B++, I = q;
1485
+ const P = String(B);
1486
+ S.set(N.id, P), D.set(P, q);
1484
1487
  }
1485
1488
  return {
1486
- keys: C,
1487
- labels: I,
1488
- grouped: R.some((P) => P.group)
1489
+ keys: S,
1490
+ labels: D,
1491
+ grouped: R.some((N) => N.group)
1489
1492
  };
1490
- }, [R]), N = Ne((C) => H.keys.get(C.id), [H]), q = Ne((C) => H.labels.get(C), [H]);
1491
- return bt(() => {
1493
+ }, [R]), x = De((S) => H.keys.get(S.id), [H]), z = De((S) => H.labels.get(S), [H]);
1494
+ return St(() => {
1492
1495
  if (!t) return;
1493
- const C = g.current, I = C?.ownerDocument, W = I?.activeElement;
1494
- return M.current = !1, x.current?.focus({
1496
+ const S = h.current, D = S?.ownerDocument, I = D?.activeElement;
1497
+ return j.current = !1, k.current?.focus({
1495
1498
  preventScroll: !0
1496
1499
  }), () => {
1497
- W instanceof HTMLElement && W.isConnected && (I?.activeElement === I?.body || C?.contains(I?.activeElement ?? null)) && W.focus({
1500
+ I instanceof HTMLElement && I.isConnected && (D?.activeElement === D?.body || S?.contains(D?.activeElement ?? null)) && I.focus({
1498
1501
  preventScroll: !0
1499
1502
  });
1500
1503
  };
1501
- }, [t]), t ? /* @__PURE__ */ S.jsx("div", { role: "presentation", className: Ce.Overlay, onClick: r, "data-testid": "command-palette-overlay", children: /* @__PURE__ */ S.jsx("div", { ref: (C) => {
1502
- if (g.current = C, typeof p == "function") return p(C);
1503
- p && (p.current = C);
1504
- }, className: Ce.Root, onClick: (C) => C.stopPropagation(), onMouseDown: (C) => {
1505
- C.button === 0 && C.target instanceof Element && !C.target.closest("input, button") && (C.preventDefault(), x.current?.focus({
1504
+ }, [t]), t ? /* @__PURE__ */ E.jsx("div", { role: "presentation", className: Ee.Overlay, onClick: r, "data-testid": "command-palette-overlay", children: /* @__PURE__ */ E.jsx("div", { ref: (S) => {
1505
+ if (h.current = S, typeof y == "function") return y(S);
1506
+ y && (y.current = S);
1507
+ }, className: Ee.Root, onClick: (S) => S.stopPropagation(), onMouseDown: (S) => {
1508
+ S.button === 0 && S.target instanceof Element && !S.target.closest("input, button") && (S.preventDefault(), k.current?.focus({
1506
1509
  preventScroll: !0
1507
1510
  }));
1508
- }, onKeyDown: (C) => C.stopPropagation(), onCompositionStartCapture: () => {
1509
- M.current = !0;
1511
+ }, onKeyDown: (S) => S.stopPropagation(), onCompositionStartCapture: () => {
1512
+ j.current = !0;
1510
1513
  }, onCompositionEndCapture: () => {
1511
- M.current = !1;
1512
- }, onKeyDownCapture: (C) => {
1513
- if (M.current || C.nativeEvent.isComposing || C.keyCode === 229) {
1514
- C.stopPropagation();
1514
+ j.current = !1;
1515
+ }, onKeyDownCapture: (S) => {
1516
+ if (j.current || S.nativeEvent.isComposing || S.keyCode === 229) {
1517
+ S.stopPropagation();
1515
1518
  return;
1516
1519
  }
1517
- if (C.target instanceof HTMLButtonElement && C.key !== "Escape" && C.key !== "Tab") {
1518
- C.stopPropagation();
1520
+ if (S.target instanceof HTMLButtonElement && S.key !== "Escape" && S.key !== "Tab") {
1521
+ S.stopPropagation();
1519
1522
  return;
1520
1523
  }
1521
- if (C.key === "Escape")
1522
- C.preventDefault(), C.stopPropagation(), r();
1523
- else if (C.key === "Tab") {
1524
- const I = g.current?.querySelectorAll("input:not(:disabled), button:not(:disabled)");
1525
- if (!I?.length) return;
1526
- const W = I[0], U = I[I.length - 1], P = W.ownerDocument.activeElement;
1527
- (C.shiftKey && P === W || !C.shiftKey && P === U) && (C.preventDefault(), (C.shiftKey ? U : W).focus());
1528
- }
1529
- }, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: /* @__PURE__ */ S.jsxs(ue.Root, { className: Ce.CommandList, role: "presentation", "aria-expanded": void 0, "aria-haspopup": void 0, "aria-owns": void 0, "aria-activedescendant": void 0, items: R, itemKey: Fr, renderItem: (C, I) => /* @__PURE__ */ S.jsxs(ue.Item, { itemKey: I.key, "data-testid": `command-item-${C.id}`, children: [
1530
- C.icon && /* @__PURE__ */ S.jsx(ue.ItemIcon, { "aria-hidden": "true", children: C.icon }),
1531
- /* @__PURE__ */ S.jsx(ue.ItemLabel, { children: C.label }),
1532
- C.description && /* @__PURE__ */ S.jsx(ue.ItemDescription, { children: C.description }),
1533
- C.shortcut && /* @__PURE__ */ S.jsx(ue.ItemShortcut, { children: C.shortcut })
1534
- ] }), filterFn: Vr, sortByScore: !1, groupBy: H.grouped ? N : void 0, groupLabel: q, loading: l && !m, onAction: (C) => {
1535
- const I = R.find((W) => W.id === C && !W.disabled);
1536
- I && (c(I), r());
1537
- }, onDismiss: r, placeholder: u, density: "compact", children: [
1538
- /* @__PURE__ */ S.jsx(qr, { inputRef: x }),
1539
- /* @__PURE__ */ S.jsx(ue.Results, { className: Ce.Results, "aria-label": "Commands", "aria-busy": l && !m, "data-testid": "command-palette-list" }),
1540
- m ? /* @__PURE__ */ S.jsx("div", { role: "alert", className: Ce.Message, "data-testid": "command-palette-error", children: a || "Unable to load commands." }) : /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
1541
- /* @__PURE__ */ S.jsx(ue.Loading, { role: "status", "data-testid": "command-palette-loading", children: "Loading commands…" }),
1542
- /* @__PURE__ */ S.jsx(ue.Empty, { role: "status", "data-testid": "command-palette-empty", children: "No matching commands" })
1524
+ if (S.key === "Escape")
1525
+ S.preventDefault(), S.stopPropagation(), r();
1526
+ else if (S.key === "Tab") {
1527
+ const D = h.current?.querySelectorAll("input:not(:disabled), button:not(:disabled)");
1528
+ if (!D?.length) return;
1529
+ const I = D[0], B = D[D.length - 1], N = I.ownerDocument.activeElement;
1530
+ (S.shiftKey && N === I || !S.shiftKey && N === B) && (S.preventDefault(), (S.shiftKey ? B : I).focus());
1531
+ }
1532
+ }, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: /* @__PURE__ */ E.jsxs(ue.Root, { className: Ee.CommandList, role: "presentation", "aria-expanded": void 0, "aria-haspopup": void 0, "aria-owns": void 0, "aria-activedescendant": void 0, items: R, itemKey: Zr, renderItem: (S, D) => /* @__PURE__ */ E.jsxs(ue.Item, { itemKey: D.key, "data-testid": `command-item-${S.id}`, children: [
1533
+ S.icon && /* @__PURE__ */ E.jsx(ue.ItemIcon, { "aria-hidden": "true", children: S.icon }),
1534
+ /* @__PURE__ */ E.jsx(ue.ItemLabel, { children: S.label }),
1535
+ S.description && /* @__PURE__ */ E.jsx(ue.ItemDescription, { children: S.description }),
1536
+ S.shortcut && /* @__PURE__ */ E.jsx(ue.ItemShortcut, { children: S.shortcut })
1537
+ ] }), filterFn: Qr, sortByScore: !1, groupBy: H.grouped ? x : void 0, groupLabel: z, loading: l && !m, onAction: (S) => {
1538
+ const D = R.find((I) => I.id === S && !I.disabled);
1539
+ D && (c(D), r());
1540
+ }, onDismiss: r, placeholder: i, density: "compact", children: [
1541
+ /* @__PURE__ */ E.jsx(tn, { inputRef: k }),
1542
+ /* @__PURE__ */ E.jsx(ue.Results, { className: Ee.Results, "aria-label": "Commands", "aria-busy": l && !m, "data-testid": "command-palette-list" }),
1543
+ m ? /* @__PURE__ */ E.jsx("div", { role: "alert", className: Ee.Message, "data-testid": "command-palette-error", children: d || "Unable to load commands." }) : /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1544
+ /* @__PURE__ */ E.jsx(ue.Loading, { role: "status", "data-testid": "command-palette-loading", children: "Loading commands…" }),
1545
+ /* @__PURE__ */ E.jsx(ue.Empty, { role: "status", "data-testid": "command-palette-empty", children: "No matching commands" })
1543
1546
  ] })
1544
1547
  ] }) }) }) : null;
1545
1548
  });
1546
- Jr.displayName = "CommandPalette";
1547
- const Gr = "_Root_1b5sv_1", Xr = "_Toolbar_1b5sv_12", Qr = "_SearchInput_1b5sv_20", Zr = "_CopyButton_1b5sv_41", Kr = "_Tree_1b5sv_55", en = "_Node_1b5sv_59", tn = "_Row_1b5sv_63", rn = "_RowHighlight_1b5sv_76", nn = "_Chevron_1b5sv_80", on = "_ChevronExpanded_1b5sv_93", sn = "_ChevronSpacer_1b5sv_97", an = "_Key_1b5sv_103", cn = "_Colon_1b5sv_107", ln = "_Value_1b5sv_111", un = "_Preview_1b5sv_129", dn = "_Comma_1b5sv_134", re = {
1548
- Root: Gr,
1549
- Toolbar: Xr,
1550
- SearchInput: Qr,
1551
- CopyButton: Zr,
1552
- Tree: Kr,
1553
- Node: en,
1554
- Row: tn,
1555
- RowHighlight: rn,
1556
- Chevron: nn,
1557
- ChevronExpanded: on,
1558
- ChevronSpacer: sn,
1559
- Key: an,
1560
- Colon: cn,
1561
- Value: ln,
1562
- Preview: un,
1563
- Comma: dn
1549
+ rn.displayName = "CommandPalette";
1550
+ const nn = "_Root_1b5sv_1", on = "_Toolbar_1b5sv_12", sn = "_SearchInput_1b5sv_20", an = "_CopyButton_1b5sv_41", cn = "_Tree_1b5sv_55", ln = "_Node_1b5sv_59", un = "_Row_1b5sv_63", dn = "_RowHighlight_1b5sv_76", fn = "_Chevron_1b5sv_80", gn = "_ChevronExpanded_1b5sv_93", mn = "_ChevronSpacer_1b5sv_97", hn = "_Key_1b5sv_103", pn = "_Colon_1b5sv_107", yn = "_Value_1b5sv_111", vn = "_Preview_1b5sv_129", bn = "_Comma_1b5sv_134", ne = {
1551
+ Root: nn,
1552
+ Toolbar: on,
1553
+ SearchInput: sn,
1554
+ CopyButton: an,
1555
+ Tree: cn,
1556
+ Node: ln,
1557
+ Row: un,
1558
+ RowHighlight: dn,
1559
+ Chevron: fn,
1560
+ ChevronExpanded: gn,
1561
+ ChevronSpacer: mn,
1562
+ Key: hn,
1563
+ Colon: pn,
1564
+ Value: yn,
1565
+ Preview: vn,
1566
+ Comma: bn
1564
1567
  };
1565
- function Je(...e) {
1568
+ function Xe(...e) {
1566
1569
  return e.filter(Boolean).join(" ");
1567
1570
  }
1568
- function xt(e) {
1571
+ function Nt(e) {
1569
1572
  return e === null ? "null" : e === void 0 ? "undefined" : Array.isArray(e) ? "array" : typeof e;
1570
1573
  }
1571
- function fn(e) {
1574
+ function wn(e) {
1572
1575
  return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "string" ? JSON.stringify(e) : String(e);
1573
1576
  }
1574
- function mn(e, t) {
1577
+ function _n(e, t) {
1575
1578
  return typeof e == "boolean" ? e : t < e;
1576
1579
  }
1577
- function Ct(e, t, r) {
1580
+ function At(e, t, r) {
1578
1581
  const n = r.toLowerCase();
1579
1582
  return !!(e.toLowerCase().includes(n) || typeof t == "string" && t.toLowerCase().includes(n) || typeof t == "number" && String(t).includes(n) || typeof t == "boolean" && String(t).includes(n));
1580
1583
  }
1581
- function Se(e) {
1584
+ function Me(e) {
1582
1585
  return e !== null && (typeof e == "object" || typeof e == "function");
1583
1586
  }
1584
- function Rt(e, t, r, n) {
1587
+ function Lt(e, t, r, n) {
1585
1588
  if (!t) return !1;
1586
- const c = xt(e);
1587
- if (c !== "object" && c !== "array" || e == null || Se(e) && r.has(e)) return !1;
1588
- if (Se(e) && n.has(e)) return n.get(e);
1589
- const u = {
1590
- has: (a) => a === e || r.has(a)
1589
+ const c = Nt(e);
1590
+ if (c !== "object" && c !== "array" || e == null || Me(e) && r.has(e)) return !1;
1591
+ if (Me(e) && n.has(e)) return n.get(e);
1592
+ const i = {
1593
+ has: (d) => d === e || r.has(d)
1591
1594
  };
1592
1595
  let l = !1;
1593
- for (const [a, p] of Object.entries(e))
1594
- if (Ct(a, p, t) || Rt(p, t, u, n)) {
1596
+ for (const [d, y] of Object.entries(e))
1597
+ if (At(d, y, t) || Lt(y, t, i, n)) {
1595
1598
  l = !0;
1596
1599
  break;
1597
1600
  }
1598
- return Se(e) && n.set(e, l), l;
1601
+ return Me(e) && n.set(e, l), l;
1599
1602
  }
1600
- function St(e) {
1601
- const t = be.c(80), {
1603
+ function Pt(e) {
1604
+ const t = Ce.c(80), {
1602
1605
  nodeKey: r,
1603
1606
  value: n,
1604
1607
  depth: c,
1605
- defaultExpanded: u,
1608
+ defaultExpanded: i,
1606
1609
  searchQuery: l,
1607
- isLast: a,
1608
- ancestors: p,
1609
- searchCache: g
1610
+ isLast: d,
1611
+ ancestors: y,
1612
+ searchCache: h
1610
1613
  } = e;
1611
- let x;
1612
- t[0] !== n ? (x = xt(n), t[0] = n, t[1] = x) : x = t[1];
1613
- const M = x, m = M === "object" || M === "array";
1614
+ let k;
1615
+ t[0] !== n ? (k = Nt(n), t[0] = n, t[1] = k) : k = t[1];
1616
+ const j = k, m = j === "object" || j === "array";
1614
1617
  let T;
1615
- t[2] !== p || t[3] !== m || t[4] !== n ? (T = m && Se(n) && p.has(n), t[2] = p, t[3] = m, t[4] = n, t[5] = T) : T = t[5];
1618
+ t[2] !== y || t[3] !== m || t[4] !== n ? (T = m && Me(n) && y.has(n), t[2] = y, t[3] = m, t[4] = n, t[5] = T) : T = t[5];
1616
1619
  const R = T;
1617
1620
  let H;
1618
- t[6] !== u || t[7] !== c || t[8] !== R || t[9] !== m ? (H = () => m && !R && mn(u, c), t[6] = u, t[7] = c, t[8] = R, t[9] = m, t[10] = H) : H = t[10];
1619
- const [N, q] = Pe(H), C = Y(!1), I = Y(!1);
1620
- let W;
1621
- t[11] !== p || t[12] !== g || t[13] !== l || t[14] !== n ? (W = l ? Rt(n, l, p, g) : !1, t[11] = p, t[12] = g, t[13] = l, t[14] = n, t[15] = W) : W = t[15];
1622
- const U = W;
1623
- let P, F;
1624
- t[16] !== N || t[17] !== U || t[18] !== R || t[19] !== m || t[20] !== l ? (P = () => {
1625
- l && U && m && !R && !N && (C.current || (I.current = N), C.current = !0, q(!0)), C.current && (!l || !U) && (C.current = !1, q(I.current));
1626
- }, F = [l, U, m, R, N], t[16] = N, t[17] = U, t[18] = R, t[19] = m, t[20] = l, t[21] = P, t[22] = F) : (P = t[21], F = t[22]), V(P, F);
1627
- let D;
1621
+ t[6] !== i || t[7] !== c || t[8] !== R || t[9] !== m ? (H = () => m && !R && _n(i, c), t[6] = i, t[7] = c, t[8] = R, t[9] = m, t[10] = H) : H = t[10];
1622
+ const [x, z] = me(H), S = G(!1), D = G(!1);
1623
+ let I;
1624
+ t[11] !== y || t[12] !== h || t[13] !== l || t[14] !== n ? (I = l ? Lt(n, l, y, h) : !1, t[11] = y, t[12] = h, t[13] = l, t[14] = n, t[15] = I) : I = t[15];
1625
+ const B = I;
1626
+ let N, q;
1627
+ t[16] !== x || t[17] !== B || t[18] !== R || t[19] !== m || t[20] !== l ? (N = () => {
1628
+ l && B && m && !R && !x && (S.current || (D.current = x), S.current = !0, z(!0)), S.current && (!l || !B) && (S.current = !1, z(D.current));
1629
+ }, q = [l, B, m, R, x], t[16] = x, t[17] = B, t[18] = R, t[19] = m, t[20] = l, t[21] = N, t[22] = q) : (N = t[21], q = t[22]), U(N, q);
1630
+ let P;
1628
1631
  e: {
1629
- if (!m || !Se(n) || R) {
1630
- D = p;
1632
+ if (!m || !Me(n) || R) {
1633
+ P = y;
1631
1634
  break e;
1632
1635
  }
1633
- let G;
1634
- t[23] !== p || t[24] !== n ? (G = {
1635
- has: (ce) => ce === n || p.has(ce)
1636
- }, t[23] = p, t[24] = n, t[25] = G) : G = t[25], D = G;
1636
+ let X;
1637
+ t[23] !== y || t[24] !== n ? (X = {
1638
+ has: (ce) => ce === n || y.has(ce)
1639
+ }, t[23] = y, t[24] = n, t[25] = X) : X = t[25], P = X;
1637
1640
  }
1638
- const X = D;
1639
- let ne;
1641
+ const V = P;
1642
+ let K;
1640
1643
  e: {
1641
1644
  if (!m || n === null || n === void 0 || R) {
1642
1645
  let ce;
1643
- t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], ne = ce;
1646
+ t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], K = ce;
1644
1647
  break e;
1645
1648
  }
1646
- let G;
1647
- t[27] !== n ? (G = Object.entries(n), t[27] = n, t[28] = G) : G = t[28], ne = G;
1649
+ let X;
1650
+ t[27] !== n ? (X = Object.entries(n), t[27] = n, t[28] = X) : X = t[28], K = X;
1648
1651
  }
1649
- const v = ne;
1650
- let s;
1651
- t[29] !== R || t[30] !== m ? (s = () => {
1652
- m && !R && q(hn);
1653
- }, t[29] = R, t[30] = m, t[31] = s) : s = t[31];
1654
- const _ = s;
1655
- let k;
1656
- t[32] !== r || t[33] !== l || t[34] !== n ? (k = l && Ct(r, n, l), t[32] = r, t[33] = l, t[34] = n, t[35] = k) : k = t[35];
1657
- const i = k, d = R ? "[Circular]" : m ? M === "array" ? `Array(${n.length})` : `{${v.length}}` : null, h = i && re.RowHighlight;
1658
- let f;
1659
- t[36] !== h ? (f = Je(re.Row, h), t[36] = h, t[37] = f) : f = t[37];
1660
- const y = `${c * 16}px`;
1661
- let b;
1662
- t[38] !== y ? (b = {
1663
- "--_inspector-depth-indent": y
1664
- }, t[38] = y, t[39] = b) : b = t[39];
1665
- const o = b;
1652
+ const b = K;
1653
+ let o;
1654
+ t[29] !== R || t[30] !== m ? (o = () => {
1655
+ m && !R && z(Cn);
1656
+ }, t[29] = R, t[30] = m, t[31] = o) : o = t[31];
1657
+ const v = o;
1658
+ let p;
1659
+ t[32] !== r || t[33] !== l || t[34] !== n ? (p = l && At(r, n, l), t[32] = r, t[33] = l, t[34] = n, t[35] = p) : p = t[35];
1660
+ const s = p, u = R ? "[Circular]" : m ? j === "array" ? `Array(${n.length})` : `{${b.length}}` : null, f = s && ne.RowHighlight;
1661
+ let g;
1662
+ t[36] !== f ? (g = Xe(ne.Row, f), t[36] = f, t[37] = g) : g = t[37];
1663
+ const _ = `${c * 16}px`;
1664
+ let C;
1665
+ t[38] !== _ ? (C = {
1666
+ "--_inspector-depth-indent": _
1667
+ }, t[38] = _, t[39] = C) : C = t[39];
1668
+ const a = C;
1666
1669
  let w;
1667
- t[40] !== _ ? (w = (G) => {
1668
- (G.key === "Enter" || G.key === " ") && (G.preventDefault(), _());
1669
- }, t[40] = _, t[41] = w) : w = t[41];
1670
- const A = m && !R ? N : void 0, j = `inspector-node-${r}`;
1671
- let B;
1672
- t[42] !== N || t[43] !== R || t[44] !== m ? (B = m && !R ? /* @__PURE__ */ S.jsx("span", { className: Je(re.Chevron, N && re.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ S.jsx("span", { className: re.ChevronSpacer }), t[42] = N, t[43] = R, t[44] = m, t[45] = B) : B = t[45];
1670
+ t[40] !== v ? (w = (X) => {
1671
+ (X.key === "Enter" || X.key === " ") && (X.preventDefault(), v());
1672
+ }, t[40] = v, t[41] = w) : w = t[41];
1673
+ const A = m && !R ? x : void 0, L = `inspector-node-${r}`;
1674
+ let F;
1675
+ t[42] !== x || t[43] !== R || t[44] !== m ? (F = m && !R ? /* @__PURE__ */ E.jsx("span", { className: Xe(ne.Chevron, x && ne.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ E.jsx("span", { className: ne.ChevronSpacer }), t[42] = x, t[43] = R, t[44] = m, t[45] = F) : F = t[45];
1673
1676
  let O;
1674
- t[46] !== r ? (O = /* @__PURE__ */ S.jsx("span", { className: re.Key, children: r }), t[46] = r, t[47] = O) : O = t[47];
1675
- let L;
1676
- t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ S.jsx("span", { className: re.Colon, children: ": " }), t[48] = L) : L = t[48];
1677
+ t[46] !== r ? (O = /* @__PURE__ */ E.jsx("span", { className: ne.Key, children: r }), t[46] = r, t[47] = O) : O = t[47];
1678
+ let $;
1679
+ t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ E.jsx("span", { className: ne.Colon, children: ": " }), t[48] = $) : $ = t[48];
1677
1680
  let J;
1678
- t[49] !== m || t[50] !== d || t[51] !== M || t[52] !== n ? (J = m ? /* @__PURE__ */ S.jsx("span", { className: re.Preview, children: d }) : /* @__PURE__ */ S.jsx("span", { className: re.Value, "data-type": M, children: fn(n) }), t[49] = m, t[50] = d, t[51] = M, t[52] = n, t[53] = J) : J = t[53];
1679
- let Q;
1680
- t[54] !== N || t[55] !== a ? (Q = !a && !N && /* @__PURE__ */ S.jsx("span", { className: re.Comma, children: "," }), t[54] = N, t[55] = a, t[56] = Q) : Q = t[56];
1681
+ t[49] !== m || t[50] !== u || t[51] !== j || t[52] !== n ? (J = m ? /* @__PURE__ */ E.jsx("span", { className: ne.Preview, children: u }) : /* @__PURE__ */ E.jsx("span", { className: ne.Value, "data-type": j, children: wn(n) }), t[49] = m, t[50] = u, t[51] = j, t[52] = n, t[53] = J) : J = t[53];
1682
+ let Z;
1683
+ t[54] !== x || t[55] !== d ? (Z = !d && !x && /* @__PURE__ */ E.jsx("span", { className: ne.Comma, children: "," }), t[54] = x, t[55] = d, t[56] = Z) : Z = t[56];
1681
1684
  let oe;
1682
- t[57] !== f || t[58] !== o || t[59] !== w || t[60] !== A || t[61] !== j || t[62] !== B || t[63] !== O || t[64] !== J || t[65] !== Q || t[66] !== _ ? (oe = /* @__PURE__ */ S.jsxs("div", { className: f, style: o, onClick: _, onKeyDown: w, tabIndex: 0, role: "treeitem", "aria-expanded": A, "data-testid": j, children: [
1683
- B,
1685
+ t[57] !== g || t[58] !== a || t[59] !== w || t[60] !== A || t[61] !== L || t[62] !== F || t[63] !== O || t[64] !== J || t[65] !== Z || t[66] !== v ? (oe = /* @__PURE__ */ E.jsxs("div", { className: g, style: a, onClick: v, onKeyDown: w, tabIndex: 0, role: "treeitem", "aria-expanded": A, "data-testid": L, children: [
1686
+ F,
1684
1687
  O,
1685
- L,
1688
+ $,
1686
1689
  J,
1687
- Q
1688
- ] }), t[57] = f, t[58] = o, t[59] = w, t[60] = A, t[61] = j, t[62] = B, t[63] = O, t[64] = J, t[65] = Q, t[66] = _, t[67] = oe) : oe = t[67];
1690
+ Z
1691
+ ] }), t[57] = g, t[58] = a, t[59] = w, t[60] = A, t[61] = L, t[62] = F, t[63] = O, t[64] = J, t[65] = Z, t[66] = v, t[67] = oe) : oe = t[67];
1689
1692
  let le;
1690
- t[68] !== X || t[69] !== u || t[70] !== c || t[71] !== v || t[72] !== N || t[73] !== g || t[74] !== l ? (le = N && v.map((G, ce) => {
1691
- const [ee, Le] = G;
1692
- return /* @__PURE__ */ S.jsx(St, { nodeKey: ee, value: Le, depth: c + 1, defaultExpanded: u, searchQuery: l, isLast: ce === v.length - 1, ancestors: X, searchCache: g }, ee);
1693
- }), t[68] = X, t[69] = u, t[70] = c, t[71] = v, t[72] = N, t[73] = g, t[74] = l, t[75] = le) : le = t[75];
1693
+ t[68] !== V || t[69] !== i || t[70] !== c || t[71] !== b || t[72] !== x || t[73] !== h || t[74] !== l ? (le = x && b.map((X, ce) => {
1694
+ const [te, Ie] = X;
1695
+ return /* @__PURE__ */ E.jsx(Pt, { nodeKey: te, value: Ie, depth: c + 1, defaultExpanded: i, searchQuery: l, isLast: ce === b.length - 1, ancestors: V, searchCache: h }, te);
1696
+ }), t[68] = V, t[69] = i, t[70] = c, t[71] = b, t[72] = x, t[73] = h, t[74] = l, t[75] = le) : le = t[75];
1694
1697
  let ae;
1695
- return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ S.jsxs("div", { className: re.Node, "data-depth": c, children: [
1698
+ return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ E.jsxs("div", { className: ne.Node, "data-depth": c, children: [
1696
1699
  oe,
1697
1700
  le
1698
1701
  ] }), t[76] = c, t[77] = oe, t[78] = le, t[79] = ae) : ae = t[79], ae;
1699
1702
  }
1700
- function hn(e) {
1703
+ function Cn(e) {
1701
1704
  return !e;
1702
1705
  }
1703
- const gn = /* @__PURE__ */ new WeakSet(), pn = ve(function({
1706
+ const xn = /* @__PURE__ */ new WeakSet(), kn = _e(function({
1704
1707
  data: t,
1705
1708
  format: r = "json",
1706
1709
  defaultExpanded: n = 1,
1707
1710
  searchable: c = !1,
1708
- copyable: u = !1,
1711
+ copyable: i = !1,
1709
1712
  className: l,
1710
- ...a
1711
- }, p) {
1712
- const [g, x] = Pe(""), M = Ne(async () => {
1713
+ ...d
1714
+ }, y) {
1715
+ const [h, k] = me(""), j = De(async () => {
1713
1716
  try {
1714
1717
  let R;
1715
- r === "yaml" ? R = Ge(t) : R = yn(t), await navigator.clipboard.writeText(R);
1718
+ r === "yaml" ? R = Ze(t) : R = Rn(t), await navigator.clipboard.writeText(R);
1716
1719
  } catch {
1717
1720
  }
1718
- }, [t, r]), m = gn, T = Ae(() => /* @__PURE__ */ new WeakMap(), [g]);
1719
- return /* @__PURE__ */ S.jsxs("div", { ref: p, className: Je(re.Root, l), "data-testid": "object-inspector", "data-format": r, ...a, children: [
1720
- (c || u) && /* @__PURE__ */ S.jsxs("div", { className: re.Toolbar, children: [
1721
- c && /* @__PURE__ */ S.jsx("input", { className: re.SearchInput, type: "text", value: g, onChange: (R) => x(R.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
1722
- u && /* @__PURE__ */ S.jsx("button", { className: re.CopyButton, onClick: M, "data-testid": "inspector-copy", type: "button", children: "Copy" })
1721
+ }, [t, r]), m = xn, T = Oe(() => /* @__PURE__ */ new WeakMap(), [h]);
1722
+ return /* @__PURE__ */ E.jsxs("div", { ref: y, className: Xe(ne.Root, l), "data-testid": "object-inspector", "data-format": r, ...d, children: [
1723
+ (c || i) && /* @__PURE__ */ E.jsxs("div", { className: ne.Toolbar, children: [
1724
+ c && /* @__PURE__ */ E.jsx("input", { className: ne.SearchInput, type: "text", value: h, onChange: (R) => k(R.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
1725
+ i && /* @__PURE__ */ E.jsx("button", { className: ne.CopyButton, onClick: j, "data-testid": "inspector-copy", type: "button", children: "Copy" })
1723
1726
  ] }),
1724
- /* @__PURE__ */ S.jsx("div", { className: re.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ S.jsx(St, { nodeKey: "root", value: t, depth: 0, defaultExpanded: n, searchQuery: g, isLast: !0, ancestors: m, searchCache: T }) })
1727
+ /* @__PURE__ */ E.jsx("div", { className: ne.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ E.jsx(Pt, { nodeKey: "root", value: t, depth: 0, defaultExpanded: n, searchQuery: h, isLast: !0, ancestors: m, searchCache: T }) })
1725
1728
  ] });
1726
1729
  });
1727
- pn.displayName = "ObjectInspector";
1728
- function yn(e) {
1730
+ kn.displayName = "ObjectInspector";
1731
+ function Rn(e) {
1729
1732
  const t = [];
1730
1733
  return JSON.stringify(e, function(r, n) {
1731
1734
  if (typeof n != "object" || n === null) return n;
@@ -1734,268 +1737,752 @@ function yn(e) {
1734
1737
  return t.includes(n) ? "[Circular]" : (t.push(n), n);
1735
1738
  }, 2);
1736
1739
  }
1737
- function Et(e) {
1740
+ function Ot(e) {
1738
1741
  return !!(e === "" || /^[\s]/.test(e) || /[\s]$/.test(e) || /^[-?:,[\]{}#&*!|>'"%@`]/.test(e) || /[:\s]#|:\s|[{}[\],]/.test(e) || /^(true|false|yes|no|on|off|null|~)$/i.test(e) || /^[+-]?(\d+\.?\d*|\.inf|\.nan)$/i.test(e));
1739
1742
  }
1740
- function Tt(e) {
1743
+ function Dt(e) {
1741
1744
  return '"' + e.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r") + '"';
1742
1745
  }
1743
- function vn(e, t) {
1746
+ function Sn(e, t) {
1744
1747
  const r = " ".repeat(t);
1745
1748
  return e.includes(`
1746
1749
  `) ? `|
1747
1750
  ${r} ${e.split(`
1748
1751
  `).join(`
1749
- ${r} `)}` : Et(e) ? Tt(e) : e;
1752
+ ${r} `)}` : Ot(e) ? Dt(e) : e;
1750
1753
  }
1751
- function Ge(e, t = 0, r) {
1754
+ function Ze(e, t = 0, r) {
1752
1755
  const n = " ".repeat(t);
1753
1756
  if (e === null || e === void 0) return "null";
1754
- if (typeof e == "string") return vn(e, t);
1757
+ if (typeof e == "string") return Sn(e, t);
1755
1758
  if (typeof e == "number" || typeof e == "boolean") return String(e);
1756
1759
  if (typeof e == "object") {
1757
1760
  const c = r ?? [];
1758
1761
  if (c.includes(e)) return '"[Circular]"';
1759
- const u = [...c, e];
1762
+ const i = [...c, e];
1760
1763
  if (Array.isArray(e))
1761
- return e.length === 0 ? "[]" : e.map((a) => `${n}- ${Ge(a, t + 1, u).trimStart()}`).join(`
1764
+ return e.length === 0 ? "[]" : e.map((d) => `${n}- ${Ze(d, t + 1, i).trimStart()}`).join(`
1762
1765
  `);
1763
1766
  const l = Object.entries(e);
1764
- return l.length === 0 ? "{}" : l.map(([a, p]) => {
1765
- const g = Et(a) ? Tt(a) : a, x = Ge(p, t + 1, u);
1766
- return typeof p == "object" && p !== null && (Array.isArray(p) ? p.length > 0 : Object.keys(p).length > 0) ? `${n}${g}:
1767
- ${x}` : `${n}${g}: ${x}`;
1767
+ return l.length === 0 ? "{}" : l.map(([d, y]) => {
1768
+ const h = Ot(d) ? Dt(d) : d, k = Ze(y, t + 1, i);
1769
+ return typeof y == "object" && y !== null && (Array.isArray(y) ? y.length > 0 : Object.keys(y).length > 0) ? `${n}${h}:
1770
+ ${k}` : `${n}${h}: ${k}`;
1768
1771
  }).join(`
1769
1772
  `);
1770
1773
  }
1771
1774
  return String(e);
1772
1775
  }
1773
- var jt;
1776
+ const we = "cel", vt = /* @__PURE__ */ new WeakSet();
1777
+ function En(e) {
1778
+ vt.has(e) || (vt.add(e), e.languages.register({
1779
+ id: we,
1780
+ extensions: [".cel"],
1781
+ aliases: ["CEL"]
1782
+ }), e.languages.setLanguageConfiguration(we, {
1783
+ comments: {
1784
+ lineComment: "//"
1785
+ },
1786
+ brackets: [["{", "}"], ["[", "]"], ["(", ")"]],
1787
+ autoClosingPairs: [{
1788
+ open: "{",
1789
+ close: "}"
1790
+ }, {
1791
+ open: "[",
1792
+ close: "]"
1793
+ }, {
1794
+ open: "(",
1795
+ close: ")"
1796
+ }, {
1797
+ open: '"',
1798
+ close: '"',
1799
+ notIn: ["string", "comment"]
1800
+ }, {
1801
+ open: "'",
1802
+ close: "'",
1803
+ notIn: ["string", "comment"]
1804
+ }],
1805
+ surroundingPairs: [{
1806
+ open: "{",
1807
+ close: "}"
1808
+ }, {
1809
+ open: "[",
1810
+ close: "]"
1811
+ }, {
1812
+ open: "(",
1813
+ close: ")"
1814
+ }, {
1815
+ open: '"',
1816
+ close: '"'
1817
+ }, {
1818
+ open: "'",
1819
+ close: "'"
1820
+ }],
1821
+ wordPattern: /[a-zA-Z_][a-zA-Z_0-9]*/g
1822
+ }), e.languages.setMonarchTokensProvider(we, {
1823
+ keywords: ["true", "false", "null", "in"],
1824
+ tokenizer: {
1825
+ root: [[/\/\/.*$/, "comment"], [/[rR]?[bB]?'''/, "string", "@tripleSingle"], [/[rR]?[bB]?"""/, "string", "@tripleDouble"], [/[rR]?[bB]?'/, "string", "@single"], [/[rR]?[bB]?"/, "string", "@double"], [/0[xX][0-9a-fA-F]+[uU]?/, "number.hex"], [/(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?[uU]?/, "number"], [/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/, "type.identifier"], [/[a-zA-Z_][a-zA-Z_0-9]*/, {
1826
+ cases: {
1827
+ "@keywords": "keyword",
1828
+ "@default": "identifier"
1829
+ }
1830
+ }], [/[{}()[\]]/, "@brackets"], [/[!<>=&|+*/%?:-]+/, "operator"], [/[.,]/, "delimiter"], [/\s+/, "white"]],
1831
+ single: [[/\\./, "string.escape"], [/'/, "string", "@pop"], [/[^'\\]+/, "string"]],
1832
+ double: [[/\\./, "string.escape"], [/"/, "string", "@pop"], [/[^"\\]+/, "string"]],
1833
+ tripleSingle: [[/'''/, "string", "@pop"], [/\\./, "string.escape"], [/[^'\\]+|'/, "string"]],
1834
+ tripleDouble: [[/"""/, "string", "@pop"], [/\\./, "string.escape"], [/[^"\\]+|"/, "string"]]
1835
+ }
1836
+ }));
1837
+ }
1838
+ function bt(e, t) {
1839
+ const r = or(e, t);
1840
+ let n = 1, c = 0;
1841
+ for (let i = 0; i < r; i++)
1842
+ if (e[i] === "\r" || e[i] === `
1843
+ `) {
1844
+ if (e[i] === "\r" && e[i + 1] === `
1845
+ ` && i++, i >= r) throw new RangeError("Offset splits a line ending");
1846
+ n++, c = i + 1;
1847
+ }
1848
+ return {
1849
+ lineNumber: n,
1850
+ column: r - c + 1
1851
+ };
1852
+ }
1853
+ function Tn(e, t) {
1854
+ if (!Number.isSafeInteger(t.lineNumber) || t.lineNumber < 1 || !Number.isSafeInteger(t.column) || t.column < 1) throw new RangeError("Expected a one-based source position");
1855
+ let r = 1, n = 0;
1856
+ for (; r < t.lineNumber; ) {
1857
+ let l = n;
1858
+ for (; l < e.length && e[l] !== "\r" && e[l] !== `
1859
+ `; ) l++;
1860
+ if (l === e.length) throw new RangeError("Position exceeds source lines");
1861
+ n = l + (e[l] === "\r" && e[l + 1] === `
1862
+ ` ? 2 : 1), r++;
1863
+ }
1864
+ const c = n + t.column - 1;
1865
+ let i = n;
1866
+ for (; i < e.length && e[i] !== "\r" && e[i] !== `
1867
+ `; ) i++;
1868
+ if (c > i) throw new RangeError("Position exceeds source line");
1869
+ return nr(e, c);
1870
+ }
1871
+ function Mn(e, t) {
1872
+ let r = 0;
1873
+ const n = e.toLocaleLowerCase();
1874
+ for (const c of t.toLocaleLowerCase())
1875
+ if (c === n[r] && r++, r === n.length) return !0;
1876
+ return n.length === 0;
1877
+ }
1878
+ function Ae() {
1879
+ let e;
1880
+ return {
1881
+ begin() {
1882
+ return e?.abort(), e = new AbortController(), e;
1883
+ },
1884
+ current(t) {
1885
+ return e === t && !t.signal.aborted;
1886
+ },
1887
+ cancel() {
1888
+ e?.abort(), e = void 0;
1889
+ }
1890
+ };
1891
+ }
1892
+ function jn(e, t = 250) {
1893
+ let r;
1894
+ const n = () => {
1895
+ clearTimeout(r), r = void 0;
1896
+ };
1897
+ return {
1898
+ schedule(c = t) {
1899
+ n(), r = setTimeout(() => {
1900
+ r = void 0, e();
1901
+ }, c);
1902
+ },
1903
+ immediate() {
1904
+ n(), e();
1905
+ },
1906
+ cancel: n
1907
+ };
1908
+ }
1909
+ function Nn(e, t, r, n, c = 250) {
1910
+ const i = e.getModel();
1911
+ if (!i) throw new Error("CEL editor requires its own model");
1912
+ En(t), t.editor.setModelLanguage(i, we);
1913
+ const l = Ae(), d = Ae(), y = Ae(), h = Ae();
1914
+ let k = !1, j = !1, m = 0, T, R = !1, H = !1, x;
1915
+ const z = `cel:${i.uri.toString()}`, S = {
1916
+ language: we,
1917
+ scheme: i.uri.scheme,
1918
+ pattern: i.uri.path
1919
+ }, D = () => {
1920
+ const o = r();
1921
+ return k || i.isDisposed() || j || o.disabled || !!(o.availability && o.availability.status !== "ready");
1922
+ };
1923
+ function I() {
1924
+ e.trigger("cel", "closeParameterHints", {}), e.getContribution("editor.contrib.contentHover")?._hideWidgets();
1925
+ }
1926
+ function B(o, v) {
1927
+ if (v.unit !== "utf8-byte" || v.end < v.start) throw new RangeError("Expected a half-open UTF-8 range");
1928
+ const p = bt(o, v.start), s = bt(o, v.end);
1929
+ return {
1930
+ startLineNumber: p.lineNumber,
1931
+ startColumn: p.column,
1932
+ endLineNumber: s.lineNumber,
1933
+ endColumn: s.column
1934
+ };
1935
+ }
1936
+ async function N(o, v, p, s) {
1937
+ if (!o || D() || s?.isCancellationRequested) return;
1938
+ const u = r(), f = {
1939
+ ...u.document,
1940
+ uri: i.uri.toString()
1941
+ }, g = i.getVersionId(), _ = m, C = p.begin(), a = s?.onCancellationRequested(() => C.abort());
1942
+ try {
1943
+ const w = await o({
1944
+ document: f,
1945
+ contextKey: u.contextKey,
1946
+ cursor: {
1947
+ offset: Tn(f.text, v),
1948
+ unit: "utf8-byte"
1949
+ },
1950
+ signal: C.signal
1951
+ }), A = r();
1952
+ return D() || !p.current(C) || _ !== m || i.isDisposed() || i.getVersionId() !== g || A.contextKey !== u.contextKey || A.document.version !== f.version || A.document.text !== f.text || w.documentVersion !== f.version || w.contextKey !== u.contextKey ? void 0 : (w.status !== "ready" && w.status !== "empty" && n(w.message ?? `CEL language service ${w.status}.`), w);
1953
+ } catch (w) {
1954
+ !C.signal.aborted && p.current(C) && !k && n(w instanceof Error ? w.message : "CEL language service request failed.");
1955
+ return;
1956
+ } finally {
1957
+ a?.dispose();
1958
+ }
1959
+ }
1960
+ function q(o) {
1961
+ if (o.status === "denied" || o.status === "unavailable") {
1962
+ t.editor.setModelMarkers(i, z, []);
1963
+ return;
1964
+ }
1965
+ const v = {
1966
+ error: t.MarkerSeverity.Error,
1967
+ warning: t.MarkerSeverity.Warning,
1968
+ info: t.MarkerSeverity.Info,
1969
+ hint: t.MarkerSeverity.Hint
1970
+ }, p = [];
1971
+ for (const s of o.diagnostics)
1972
+ try {
1973
+ p.push({
1974
+ ...B(r().document.text, s.range),
1975
+ severity: v[s.severity],
1976
+ message: s.message,
1977
+ source: "CEL",
1978
+ code: s.id
1979
+ });
1980
+ } catch {
1981
+ n("The language service returned an invalid UTF-8 diagnostic range.");
1982
+ }
1983
+ t.editor.setModelMarkers(i, z, p);
1984
+ }
1985
+ function P(o, v, p) {
1986
+ if (o.disabledReason) return;
1987
+ const s = r().document.text, u = B(s, o.edit.range);
1988
+ if (u.startLineNumber !== p.lineNumber || u.endLineNumber !== p.lineNumber || u.startColumn > p.column || u.endColumn < p.column) throw new RangeError("Completion range must contain the cursor on one line");
1989
+ const f = i.getValueInRange({
1990
+ ...u,
1991
+ endColumn: p.column
1992
+ });
1993
+ if (!Mn(f, o.filterText ?? o.label)) return;
1994
+ const g = {
1995
+ field: t.languages.CompletionItemKind.Field,
1996
+ operator: t.languages.CompletionItemKind.Operator,
1997
+ value: t.languages.CompletionItemKind.Value,
1998
+ parameter: t.languages.CompletionItemKind.Variable,
1999
+ function: t.languages.CompletionItemKind.Function
2000
+ };
2001
+ return {
2002
+ label: {
2003
+ label: o.label,
2004
+ detail: o.type ? `: ${o.type}` : void 0
2005
+ },
2006
+ kind: g[o.kind],
2007
+ detail: o.detail ?? o.type,
2008
+ documentation: o.description || o.condition ? {
2009
+ value: [o.description, o.condition].filter(Boolean).join(`
2010
+
2011
+ `),
2012
+ isTrusted: !1
2013
+ } : void 0,
2014
+ filterText: o.filterText ?? o.label,
2015
+ sortText: o.sortText ?? String(v).padStart(6, "0"),
2016
+ insertText: o.edit.text,
2017
+ insertTextRules: o.insertTextFormat === "snippet" ? t.languages.CompletionItemInsertTextRule.InsertAsSnippet : void 0,
2018
+ range: u
2019
+ };
2020
+ }
2021
+ const V = jn(() => {
2022
+ if (D()) return;
2023
+ const o = r(), v = e.getPosition();
2024
+ v && (o.check && N(o.check, v, d).then((p) => {
2025
+ p && (n(p.message), q(p));
2026
+ }), o.request && !R && e.hasTextFocus() && (T = i.getVersionId(), e.trigger("cel", "editor.action.triggerSuggest", {})));
2027
+ }, c), K = [t.languages.registerCompletionItemProvider(S, {
2028
+ async provideCompletionItems(o, v, p, s) {
2029
+ if (o !== i || D()) return {
2030
+ suggestions: []
2031
+ };
2032
+ if (p.triggerKind !== 0 || T !== i.getVersionId()) return {
2033
+ suggestions: []
2034
+ };
2035
+ T = void 0;
2036
+ const u = r(), f = await N(u.request, v, l, s);
2037
+ if (!f) return {
2038
+ suggestions: []
2039
+ };
2040
+ if (u.check || q(f), f.status !== "ready") return {
2041
+ suggestions: []
2042
+ };
2043
+ n(f.message);
2044
+ const g = [];
2045
+ for (const [_, C] of f.completions.slice(0, u.maxSuggestions ?? 100).entries())
2046
+ try {
2047
+ const a = P(C, _, v);
2048
+ a && g.push(a);
2049
+ } catch {
2050
+ n("The language service returned an invalid UTF-8 completion range.");
2051
+ }
2052
+ return {
2053
+ suggestions: g,
2054
+ incomplete: f.incomplete ?? !1
2055
+ };
2056
+ }
2057
+ }), t.languages.registerHoverProvider(S, {
2058
+ async provideHover(o, v, p) {
2059
+ if (o !== i) return;
2060
+ const s = await N(r().hover, v, y, p);
2061
+ if (!(s?.status !== "ready" || !s.hover))
2062
+ try {
2063
+ return {
2064
+ range: B(r().document.text, s.hover.range),
2065
+ contents: [{
2066
+ value: s.hover.contents,
2067
+ isTrusted: !1
2068
+ }]
2069
+ };
2070
+ } catch {
2071
+ n("The language service returned an invalid UTF-8 hover range.");
2072
+ return;
2073
+ }
2074
+ }
2075
+ }), t.languages.registerSignatureHelpProvider(S, {
2076
+ signatureHelpTriggerCharacters: ["(", ","],
2077
+ signatureHelpRetriggerCharacters: [","],
2078
+ async provideSignatureHelp(o, v, p) {
2079
+ if (o !== i) return;
2080
+ const s = await N(r().signature, v, h, p);
2081
+ if (s?.status !== "ready" || !s.signature) return;
2082
+ const u = s.signature;
2083
+ return {
2084
+ value: {
2085
+ activeSignature: 0,
2086
+ activeParameter: Math.max(0, Math.min(u.activeParameter, u.parameters.length - 1)),
2087
+ signatures: [{
2088
+ label: u.label,
2089
+ documentation: u.documentation ? {
2090
+ value: u.documentation,
2091
+ isTrusted: !1
2092
+ } : void 0,
2093
+ parameters: u.parameters.map((f) => ({
2094
+ label: f.label,
2095
+ documentation: f.documentation ? {
2096
+ value: f.documentation,
2097
+ isTrusted: !1
2098
+ } : void 0
2099
+ }))
2100
+ }]
2101
+ },
2102
+ dispose() {
2103
+ }
2104
+ };
2105
+ }
2106
+ }), e.onDidChangeModelContent(() => {
2107
+ H = !0, R = !1, T = void 0, l.cancel(), d.cancel(), y.cancel(), h.cancel(), e.trigger("cel", "hideSuggestWidget", {}), t.editor.setModelMarkers(i, z, []), j || V.schedule(r().debounceMs ?? c);
2108
+ }), e.onDidChangeCursorPosition(() => {
2109
+ T = void 0, l.cancel(), h.cancel();
2110
+ }), e.onDidCompositionStart(() => {
2111
+ j = !0, T = void 0, V.cancel(), l.cancel(), d.cancel(), y.cancel(), h.cancel(), e.trigger("cel", "hideSuggestWidget", {}), I();
2112
+ }), e.onDidCompositionEnd(() => {
2113
+ j = !1, V.schedule(r().debounceMs ?? c);
2114
+ }), e.onKeyDown((o) => {
2115
+ o.keyCode === t.KeyCode.Escape && (T = void 0, R = !0, l.cancel());
2116
+ }), e.addAction({
2117
+ id: `cel.complete.${i.id}`,
2118
+ label: "CEL: Show contextual suggestions",
2119
+ precondition: "!suggestWidgetVisible || !suggestWidgetHasFocusedSuggestion",
2120
+ keybindings: [t.KeyMod.CtrlCmd | t.KeyCode.Space, t.KeyMod.WinCtrl | t.KeyCode.Space],
2121
+ run: () => {
2122
+ D() || (R = !1, V.immediate());
2123
+ }
2124
+ }), e.addAction({
2125
+ id: `cel.run.${i.id}`,
2126
+ label: "CEL: Run query",
2127
+ keybindings: [t.KeyMod.CtrlCmd | t.KeyCode.Enter],
2128
+ run: () => {
2129
+ D() || r().onSubmit?.();
2130
+ }
2131
+ })];
2132
+ function b() {
2133
+ if (k || i.isDisposed()) return;
2134
+ const o = r(), v = x && x.contextKey === o.contextKey && x.request === o.request && x.check === o.check && x.hover === o.hover && x.signature === o.signature && x.disabled === o.disabled && x.maxSuggestions === o.maxSuggestions && x.debounceMs === o.debounceMs && x.availability?.status === o.availability?.status && x.availability?.message === o.availability?.message;
2135
+ x && (x.contextKey !== o.contextKey || x.request !== o.request || x.check !== o.check || x.hover !== o.hover || x.signature !== o.signature) && x.onDocumentClose?.(i.uri.toString());
2136
+ const p = H && i.getValue() === o.document.text, s = x?.document.text === o.document.text && x.document.version === o.document.version;
2137
+ x = {
2138
+ ...o,
2139
+ document: {
2140
+ ...o.document
2141
+ },
2142
+ availability: o.availability ? {
2143
+ ...o.availability
2144
+ } : void 0
2145
+ }, H = !1, !(v && (p || s)) && (T = void 0, R = !1, m++, l.cancel(), d.cancel(), y.cancel(), h.cancel(), V.cancel(), e.trigger("cel", "hideSuggestWidget", {}), I(), t.editor.setModelMarkers(i, z, []), e.updateOptions({
2146
+ quickSuggestions: !1,
2147
+ suggestOnTriggerCharacters: !1,
2148
+ wordBasedSuggestions: "off",
2149
+ parameterHints: {
2150
+ enabled: !0
2151
+ },
2152
+ suggest: {
2153
+ showWords: !1,
2154
+ showStatusBar: !0,
2155
+ preview: !1,
2156
+ selectionMode: "always"
2157
+ },
2158
+ acceptSuggestionOnEnter: "on",
2159
+ tabCompletion: "off",
2160
+ renderValidationDecorations: "on",
2161
+ fixedOverflowWidgets: !0,
2162
+ padding: {
2163
+ top: 8,
2164
+ bottom: 8
2165
+ }
2166
+ }), n(r().availability?.message), D() || V.schedule(o.debounceMs ?? c));
2167
+ }
2168
+ return b(), {
2169
+ refresh: b,
2170
+ dispose() {
2171
+ if (!k) {
2172
+ k = !0, T = void 0, V.cancel(), l.cancel(), d.cancel(), y.cancel(), h.cancel(), x?.onDocumentClose?.(i.uri.toString());
2173
+ for (const o of K) o.dispose();
2174
+ i.isDisposed() || I(), i.isDisposed() || t.editor.setModelMarkers(i, z, []);
2175
+ }
2176
+ }
2177
+ };
2178
+ }
2179
+ const An = "_Root_im36v_1", Ln = "_Label_im36v_7", Pn = "_Surface_im36v_12", On = "_Placeholder_im36v_24", Dn = "_Loading_im36v_31", $n = "_Message_im36v_35", In = "_Hint_im36v_40", ve = {
2180
+ Root: An,
2181
+ Label: Ln,
2182
+ Surface: Pn,
2183
+ Placeholder: On,
2184
+ Loading: Dn,
2185
+ Message: $n,
2186
+ Hint: In
2187
+ }, Wn = Rt(() => Promise.resolve().then(() => Er).then((e) => ({
2188
+ default: e.CodeEditor
2189
+ })));
2190
+ let Hn = 0;
2191
+ function Mo(e) {
2192
+ const {
2193
+ document: t,
2194
+ contextKey: r,
2195
+ request: n,
2196
+ check: c,
2197
+ hover: i,
2198
+ signature: l,
2199
+ disabled: d,
2200
+ availability: y,
2201
+ debounceMs: h = 250,
2202
+ maxSuggestions: k = 100,
2203
+ label: j = "CEL query",
2204
+ placeholder: m = "Enter a CEL expression…",
2205
+ minHeight: T = 52,
2206
+ maxHeight: R = 180,
2207
+ className: H
2208
+ } = e, x = G(e);
2209
+ x.current = e;
2210
+ const [z] = me(() => `cel-query-${++Hn}:///query.cel`), [S, D] = me(T), [I, B] = me(), [N, q] = me(null), P = G(null), V = d || !!(y && y.status !== "ready");
2211
+ U(() => {
2212
+ const b = N?.editor.getModel();
2213
+ if (!N || !b || b.isDisposed()) return;
2214
+ const {
2215
+ editor: o,
2216
+ monaco: v
2217
+ } = N, p = Nn(o, v, () => x.current, B);
2218
+ P.current = p;
2219
+ const s = () => D(Math.max(x.current.minHeight ?? 52, Math.min(x.current.maxHeight ?? 180, o.getContentHeight())));
2220
+ s();
2221
+ const u = o.onDidContentSizeChange(s);
2222
+ return () => {
2223
+ u.dispose(), p.dispose(), P.current === p && (P.current = null);
2224
+ };
2225
+ }, [N]), U(() => {
2226
+ P.current?.refresh();
2227
+ }, [t.text, t.version, r, n, c, i, l, d, y?.status, y?.message, k, h, N]), U(() => {
2228
+ const b = N?.editor;
2229
+ b?.getModel() && (b.updateOptions({
2230
+ ariaLabel: j
2231
+ }), D(Math.max(T, Math.min(R, b.getContentHeight()))));
2232
+ }, [j, T, R, N]);
2233
+ function K(b, o) {
2234
+ q({
2235
+ editor: b,
2236
+ monaco: o
2237
+ }), x.current.onMount?.(b, o);
2238
+ }
2239
+ return /* @__PURE__ */ E.jsxs("div", { className: `${ve.Root} ${H ?? ""}`, "data-testid": "cel-query-editor", "data-context-key": r, "data-availability": y?.status ?? "ready", children: [
2240
+ /* @__PURE__ */ E.jsx("div", { className: ve.Label, children: j }),
2241
+ /* @__PURE__ */ E.jsxs("div", { className: ve.Surface, style: {
2242
+ "--_cel-editor-min-height": `${T}px`
2243
+ }, children: [
2244
+ /* @__PURE__ */ E.jsx(kt, { fallback: /* @__PURE__ */ E.jsx("div", { role: "status", className: ve.Loading, children: "Loading CEL editor…" }), children: /* @__PURE__ */ E.jsx(Wn, { value: t.text, onChange: (b) => {
2245
+ const o = x.current;
2246
+ x.current = {
2247
+ ...o,
2248
+ document: {
2249
+ text: b,
2250
+ version: o.document.version + 1
2251
+ }
2252
+ }, o.onChange(b);
2253
+ }, filename: z, language: we, readOnly: V, lineNumbers: !1, minimap: !1, wordWrap: !0, quickSuggestions: !1, diagnostics: !0, bordered: !1, height: S, onMount: K }) }),
2254
+ !t.text && !V ? /* @__PURE__ */ E.jsx("div", { className: ve.Placeholder, "aria-hidden": "true", children: m }) : null
2255
+ ] }),
2256
+ I || y?.message ? /* @__PURE__ */ E.jsx("div", { role: y?.status === "denied" || y?.status === "error" ? "alert" : "status", className: ve.Message, children: I ?? y?.message }) : null,
2257
+ /* @__PURE__ */ E.jsx("div", { className: ve.Hint, children: "Ctrl+Space suggestions · ⌘/Ctrl+Enter run · Enter accepts a suggestion" })
2258
+ ] });
2259
+ }
2260
+ var $t;
1774
2261
  (() => {
1775
- var e = { 975: (v) => {
1776
- function s(i) {
1777
- if (typeof i != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
2262
+ var e = { 975: (b) => {
2263
+ function o(s) {
2264
+ if (typeof s != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(s));
1778
2265
  }
1779
- function _(i, d) {
1780
- for (var h, f = "", y = 0, b = -1, o = 0, w = 0; w <= i.length; ++w) {
1781
- if (w < i.length) h = i.charCodeAt(w);
2266
+ function v(s, u) {
2267
+ for (var f, g = "", _ = 0, C = -1, a = 0, w = 0; w <= s.length; ++w) {
2268
+ if (w < s.length) f = s.charCodeAt(w);
1782
2269
  else {
1783
- if (h === 47) break;
1784
- h = 47;
2270
+ if (f === 47) break;
2271
+ f = 47;
1785
2272
  }
1786
- if (h === 47) {
1787
- if (!(b === w - 1 || o === 1)) if (b !== w - 1 && o === 2) {
1788
- if (f.length < 2 || y !== 2 || f.charCodeAt(f.length - 1) !== 46 || f.charCodeAt(f.length - 2) !== 46) {
1789
- if (f.length > 2) {
1790
- var A = f.lastIndexOf("/");
1791
- if (A !== f.length - 1) {
1792
- A === -1 ? (f = "", y = 0) : y = (f = f.slice(0, A)).length - 1 - f.lastIndexOf("/"), b = w, o = 0;
2273
+ if (f === 47) {
2274
+ if (!(C === w - 1 || a === 1)) if (C !== w - 1 && a === 2) {
2275
+ if (g.length < 2 || _ !== 2 || g.charCodeAt(g.length - 1) !== 46 || g.charCodeAt(g.length - 2) !== 46) {
2276
+ if (g.length > 2) {
2277
+ var A = g.lastIndexOf("/");
2278
+ if (A !== g.length - 1) {
2279
+ A === -1 ? (g = "", _ = 0) : _ = (g = g.slice(0, A)).length - 1 - g.lastIndexOf("/"), C = w, a = 0;
1793
2280
  continue;
1794
2281
  }
1795
- } else if (f.length === 2 || f.length === 1) {
1796
- f = "", y = 0, b = w, o = 0;
2282
+ } else if (g.length === 2 || g.length === 1) {
2283
+ g = "", _ = 0, C = w, a = 0;
1797
2284
  continue;
1798
2285
  }
1799
2286
  }
1800
- d && (f.length > 0 ? f += "/.." : f = "..", y = 2);
1801
- } else f.length > 0 ? f += "/" + i.slice(b + 1, w) : f = i.slice(b + 1, w), y = w - b - 1;
1802
- b = w, o = 0;
1803
- } else h === 46 && o !== -1 ? ++o : o = -1;
2287
+ u && (g.length > 0 ? g += "/.." : g = "..", _ = 2);
2288
+ } else g.length > 0 ? g += "/" + s.slice(C + 1, w) : g = s.slice(C + 1, w), _ = w - C - 1;
2289
+ C = w, a = 0;
2290
+ } else f === 46 && a !== -1 ? ++a : a = -1;
1804
2291
  }
1805
- return f;
2292
+ return g;
1806
2293
  }
1807
- var k = { resolve: function() {
1808
- for (var i, d = "", h = !1, f = arguments.length - 1; f >= -1 && !h; f--) {
1809
- var y;
1810
- f >= 0 ? y = arguments[f] : (i === void 0 && (i = process.cwd()), y = i), s(y), y.length !== 0 && (d = y + "/" + d, h = y.charCodeAt(0) === 47);
2294
+ var p = { resolve: function() {
2295
+ for (var s, u = "", f = !1, g = arguments.length - 1; g >= -1 && !f; g--) {
2296
+ var _;
2297
+ g >= 0 ? _ = arguments[g] : (s === void 0 && (s = process.cwd()), _ = s), o(_), _.length !== 0 && (u = _ + "/" + u, f = _.charCodeAt(0) === 47);
1811
2298
  }
1812
- return d = _(d, !h), h ? d.length > 0 ? "/" + d : "/" : d.length > 0 ? d : ".";
1813
- }, normalize: function(i) {
1814
- if (s(i), i.length === 0) return ".";
1815
- var d = i.charCodeAt(0) === 47, h = i.charCodeAt(i.length - 1) === 47;
1816
- return (i = _(i, !d)).length !== 0 || d || (i = "."), i.length > 0 && h && (i += "/"), d ? "/" + i : i;
1817
- }, isAbsolute: function(i) {
1818
- return s(i), i.length > 0 && i.charCodeAt(0) === 47;
2299
+ return u = v(u, !f), f ? u.length > 0 ? "/" + u : "/" : u.length > 0 ? u : ".";
2300
+ }, normalize: function(s) {
2301
+ if (o(s), s.length === 0) return ".";
2302
+ var u = s.charCodeAt(0) === 47, f = s.charCodeAt(s.length - 1) === 47;
2303
+ return (s = v(s, !u)).length !== 0 || u || (s = "."), s.length > 0 && f && (s += "/"), u ? "/" + s : s;
2304
+ }, isAbsolute: function(s) {
2305
+ return o(s), s.length > 0 && s.charCodeAt(0) === 47;
1819
2306
  }, join: function() {
1820
2307
  if (arguments.length === 0) return ".";
1821
- for (var i, d = 0; d < arguments.length; ++d) {
1822
- var h = arguments[d];
1823
- s(h), h.length > 0 && (i === void 0 ? i = h : i += "/" + h);
2308
+ for (var s, u = 0; u < arguments.length; ++u) {
2309
+ var f = arguments[u];
2310
+ o(f), f.length > 0 && (s === void 0 ? s = f : s += "/" + f);
1824
2311
  }
1825
- return i === void 0 ? "." : k.normalize(i);
1826
- }, relative: function(i, d) {
1827
- if (s(i), s(d), i === d || (i = k.resolve(i)) === (d = k.resolve(d))) return "";
1828
- for (var h = 1; h < i.length && i.charCodeAt(h) === 47; ++h) ;
1829
- for (var f = i.length, y = f - h, b = 1; b < d.length && d.charCodeAt(b) === 47; ++b) ;
1830
- for (var o = d.length - b, w = y < o ? y : o, A = -1, j = 0; j <= w; ++j) {
1831
- if (j === w) {
1832
- if (o > w) {
1833
- if (d.charCodeAt(b + j) === 47) return d.slice(b + j + 1);
1834
- if (j === 0) return d.slice(b + j);
1835
- } else y > w && (i.charCodeAt(h + j) === 47 ? A = j : j === 0 && (A = 0));
2312
+ return s === void 0 ? "." : p.normalize(s);
2313
+ }, relative: function(s, u) {
2314
+ if (o(s), o(u), s === u || (s = p.resolve(s)) === (u = p.resolve(u))) return "";
2315
+ for (var f = 1; f < s.length && s.charCodeAt(f) === 47; ++f) ;
2316
+ for (var g = s.length, _ = g - f, C = 1; C < u.length && u.charCodeAt(C) === 47; ++C) ;
2317
+ for (var a = u.length - C, w = _ < a ? _ : a, A = -1, L = 0; L <= w; ++L) {
2318
+ if (L === w) {
2319
+ if (a > w) {
2320
+ if (u.charCodeAt(C + L) === 47) return u.slice(C + L + 1);
2321
+ if (L === 0) return u.slice(C + L);
2322
+ } else _ > w && (s.charCodeAt(f + L) === 47 ? A = L : L === 0 && (A = 0));
1836
2323
  break;
1837
2324
  }
1838
- var B = i.charCodeAt(h + j);
1839
- if (B !== d.charCodeAt(b + j)) break;
1840
- B === 47 && (A = j);
2325
+ var F = s.charCodeAt(f + L);
2326
+ if (F !== u.charCodeAt(C + L)) break;
2327
+ F === 47 && (A = L);
1841
2328
  }
1842
2329
  var O = "";
1843
- for (j = h + A + 1; j <= f; ++j) j !== f && i.charCodeAt(j) !== 47 || (O.length === 0 ? O += ".." : O += "/..");
1844
- return O.length > 0 ? O + d.slice(b + A) : (b += A, d.charCodeAt(b) === 47 && ++b, d.slice(b));
1845
- }, _makeLong: function(i) {
1846
- return i;
1847
- }, dirname: function(i) {
1848
- if (s(i), i.length === 0) return ".";
1849
- for (var d = i.charCodeAt(0), h = d === 47, f = -1, y = !0, b = i.length - 1; b >= 1; --b) if ((d = i.charCodeAt(b)) === 47) {
1850
- if (!y) {
1851
- f = b;
2330
+ for (L = f + A + 1; L <= g; ++L) L !== g && s.charCodeAt(L) !== 47 || (O.length === 0 ? O += ".." : O += "/..");
2331
+ return O.length > 0 ? O + u.slice(C + A) : (C += A, u.charCodeAt(C) === 47 && ++C, u.slice(C));
2332
+ }, _makeLong: function(s) {
2333
+ return s;
2334
+ }, dirname: function(s) {
2335
+ if (o(s), s.length === 0) return ".";
2336
+ for (var u = s.charCodeAt(0), f = u === 47, g = -1, _ = !0, C = s.length - 1; C >= 1; --C) if ((u = s.charCodeAt(C)) === 47) {
2337
+ if (!_) {
2338
+ g = C;
1852
2339
  break;
1853
2340
  }
1854
- } else y = !1;
1855
- return f === -1 ? h ? "/" : "." : h && f === 1 ? "//" : i.slice(0, f);
1856
- }, basename: function(i, d) {
1857
- if (d !== void 0 && typeof d != "string") throw new TypeError('"ext" argument must be a string');
1858
- s(i);
1859
- var h, f = 0, y = -1, b = !0;
1860
- if (d !== void 0 && d.length > 0 && d.length <= i.length) {
1861
- if (d.length === i.length && d === i) return "";
1862
- var o = d.length - 1, w = -1;
1863
- for (h = i.length - 1; h >= 0; --h) {
1864
- var A = i.charCodeAt(h);
2341
+ } else _ = !1;
2342
+ return g === -1 ? f ? "/" : "." : f && g === 1 ? "//" : s.slice(0, g);
2343
+ }, basename: function(s, u) {
2344
+ if (u !== void 0 && typeof u != "string") throw new TypeError('"ext" argument must be a string');
2345
+ o(s);
2346
+ var f, g = 0, _ = -1, C = !0;
2347
+ if (u !== void 0 && u.length > 0 && u.length <= s.length) {
2348
+ if (u.length === s.length && u === s) return "";
2349
+ var a = u.length - 1, w = -1;
2350
+ for (f = s.length - 1; f >= 0; --f) {
2351
+ var A = s.charCodeAt(f);
1865
2352
  if (A === 47) {
1866
- if (!b) {
1867
- f = h + 1;
2353
+ if (!C) {
2354
+ g = f + 1;
1868
2355
  break;
1869
2356
  }
1870
- } else w === -1 && (b = !1, w = h + 1), o >= 0 && (A === d.charCodeAt(o) ? --o == -1 && (y = h) : (o = -1, y = w));
2357
+ } else w === -1 && (C = !1, w = f + 1), a >= 0 && (A === u.charCodeAt(a) ? --a == -1 && (_ = f) : (a = -1, _ = w));
1871
2358
  }
1872
- return f === y ? y = w : y === -1 && (y = i.length), i.slice(f, y);
2359
+ return g === _ ? _ = w : _ === -1 && (_ = s.length), s.slice(g, _);
1873
2360
  }
1874
- for (h = i.length - 1; h >= 0; --h) if (i.charCodeAt(h) === 47) {
1875
- if (!b) {
1876
- f = h + 1;
2361
+ for (f = s.length - 1; f >= 0; --f) if (s.charCodeAt(f) === 47) {
2362
+ if (!C) {
2363
+ g = f + 1;
1877
2364
  break;
1878
2365
  }
1879
- } else y === -1 && (b = !1, y = h + 1);
1880
- return y === -1 ? "" : i.slice(f, y);
1881
- }, extname: function(i) {
1882
- s(i);
1883
- for (var d = -1, h = 0, f = -1, y = !0, b = 0, o = i.length - 1; o >= 0; --o) {
1884
- var w = i.charCodeAt(o);
1885
- if (w !== 47) f === -1 && (y = !1, f = o + 1), w === 46 ? d === -1 ? d = o : b !== 1 && (b = 1) : d !== -1 && (b = -1);
1886
- else if (!y) {
1887
- h = o + 1;
2366
+ } else _ === -1 && (C = !1, _ = f + 1);
2367
+ return _ === -1 ? "" : s.slice(g, _);
2368
+ }, extname: function(s) {
2369
+ o(s);
2370
+ for (var u = -1, f = 0, g = -1, _ = !0, C = 0, a = s.length - 1; a >= 0; --a) {
2371
+ var w = s.charCodeAt(a);
2372
+ if (w !== 47) g === -1 && (_ = !1, g = a + 1), w === 46 ? u === -1 ? u = a : C !== 1 && (C = 1) : u !== -1 && (C = -1);
2373
+ else if (!_) {
2374
+ f = a + 1;
1888
2375
  break;
1889
2376
  }
1890
2377
  }
1891
- return d === -1 || f === -1 || b === 0 || b === 1 && d === f - 1 && d === h + 1 ? "" : i.slice(d, f);
1892
- }, format: function(i) {
1893
- if (i === null || typeof i != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof i);
1894
- return (function(d, h) {
1895
- var f = h.dir || h.root, y = h.base || (h.name || "") + (h.ext || "");
1896
- return f ? f === h.root ? f + y : f + "/" + y : y;
1897
- })(0, i);
1898
- }, parse: function(i) {
1899
- s(i);
1900
- var d = { root: "", dir: "", base: "", ext: "", name: "" };
1901
- if (i.length === 0) return d;
1902
- var h, f = i.charCodeAt(0), y = f === 47;
1903
- y ? (d.root = "/", h = 1) : h = 0;
1904
- for (var b = -1, o = 0, w = -1, A = !0, j = i.length - 1, B = 0; j >= h; --j) if ((f = i.charCodeAt(j)) !== 47) w === -1 && (A = !1, w = j + 1), f === 46 ? b === -1 ? b = j : B !== 1 && (B = 1) : b !== -1 && (B = -1);
2378
+ return u === -1 || g === -1 || C === 0 || C === 1 && u === g - 1 && u === f + 1 ? "" : s.slice(u, g);
2379
+ }, format: function(s) {
2380
+ if (s === null || typeof s != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof s);
2381
+ return (function(u, f) {
2382
+ var g = f.dir || f.root, _ = f.base || (f.name || "") + (f.ext || "");
2383
+ return g ? g === f.root ? g + _ : g + "/" + _ : _;
2384
+ })(0, s);
2385
+ }, parse: function(s) {
2386
+ o(s);
2387
+ var u = { root: "", dir: "", base: "", ext: "", name: "" };
2388
+ if (s.length === 0) return u;
2389
+ var f, g = s.charCodeAt(0), _ = g === 47;
2390
+ _ ? (u.root = "/", f = 1) : f = 0;
2391
+ for (var C = -1, a = 0, w = -1, A = !0, L = s.length - 1, F = 0; L >= f; --L) if ((g = s.charCodeAt(L)) !== 47) w === -1 && (A = !1, w = L + 1), g === 46 ? C === -1 ? C = L : F !== 1 && (F = 1) : C !== -1 && (F = -1);
1905
2392
  else if (!A) {
1906
- o = j + 1;
2393
+ a = L + 1;
1907
2394
  break;
1908
2395
  }
1909
- return b === -1 || w === -1 || B === 0 || B === 1 && b === w - 1 && b === o + 1 ? w !== -1 && (d.base = d.name = o === 0 && y ? i.slice(1, w) : i.slice(o, w)) : (o === 0 && y ? (d.name = i.slice(1, b), d.base = i.slice(1, w)) : (d.name = i.slice(o, b), d.base = i.slice(o, w)), d.ext = i.slice(b, w)), o > 0 ? d.dir = i.slice(0, o - 1) : y && (d.dir = "/"), d;
2396
+ return C === -1 || w === -1 || F === 0 || F === 1 && C === w - 1 && C === a + 1 ? w !== -1 && (u.base = u.name = a === 0 && _ ? s.slice(1, w) : s.slice(a, w)) : (a === 0 && _ ? (u.name = s.slice(1, C), u.base = s.slice(1, w)) : (u.name = s.slice(a, C), u.base = s.slice(a, w)), u.ext = s.slice(C, w)), a > 0 ? u.dir = s.slice(0, a - 1) : _ && (u.dir = "/"), u;
1910
2397
  }, sep: "/", delimiter: ":", win32: null, posix: null };
1911
- k.posix = k, v.exports = k;
2398
+ p.posix = p, b.exports = p;
1912
2399
  } }, t = {};
1913
- function r(v) {
1914
- var s = t[v];
1915
- if (s !== void 0) return s.exports;
1916
- var _ = t[v] = { exports: {} };
1917
- return e[v](_, _.exports, r), _.exports;
2400
+ function r(b) {
2401
+ var o = t[b];
2402
+ if (o !== void 0) return o.exports;
2403
+ var v = t[b] = { exports: {} };
2404
+ return e[b](v, v.exports, r), v.exports;
1918
2405
  }
1919
- r.d = (v, s) => {
1920
- for (var _ in s) r.o(s, _) && !r.o(v, _) && Object.defineProperty(v, _, { enumerable: !0, get: s[_] });
1921
- }, r.o = (v, s) => Object.prototype.hasOwnProperty.call(v, s), r.r = (v) => {
1922
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(v, "__esModule", { value: !0 });
2406
+ r.d = (b, o) => {
2407
+ for (var v in o) r.o(o, v) && !r.o(b, v) && Object.defineProperty(b, v, { enumerable: !0, get: o[v] });
2408
+ }, r.o = (b, o) => Object.prototype.hasOwnProperty.call(b, o), r.r = (b) => {
2409
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(b, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(b, "__esModule", { value: !0 });
1923
2410
  };
1924
2411
  var n = {};
1925
2412
  let c;
1926
- r.r(n), r.d(n, { URI: () => m, Utils: () => ne }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
1927
- const u = /^\w[\w\d+.-]*$/, l = /^\//, a = /^\/\//;
1928
- function p(v, s) {
1929
- if (!v.scheme && s) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${v.authority}", path: "${v.path}", query: "${v.query}", fragment: "${v.fragment}"}`);
1930
- if (v.scheme && !u.test(v.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
1931
- if (v.path) {
1932
- if (v.authority) {
1933
- if (!l.test(v.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
1934
- } else if (a.test(v.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
2413
+ r.r(n), r.d(n, { URI: () => m, Utils: () => K }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
2414
+ const i = /^\w[\w\d+.-]*$/, l = /^\//, d = /^\/\//;
2415
+ function y(b, o) {
2416
+ if (!b.scheme && o) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${b.authority}", path: "${b.path}", query: "${b.query}", fragment: "${b.fragment}"}`);
2417
+ if (b.scheme && !i.test(b.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
2418
+ if (b.path) {
2419
+ if (b.authority) {
2420
+ if (!l.test(b.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
2421
+ } else if (d.test(b.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
1935
2422
  }
1936
2423
  }
1937
- const g = "", x = "/", M = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
2424
+ const h = "", k = "/", j = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
1938
2425
  class m {
1939
- static isUri(s) {
1940
- return s instanceof m || !!s && typeof s.authority == "string" && typeof s.fragment == "string" && typeof s.path == "string" && typeof s.query == "string" && typeof s.scheme == "string" && typeof s.fsPath == "string" && typeof s.with == "function" && typeof s.toString == "function";
2426
+ static isUri(o) {
2427
+ return o instanceof m || !!o && typeof o.authority == "string" && typeof o.fragment == "string" && typeof o.path == "string" && typeof o.query == "string" && typeof o.scheme == "string" && typeof o.fsPath == "string" && typeof o.with == "function" && typeof o.toString == "function";
1941
2428
  }
1942
2429
  scheme;
1943
2430
  authority;
1944
2431
  path;
1945
2432
  query;
1946
2433
  fragment;
1947
- constructor(s, _, k, i, d, h = !1) {
1948
- typeof s == "object" ? (this.scheme = s.scheme || g, this.authority = s.authority || g, this.path = s.path || g, this.query = s.query || g, this.fragment = s.fragment || g) : (this.scheme = /* @__PURE__ */ (function(f, y) {
1949
- return f || y ? f : "file";
1950
- })(s, h), this.authority = _ || g, this.path = (function(f, y) {
1951
- switch (f) {
2434
+ constructor(o, v, p, s, u, f = !1) {
2435
+ typeof o == "object" ? (this.scheme = o.scheme || h, this.authority = o.authority || h, this.path = o.path || h, this.query = o.query || h, this.fragment = o.fragment || h) : (this.scheme = /* @__PURE__ */ (function(g, _) {
2436
+ return g || _ ? g : "file";
2437
+ })(o, f), this.authority = v || h, this.path = (function(g, _) {
2438
+ switch (g) {
1952
2439
  case "https":
1953
2440
  case "http":
1954
2441
  case "file":
1955
- y ? y[0] !== x && (y = x + y) : y = x;
2442
+ _ ? _[0] !== k && (_ = k + _) : _ = k;
1956
2443
  }
1957
- return y;
1958
- })(this.scheme, k || g), this.query = i || g, this.fragment = d || g, p(this, h));
2444
+ return _;
2445
+ })(this.scheme, p || h), this.query = s || h, this.fragment = u || h, y(this, f));
1959
2446
  }
1960
2447
  get fsPath() {
1961
- return C(this);
1962
- }
1963
- with(s) {
1964
- if (!s) return this;
1965
- let { scheme: _, authority: k, path: i, query: d, fragment: h } = s;
1966
- return _ === void 0 ? _ = this.scheme : _ === null && (_ = g), k === void 0 ? k = this.authority : k === null && (k = g), i === void 0 ? i = this.path : i === null && (i = g), d === void 0 ? d = this.query : d === null && (d = g), h === void 0 ? h = this.fragment : h === null && (h = g), _ === this.scheme && k === this.authority && i === this.path && d === this.query && h === this.fragment ? this : new R(_, k, i, d, h);
1967
- }
1968
- static parse(s, _ = !1) {
1969
- const k = M.exec(s);
1970
- return k ? new R(k[2] || g, P(k[4] || g), P(k[5] || g), P(k[7] || g), P(k[9] || g), _) : new R(g, g, g, g, g);
1971
- }
1972
- static file(s) {
1973
- let _ = g;
1974
- if (c && (s = s.replace(/\\/g, x)), s[0] === x && s[1] === x) {
1975
- const k = s.indexOf(x, 2);
1976
- k === -1 ? (_ = s.substring(2), s = x) : (_ = s.substring(2, k), s = s.substring(k) || x);
2448
+ return S(this);
2449
+ }
2450
+ with(o) {
2451
+ if (!o) return this;
2452
+ let { scheme: v, authority: p, path: s, query: u, fragment: f } = o;
2453
+ return v === void 0 ? v = this.scheme : v === null && (v = h), p === void 0 ? p = this.authority : p === null && (p = h), s === void 0 ? s = this.path : s === null && (s = h), u === void 0 ? u = this.query : u === null && (u = h), f === void 0 ? f = this.fragment : f === null && (f = h), v === this.scheme && p === this.authority && s === this.path && u === this.query && f === this.fragment ? this : new R(v, p, s, u, f);
2454
+ }
2455
+ static parse(o, v = !1) {
2456
+ const p = j.exec(o);
2457
+ return p ? new R(p[2] || h, N(p[4] || h), N(p[5] || h), N(p[7] || h), N(p[9] || h), v) : new R(h, h, h, h, h);
2458
+ }
2459
+ static file(o) {
2460
+ let v = h;
2461
+ if (c && (o = o.replace(/\\/g, k)), o[0] === k && o[1] === k) {
2462
+ const p = o.indexOf(k, 2);
2463
+ p === -1 ? (v = o.substring(2), o = k) : (v = o.substring(2, p), o = o.substring(p) || k);
1977
2464
  }
1978
- return new R("file", _, s, g, g);
2465
+ return new R("file", v, o, h, h);
1979
2466
  }
1980
- static from(s) {
1981
- const _ = new R(s.scheme, s.authority, s.path, s.query, s.fragment);
1982
- return p(_, !0), _;
2467
+ static from(o) {
2468
+ const v = new R(o.scheme, o.authority, o.path, o.query, o.fragment);
2469
+ return y(v, !0), v;
1983
2470
  }
1984
- toString(s = !1) {
1985
- return I(this, s);
2471
+ toString(o = !1) {
2472
+ return D(this, o);
1986
2473
  }
1987
2474
  toJSON() {
1988
2475
  return this;
1989
2476
  }
1990
- static revive(s) {
1991
- if (s) {
1992
- if (s instanceof m) return s;
2477
+ static revive(o) {
2478
+ if (o) {
2479
+ if (o instanceof m) return o;
1993
2480
  {
1994
- const _ = new R(s);
1995
- return _._formatted = s.external, _._fsPath = s._sep === T ? s.fsPath : null, _;
2481
+ const v = new R(o);
2482
+ return v._formatted = o.external, v._fsPath = o._sep === T ? o.fsPath : null, v;
1996
2483
  }
1997
2484
  }
1998
- return s;
2485
+ return o;
1999
2486
  }
2000
2487
  }
2001
2488
  const T = c ? 1 : void 0;
@@ -2003,112 +2490,112 @@ var jt;
2003
2490
  _formatted = null;
2004
2491
  _fsPath = null;
2005
2492
  get fsPath() {
2006
- return this._fsPath || (this._fsPath = C(this)), this._fsPath;
2493
+ return this._fsPath || (this._fsPath = S(this)), this._fsPath;
2007
2494
  }
2008
- toString(s = !1) {
2009
- return s ? I(this, !0) : (this._formatted || (this._formatted = I(this, !1)), this._formatted);
2495
+ toString(o = !1) {
2496
+ return o ? D(this, !0) : (this._formatted || (this._formatted = D(this, !1)), this._formatted);
2010
2497
  }
2011
2498
  toJSON() {
2012
- const s = { $mid: 1 };
2013
- return this._fsPath && (s.fsPath = this._fsPath, s._sep = T), this._formatted && (s.external = this._formatted), this.path && (s.path = this.path), this.scheme && (s.scheme = this.scheme), this.authority && (s.authority = this.authority), this.query && (s.query = this.query), this.fragment && (s.fragment = this.fragment), s;
2499
+ const o = { $mid: 1 };
2500
+ return this._fsPath && (o.fsPath = this._fsPath, o._sep = T), this._formatted && (o.external = this._formatted), this.path && (o.path = this.path), this.scheme && (o.scheme = this.scheme), this.authority && (o.authority = this.authority), this.query && (o.query = this.query), this.fragment && (o.fragment = this.fragment), o;
2014
2501
  }
2015
2502
  }
2016
2503
  const H = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
2017
- function N(v, s, _) {
2018
- let k, i = -1;
2019
- for (let d = 0; d < v.length; d++) {
2020
- const h = v.charCodeAt(d);
2021
- if (h >= 97 && h <= 122 || h >= 65 && h <= 90 || h >= 48 && h <= 57 || h === 45 || h === 46 || h === 95 || h === 126 || s && h === 47 || _ && h === 91 || _ && h === 93 || _ && h === 58) i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k !== void 0 && (k += v.charAt(d));
2504
+ function x(b, o, v) {
2505
+ let p, s = -1;
2506
+ for (let u = 0; u < b.length; u++) {
2507
+ const f = b.charCodeAt(u);
2508
+ if (f >= 97 && f <= 122 || f >= 65 && f <= 90 || f >= 48 && f <= 57 || f === 45 || f === 46 || f === 95 || f === 126 || o && f === 47 || v && f === 91 || v && f === 93 || v && f === 58) s !== -1 && (p += encodeURIComponent(b.substring(s, u)), s = -1), p !== void 0 && (p += b.charAt(u));
2022
2509
  else {
2023
- k === void 0 && (k = v.substr(0, d));
2024
- const f = H[h];
2025
- f !== void 0 ? (i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k += f) : i === -1 && (i = d);
2510
+ p === void 0 && (p = b.substr(0, u));
2511
+ const g = H[f];
2512
+ g !== void 0 ? (s !== -1 && (p += encodeURIComponent(b.substring(s, u)), s = -1), p += g) : s === -1 && (s = u);
2026
2513
  }
2027
2514
  }
2028
- return i !== -1 && (k += encodeURIComponent(v.substring(i))), k !== void 0 ? k : v;
2515
+ return s !== -1 && (p += encodeURIComponent(b.substring(s))), p !== void 0 ? p : b;
2029
2516
  }
2030
- function q(v) {
2031
- let s;
2032
- for (let _ = 0; _ < v.length; _++) {
2033
- const k = v.charCodeAt(_);
2034
- k === 35 || k === 63 ? (s === void 0 && (s = v.substr(0, _)), s += H[k]) : s !== void 0 && (s += v[_]);
2517
+ function z(b) {
2518
+ let o;
2519
+ for (let v = 0; v < b.length; v++) {
2520
+ const p = b.charCodeAt(v);
2521
+ p === 35 || p === 63 ? (o === void 0 && (o = b.substr(0, v)), o += H[p]) : o !== void 0 && (o += b[v]);
2035
2522
  }
2036
- return s !== void 0 ? s : v;
2523
+ return o !== void 0 ? o : b;
2037
2524
  }
2038
- function C(v, s) {
2039
- let _;
2040
- return _ = v.authority && v.path.length > 1 && v.scheme === "file" ? `//${v.authority}${v.path}` : v.path.charCodeAt(0) === 47 && (v.path.charCodeAt(1) >= 65 && v.path.charCodeAt(1) <= 90 || v.path.charCodeAt(1) >= 97 && v.path.charCodeAt(1) <= 122) && v.path.charCodeAt(2) === 58 ? v.path[1].toLowerCase() + v.path.substr(2) : v.path, c && (_ = _.replace(/\//g, "\\")), _;
2525
+ function S(b, o) {
2526
+ let v;
2527
+ return v = b.authority && b.path.length > 1 && b.scheme === "file" ? `//${b.authority}${b.path}` : b.path.charCodeAt(0) === 47 && (b.path.charCodeAt(1) >= 65 && b.path.charCodeAt(1) <= 90 || b.path.charCodeAt(1) >= 97 && b.path.charCodeAt(1) <= 122) && b.path.charCodeAt(2) === 58 ? b.path[1].toLowerCase() + b.path.substr(2) : b.path, c && (v = v.replace(/\//g, "\\")), v;
2041
2528
  }
2042
- function I(v, s) {
2043
- const _ = s ? q : N;
2044
- let k = "", { scheme: i, authority: d, path: h, query: f, fragment: y } = v;
2045
- if (i && (k += i, k += ":"), (d || i === "file") && (k += x, k += x), d) {
2046
- let b = d.indexOf("@");
2047
- if (b !== -1) {
2048
- const o = d.substr(0, b);
2049
- d = d.substr(b + 1), b = o.lastIndexOf(":"), b === -1 ? k += _(o, !1, !1) : (k += _(o.substr(0, b), !1, !1), k += ":", k += _(o.substr(b + 1), !1, !0)), k += "@";
2529
+ function D(b, o) {
2530
+ const v = o ? z : x;
2531
+ let p = "", { scheme: s, authority: u, path: f, query: g, fragment: _ } = b;
2532
+ if (s && (p += s, p += ":"), (u || s === "file") && (p += k, p += k), u) {
2533
+ let C = u.indexOf("@");
2534
+ if (C !== -1) {
2535
+ const a = u.substr(0, C);
2536
+ u = u.substr(C + 1), C = a.lastIndexOf(":"), C === -1 ? p += v(a, !1, !1) : (p += v(a.substr(0, C), !1, !1), p += ":", p += v(a.substr(C + 1), !1, !0)), p += "@";
2050
2537
  }
2051
- d = d.toLowerCase(), b = d.lastIndexOf(":"), b === -1 ? k += _(d, !1, !0) : (k += _(d.substr(0, b), !1, !0), k += d.substr(b));
2052
- }
2053
- if (h) {
2054
- if (h.length >= 3 && h.charCodeAt(0) === 47 && h.charCodeAt(2) === 58) {
2055
- const b = h.charCodeAt(1);
2056
- b >= 65 && b <= 90 && (h = `/${String.fromCharCode(b + 32)}:${h.substr(3)}`);
2057
- } else if (h.length >= 2 && h.charCodeAt(1) === 58) {
2058
- const b = h.charCodeAt(0);
2059
- b >= 65 && b <= 90 && (h = `${String.fromCharCode(b + 32)}:${h.substr(2)}`);
2538
+ u = u.toLowerCase(), C = u.lastIndexOf(":"), C === -1 ? p += v(u, !1, !0) : (p += v(u.substr(0, C), !1, !0), p += u.substr(C));
2539
+ }
2540
+ if (f) {
2541
+ if (f.length >= 3 && f.charCodeAt(0) === 47 && f.charCodeAt(2) === 58) {
2542
+ const C = f.charCodeAt(1);
2543
+ C >= 65 && C <= 90 && (f = `/${String.fromCharCode(C + 32)}:${f.substr(3)}`);
2544
+ } else if (f.length >= 2 && f.charCodeAt(1) === 58) {
2545
+ const C = f.charCodeAt(0);
2546
+ C >= 65 && C <= 90 && (f = `${String.fromCharCode(C + 32)}:${f.substr(2)}`);
2060
2547
  }
2061
- k += _(h, !0, !1);
2548
+ p += v(f, !0, !1);
2062
2549
  }
2063
- return f && (k += "?", k += _(f, !1, !1)), y && (k += "#", k += s ? y : N(y, !1, !1)), k;
2550
+ return g && (p += "?", p += v(g, !1, !1)), _ && (p += "#", p += o ? _ : x(_, !1, !1)), p;
2064
2551
  }
2065
- function W(v) {
2552
+ function I(b) {
2066
2553
  try {
2067
- return decodeURIComponent(v);
2554
+ return decodeURIComponent(b);
2068
2555
  } catch {
2069
- return v.length > 3 ? v.substr(0, 3) + W(v.substr(3)) : v;
2556
+ return b.length > 3 ? b.substr(0, 3) + I(b.substr(3)) : b;
2070
2557
  }
2071
2558
  }
2072
- const U = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
2073
- function P(v) {
2074
- return v.match(U) ? v.replace(U, ((s) => W(s))) : v;
2559
+ const B = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
2560
+ function N(b) {
2561
+ return b.match(B) ? b.replace(B, ((o) => I(o))) : b;
2075
2562
  }
2076
- var F = r(975);
2077
- const D = F.posix || F, X = "/";
2078
- var ne;
2079
- (function(v) {
2080
- v.joinPath = function(s, ..._) {
2081
- return s.with({ path: D.join(s.path, ..._) });
2082
- }, v.resolvePath = function(s, ..._) {
2083
- let k = s.path, i = !1;
2084
- k[0] !== X && (k = X + k, i = !0);
2085
- let d = D.resolve(k, ..._);
2086
- return i && d[0] === X && !s.authority && (d = d.substring(1)), s.with({ path: d });
2087
- }, v.dirname = function(s) {
2088
- if (s.path.length === 0 || s.path === X) return s;
2089
- let _ = D.dirname(s.path);
2090
- return _.length === 1 && _.charCodeAt(0) === 46 && (_ = ""), s.with({ path: _ });
2091
- }, v.basename = function(s) {
2092
- return D.basename(s.path);
2093
- }, v.extname = function(s) {
2094
- return D.extname(s.path);
2563
+ var q = r(975);
2564
+ const P = q.posix || q, V = "/";
2565
+ var K;
2566
+ (function(b) {
2567
+ b.joinPath = function(o, ...v) {
2568
+ return o.with({ path: P.join(o.path, ...v) });
2569
+ }, b.resolvePath = function(o, ...v) {
2570
+ let p = o.path, s = !1;
2571
+ p[0] !== V && (p = V + p, s = !0);
2572
+ let u = P.resolve(p, ...v);
2573
+ return s && u[0] === V && !o.authority && (u = u.substring(1)), o.with({ path: u });
2574
+ }, b.dirname = function(o) {
2575
+ if (o.path.length === 0 || o.path === V) return o;
2576
+ let v = P.dirname(o.path);
2577
+ return v.length === 1 && v.charCodeAt(0) === 46 && (v = ""), o.with({ path: v });
2578
+ }, b.basename = function(o) {
2579
+ return P.basename(o.path);
2580
+ }, b.extname = function(o) {
2581
+ return P.extname(o.path);
2095
2582
  };
2096
- })(ne || (ne = {})), jt = n;
2583
+ })(K || (K = {})), $t = n;
2097
2584
  })();
2098
- const { URI: me, Utils: so } = jt;
2099
- function bn(e) {
2585
+ const { URI: ge, Utils: jo } = $t;
2586
+ function Bn(e) {
2100
2587
  return e === 4 ? 1 : e === 3 ? 2 : e === 2 ? 4 : 8;
2101
2588
  }
2102
- function wn(e) {
2589
+ function qn(e) {
2103
2590
  return e;
2104
2591
  }
2105
- function _n(e) {
2592
+ function zn(e) {
2106
2593
  return {
2107
2594
  start: { line: e.startLineNumber - 1, character: e.startColumn - 1 },
2108
2595
  end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
2109
2596
  };
2110
2597
  }
2111
- function K(e) {
2598
+ function ee(e) {
2112
2599
  return {
2113
2600
  startLineNumber: e.start.line + 1,
2114
2601
  startColumn: e.start.character + 1,
@@ -2116,192 +2603,192 @@ function K(e) {
2116
2603
  endColumn: e.end.character + 1
2117
2604
  };
2118
2605
  }
2119
- function kn(e) {
2606
+ function Vn(e) {
2120
2607
  return {
2121
- ...K(e.location.range),
2608
+ ...ee(e.location.range),
2122
2609
  message: e.message,
2123
- resource: me.parse(e.location.uri)
2610
+ resource: ge.parse(e.location.uri)
2124
2611
  };
2125
2612
  }
2126
- function Mt(e) {
2613
+ function It(e) {
2127
2614
  const t = {
2128
- ...K(e.range),
2615
+ ...ee(e.range),
2129
2616
  message: e.message,
2130
- severity: e.severity ? bn(e.severity) : 8
2617
+ severity: e.severity ? Bn(e.severity) : 8
2131
2618
  };
2132
- return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: me.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(kn)), e.tags && (t.tags = e.tags.map(wn)), e.source != null && (t.source = e.source), t;
2619
+ return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: ge.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(Vn)), e.tags && (t.tags = e.tags.map(qn)), e.source != null && (t.source = e.source), t;
2133
2620
  }
2134
- function Xe(e) {
2621
+ function Qe(e) {
2135
2622
  return {
2136
- range: K(e.range),
2623
+ range: ee(e.range),
2137
2624
  text: e.newText
2138
2625
  };
2139
2626
  }
2140
- function xn(e) {
2627
+ function Fn(e) {
2141
2628
  const t = {};
2142
2629
  return e.ignoreIfExists != null && (t.ignoreIfExists = e.ignoreIfExists), e.ignoreIfNotExists != null && (t.ignoreIfNotExists = e.ignoreIfNotExists), e.overwrite != null && (t.overwrite = e.overwrite), e.recursive != null && (t.recursive = e.recursive), t;
2143
2630
  }
2144
- function Cn(e) {
2145
- const t = e.kind === "create" ? { newResource: me.parse(e.uri) } : e.kind === "delete" ? { oldResource: me.parse(e.uri) } : {
2146
- oldResource: me.parse(e.oldUri),
2147
- newResource: me.parse(e.newUri)
2631
+ function Un(e) {
2632
+ const t = e.kind === "create" ? { newResource: ge.parse(e.uri) } : e.kind === "delete" ? { oldResource: ge.parse(e.uri) } : {
2633
+ oldResource: ge.parse(e.oldUri),
2634
+ newResource: ge.parse(e.newUri)
2148
2635
  };
2149
- return e.options && (t.options = xn(e.options)), t;
2636
+ return e.options && (t.options = Fn(e.options)), t;
2150
2637
  }
2151
- function gt(e, t, r) {
2638
+ function wt(e, t, r) {
2152
2639
  return {
2153
- resource: me.parse(t),
2640
+ resource: ge.parse(t),
2154
2641
  versionId: r,
2155
- textEdit: Xe(e)
2642
+ textEdit: Qe(e)
2156
2643
  };
2157
2644
  }
2158
- function Rn(e) {
2645
+ function Yn(e) {
2159
2646
  var t;
2160
2647
  const r = [];
2161
2648
  if (e.changes)
2162
2649
  for (const [n, c] of Object.entries(e.changes))
2163
- for (const u of c)
2164
- r.push(gt(u, n));
2650
+ for (const i of c)
2651
+ r.push(wt(i, n));
2165
2652
  if (e.documentChanges)
2166
2653
  for (const n of e.documentChanges)
2167
2654
  if ("textDocument" in n)
2168
2655
  for (const c of n.edits)
2169
- r.push(gt(c, n.textDocument.uri, (t = n.textDocument.version) !== null && t !== void 0 ? t : void 0));
2656
+ r.push(wt(c, n.textDocument.uri, (t = n.textDocument.version) !== null && t !== void 0 ? t : void 0));
2170
2657
  else
2171
- r.push(Cn(n));
2658
+ r.push(Un(n));
2172
2659
  return {
2173
2660
  edits: r
2174
2661
  };
2175
2662
  }
2176
- function Sn(e) {
2663
+ function Gn(e) {
2177
2664
  const t = {
2178
2665
  title: e.title,
2179
2666
  isPreferred: e.isPreferred
2180
2667
  };
2181
- return e.diagnostics && (t.diagnostics = e.diagnostics.map(Mt)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = Rn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
2668
+ return e.diagnostics && (t.diagnostics = e.diagnostics.map(It)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = Yn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
2182
2669
  }
2183
- function En(e) {
2670
+ function Jn(e) {
2184
2671
  const t = {
2185
2672
  title: e.title,
2186
2673
  id: e.command
2187
2674
  };
2188
2675
  return e.arguments && (t.arguments = e.arguments), t;
2189
2676
  }
2190
- function Tn(e) {
2677
+ function Kn(e) {
2191
2678
  return e === 1 ? 18 : e === 2 ? 0 : e === 3 ? 1 : e === 4 ? 2 : e === 5 ? 3 : e === 6 ? 4 : e === 7 ? 5 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 12 : e === 12 ? 13 : e === 13 ? 15 : e === 14 ? 17 : e === 15 ? 27 : e === 16 ? 19 : e === 17 ? 20 : e === 18 ? 21 : e === 19 ? 23 : e === 20 ? 16 : e === 21 ? 14 : e === 22 ? 6 : e === 23 ? 10 : e === 24 ? 11 : 24;
2192
2679
  }
2193
- function jn(e) {
2680
+ function Xn(e) {
2194
2681
  return e;
2195
2682
  }
2196
- function At(e) {
2683
+ function Wt(e) {
2197
2684
  return {
2198
2685
  value: e.value
2199
2686
  };
2200
2687
  }
2201
- function Mn(e) {
2688
+ function Zn(e) {
2202
2689
  return {
2203
- range: K(e.range),
2690
+ range: ee(e.range),
2204
2691
  text: e.newText
2205
2692
  };
2206
2693
  }
2207
- function An(e) {
2208
- return "range" in e ? K(e.range) : "insert" in e && "replace" in e ? {
2209
- insert: K(e.insert),
2210
- replace: K(e.replace)
2211
- } : K(e);
2212
- }
2213
- function Nn(e, t) {
2214
- var r, n, c, u, l;
2215
- const a = (r = t.itemDefaults) !== null && r !== void 0 ? r : {}, p = (n = e.textEdit) !== null && n !== void 0 ? n : a.editRange, g = (c = e.commitCharacters) !== null && c !== void 0 ? c : a.commitCharacters, x = (u = e.insertTextFormat) !== null && u !== void 0 ? u : a.insertTextFormat, M = (l = e.insertTextMode) !== null && l !== void 0 ? l : a.insertTextMode;
2694
+ function Qn(e) {
2695
+ return "range" in e ? ee(e.range) : "insert" in e && "replace" in e ? {
2696
+ insert: ee(e.insert),
2697
+ replace: ee(e.replace)
2698
+ } : ee(e);
2699
+ }
2700
+ function eo(e, t) {
2701
+ var r, n, c, i, l;
2702
+ const d = (r = t.itemDefaults) !== null && r !== void 0 ? r : {}, y = (n = e.textEdit) !== null && n !== void 0 ? n : d.editRange, h = (c = e.commitCharacters) !== null && c !== void 0 ? c : d.commitCharacters, k = (i = e.insertTextFormat) !== null && i !== void 0 ? i : d.insertTextFormat, j = (l = e.insertTextMode) !== null && l !== void 0 ? l : d.insertTextMode;
2216
2703
  let m = e.insertText, T;
2217
- p ? (T = An(p), "newText" in p && (m = p.newText)) : T = { ...t.range };
2704
+ y ? (T = Qn(y), "newText" in y && (m = y.newText)) : T = { ...t.range };
2218
2705
  const R = {
2219
2706
  insertText: m ?? e.label,
2220
- kind: e.kind == null ? 18 : Tn(e.kind),
2707
+ kind: e.kind == null ? 18 : Kn(e.kind),
2221
2708
  label: e.label,
2222
2709
  range: T
2223
2710
  };
2224
- return e.additionalTextEdits && (R.additionalTextEdits = e.additionalTextEdits.map(Mn)), e.command && (R.command = En(e.command)), g && (R.commitCharacters = g), e.detail != null && (R.detail = e.detail), typeof e.documentation == "string" ? R.documentation = e.documentation : e.documentation && (R.documentation = At(e.documentation)), e.filterText != null && (R.filterText = e.filterText), x === 2 ? R.insertTextRules = 4 : M === 2 && (R.insertTextRules = 1), e.preselect != null && (R.preselect = e.preselect), e.sortText != null && (R.sortText = e.sortText), e.tags && (R.tags = e.tags.map(jn)), R;
2711
+ return e.additionalTextEdits && (R.additionalTextEdits = e.additionalTextEdits.map(Zn)), e.command && (R.command = Jn(e.command)), h && (R.commitCharacters = h), e.detail != null && (R.detail = e.detail), typeof e.documentation == "string" ? R.documentation = e.documentation : e.documentation && (R.documentation = Wt(e.documentation)), e.filterText != null && (R.filterText = e.filterText), k === 2 ? R.insertTextRules = 4 : j === 2 && (R.insertTextRules = 1), e.preselect != null && (R.preselect = e.preselect), e.sortText != null && (R.sortText = e.sortText), e.tags && (R.tags = e.tags.map(Xn)), R;
2225
2712
  }
2226
- function On(e, t) {
2713
+ function to(e, t) {
2227
2714
  return {
2228
2715
  incomplete: !!e.isIncomplete,
2229
- suggestions: e.items.map((r) => Nn(r, { range: t.range, itemDefaults: e.itemDefaults }))
2716
+ suggestions: e.items.map((r) => eo(r, { range: t.range, itemDefaults: e.itemDefaults }))
2230
2717
  };
2231
2718
  }
2232
- function Pn(e) {
2719
+ function ro(e) {
2233
2720
  return e === 1 ? 0 : e === 2 ? 1 : e === 3 ? 2 : e === 4 ? 3 : e === 5 ? 4 : e === 6 ? 5 : e === 7 ? 6 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 10 : e === 12 ? 11 : e === 13 ? 12 : e === 14 ? 13 : e === 15 ? 14 : e === 16 ? 15 : e === 17 ? 16 : e === 18 ? 17 : e === 19 ? 18 : e === 20 ? 19 : e === 21 ? 20 : e === 22 ? 21 : e === 23 ? 22 : e === 24 ? 23 : e === 25 ? 24 : 25;
2234
2721
  }
2235
- function Ln(e) {
2722
+ function no(e) {
2236
2723
  return e;
2237
2724
  }
2238
- function Nt(e) {
2725
+ function Ht(e) {
2239
2726
  var t, r, n;
2240
2727
  const c = {
2241
2728
  detail: (t = e.detail) !== null && t !== void 0 ? t : "",
2242
- kind: Pn(e.kind),
2729
+ kind: ro(e.kind),
2243
2730
  name: e.name,
2244
- range: K(e.range),
2245
- selectionRange: K(e.selectionRange),
2246
- tags: (n = (r = e.tags) === null || r === void 0 ? void 0 : r.map(Ln)) !== null && n !== void 0 ? n : []
2731
+ range: ee(e.range),
2732
+ selectionRange: ee(e.selectionRange),
2733
+ tags: (n = (r = e.tags) === null || r === void 0 ? void 0 : r.map(no)) !== null && n !== void 0 ? n : []
2247
2734
  };
2248
- return e.children && (c.children = e.children.map(Nt)), c;
2735
+ return e.children && (c.children = e.children.map(Ht)), c;
2249
2736
  }
2250
- function Dn(e) {
2737
+ function oo(e) {
2251
2738
  const t = {
2252
2739
  start: e.startLine + 1,
2253
2740
  end: e.endLine + 1
2254
2741
  };
2255
2742
  return e.kind != null && (t.kind = { value: e.kind }), t;
2256
2743
  }
2257
- function $n(e) {
2744
+ function io(e) {
2258
2745
  return {
2259
2746
  insertSpaces: e.insertSpaces,
2260
2747
  tabSize: e.tabSize
2261
2748
  };
2262
2749
  }
2263
- function pt(e) {
2750
+ function _t(e) {
2264
2751
  return typeof e == "string" ? { value: e } : { value: `\`\`\`${e.language}
2265
2752
  ${e.value}
2266
2753
  \`\`\`` };
2267
2754
  }
2268
- function In(e) {
2269
- return typeof e == "string" || "language" in e ? [pt(e)] : Array.isArray(e) ? e.map(pt) : [At(e)];
2755
+ function so(e) {
2756
+ return typeof e == "string" || "language" in e ? [_t(e)] : Array.isArray(e) ? e.map(_t) : [Wt(e)];
2270
2757
  }
2271
- function Wn(e) {
2758
+ function ao(e) {
2272
2759
  const t = {
2273
- contents: In(e.contents)
2760
+ contents: so(e.contents)
2274
2761
  };
2275
- return e.range && (t.range = K(e.range)), t;
2762
+ return e.range && (t.range = ee(e.range)), t;
2276
2763
  }
2277
- function Re(e) {
2764
+ function Te(e) {
2278
2765
  return { character: e.column - 1, line: e.lineNumber - 1 };
2279
2766
  }
2280
- function Bn(e) {
2767
+ function co(e) {
2281
2768
  const t = {
2282
- range: K(e.range)
2769
+ range: ee(e.range)
2283
2770
  };
2284
- return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = me.parse(e.target)), t;
2771
+ return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = ge.parse(e.target)), t;
2285
2772
  }
2286
- function Hn(e) {
2773
+ function lo(e) {
2287
2774
  const t = {
2288
- range: K(e.targetRange),
2289
- targetSelectionRange: K(e.targetSelectionRange),
2290
- uri: me.parse(e.targetUri)
2775
+ range: ee(e.targetRange),
2776
+ targetSelectionRange: ee(e.targetSelectionRange),
2777
+ uri: ge.parse(e.targetUri)
2291
2778
  };
2292
- return e.originSelectionRange && (t.originSelectionRange = K(e.originSelectionRange)), t;
2779
+ return e.originSelectionRange && (t.originSelectionRange = ee(e.originSelectionRange)), t;
2293
2780
  }
2294
- function Un(e) {
2781
+ function uo(e) {
2295
2782
  const t = [];
2296
2783
  let r = e;
2297
2784
  for (; r; )
2298
2785
  t.push({
2299
- range: K(r.range)
2786
+ range: ee(r.range)
2300
2787
  }), r = r.parent;
2301
2788
  return t;
2302
2789
  }
2303
- function zn(e, t, r) {
2304
- const n = /* @__PURE__ */ new Map(), c = (m) => Array.isArray(t) ? t.includes(m) : t === m, u = async (m) => {
2790
+ function fo(e, t, r) {
2791
+ const n = /* @__PURE__ */ new Map(), c = (m) => Array.isArray(t) ? t.includes(m) : t === m, i = async (m) => {
2305
2792
  const T = m.getVersionId(), R = await r.provideMarkerData(m);
2306
2793
  !m.isDisposed() && T === m.getVersionId() && c(m.getLanguageId()) && e.editor.setModelMarkers(m, r.owner, R ?? []);
2307
2794
  }, l = (m) => {
@@ -2310,68 +2797,68 @@ function zn(e, t, r) {
2310
2797
  let T;
2311
2798
  const R = m.onDidChangeContent(() => {
2312
2799
  clearTimeout(T), T = setTimeout(() => {
2313
- u(m);
2800
+ i(m);
2314
2801
  }, 500);
2315
2802
  });
2316
2803
  n.set(m, {
2317
2804
  dispose() {
2318
2805
  clearTimeout(T), R.dispose();
2319
2806
  }
2320
- }), u(m);
2321
- }, a = (m) => {
2807
+ }), i(m);
2808
+ }, d = (m) => {
2322
2809
  e.editor.setModelMarkers(m, r.owner, []);
2323
2810
  const T = n.get(m);
2324
2811
  T && (T.dispose(), n.delete(m));
2325
2812
  };
2326
- function p(m, T = m.getLanguageId()) {
2813
+ function y(m, T = m.getLanguageId()) {
2327
2814
  r.doReset && c(T) && r.doReset(m);
2328
2815
  }
2329
- const g = e.editor.onDidCreateModel(l), x = e.editor.onWillDisposeModel((m) => {
2330
- a(m), p(m);
2331
- }), M = e.editor.onDidChangeModelLanguage(({ model: m, oldLanguage: T }) => {
2332
- a(m), l(m), p(m, T);
2816
+ const h = e.editor.onDidCreateModel(l), k = e.editor.onWillDisposeModel((m) => {
2817
+ d(m), y(m);
2818
+ }), j = e.editor.onDidChangeModelLanguage(({ model: m, oldLanguage: T }) => {
2819
+ d(m), l(m), y(m, T);
2333
2820
  });
2334
2821
  for (const m of e.editor.getModels())
2335
2822
  l(m);
2336
2823
  return {
2337
2824
  dispose() {
2338
2825
  for (const m of n.keys())
2339
- a(m);
2340
- g.dispose(), x.dispose(), M.dispose();
2826
+ d(m);
2827
+ h.dispose(), k.dispose(), j.dispose();
2341
2828
  },
2342
2829
  async revalidate() {
2343
- await Promise.all(e.editor.getModels().map(u));
2830
+ await Promise.all(e.editor.getModels().map(i));
2344
2831
  }
2345
2832
  };
2346
2833
  }
2347
- function Fn(e, t) {
2348
- let { createData: r, interval: n = 3e4, label: c, moduleId: u, stopWhenIdleFor: l = 12e4 } = t, a, p = 0, g = !1;
2349
- const x = () => {
2350
- a && (a.dispose(), a = void 0);
2351
- }, M = setInterval(() => {
2352
- if (!a)
2834
+ function go(e, t) {
2835
+ let { createData: r, interval: n = 3e4, label: c, moduleId: i, stopWhenIdleFor: l = 12e4 } = t, d, y = 0, h = !1;
2836
+ const k = () => {
2837
+ d && (d.dispose(), d = void 0);
2838
+ }, j = setInterval(() => {
2839
+ if (!d)
2353
2840
  return;
2354
- Date.now() - p > l && x();
2841
+ Date.now() - y > l && k();
2355
2842
  }, n);
2356
2843
  return {
2357
2844
  dispose() {
2358
- g = !0, clearInterval(M), x();
2845
+ h = !0, clearInterval(j), k();
2359
2846
  },
2360
2847
  getWorker(...m) {
2361
- if (g)
2848
+ if (h)
2362
2849
  throw new Error("Worker manager has been disposed");
2363
- return p = Date.now(), a || (a = e.editor.createWebWorker({
2850
+ return y = Date.now(), d || (d = e.editor.createWebWorker({
2364
2851
  createData: r,
2365
2852
  label: c,
2366
- moduleId: u
2367
- })), a.withSyncedResources(m);
2853
+ moduleId: i
2854
+ })), d.withSyncedResources(m);
2368
2855
  },
2369
2856
  updateCreateData(m) {
2370
- r = m, x();
2857
+ r = m, k();
2371
2858
  }
2372
2859
  };
2373
2860
  }
2374
- function Vn(e, t) {
2861
+ function mo(e, t) {
2375
2862
  const r = {
2376
2863
  completion: !0,
2377
2864
  customTags: [],
@@ -2390,93 +2877,93 @@ function Vn(e, t) {
2390
2877
  aliases: ["YAML", "yaml", "YML", "yml"],
2391
2878
  mimetypes: ["application/x-yaml"]
2392
2879
  });
2393
- const n = Fn(e, {
2880
+ const n = go(e, {
2394
2881
  label: "yaml",
2395
2882
  moduleId: "monaco-yaml/yaml.worker",
2396
2883
  createData: r
2397
- }), c = /* @__PURE__ */ new WeakMap(), u = zn(e, "yaml", {
2884
+ }), c = /* @__PURE__ */ new WeakMap(), i = fo(e, "yaml", {
2398
2885
  owner: "yaml",
2399
- async provideMarkerData(a) {
2400
- const g = await (await n.getWorker(a.uri)).doValidation(String(a.uri));
2401
- return c.set(a, g), g?.map(Mt);
2886
+ async provideMarkerData(d) {
2887
+ const h = await (await n.getWorker(d.uri)).doValidation(String(d.uri));
2888
+ return c.set(d, h), h?.map(It);
2402
2889
  },
2403
- async doReset(a) {
2404
- await (await n.getWorker(a.uri)).resetSchema(String(a.uri));
2890
+ async doReset(d) {
2891
+ await (await n.getWorker(d.uri)).resetSchema(String(d.uri));
2405
2892
  }
2406
2893
  }), l = [
2407
2894
  n,
2408
- u,
2895
+ i,
2409
2896
  e.languages.registerCompletionItemProvider("yaml", {
2410
2897
  triggerCharacters: [" ", ":"],
2411
- async provideCompletionItems(a, p) {
2412
- const g = a.getWordUntilPosition(p), M = await (await n.getWorker(a.uri)).doComplete(String(a.uri), Re(p));
2413
- if (M)
2414
- return On(M, {
2898
+ async provideCompletionItems(d, y) {
2899
+ const h = d.getWordUntilPosition(y), j = await (await n.getWorker(d.uri)).doComplete(String(d.uri), Te(y));
2900
+ if (j)
2901
+ return to(j, {
2415
2902
  range: {
2416
- startLineNumber: p.lineNumber,
2417
- startColumn: g.startColumn,
2418
- endLineNumber: p.lineNumber,
2419
- endColumn: g.endColumn
2903
+ startLineNumber: y.lineNumber,
2904
+ startColumn: h.startColumn,
2905
+ endLineNumber: y.lineNumber,
2906
+ endColumn: h.endColumn
2420
2907
  }
2421
2908
  });
2422
2909
  }
2423
2910
  }),
2424
2911
  e.languages.registerHoverProvider("yaml", {
2425
- async provideHover(a, p) {
2426
- const x = await (await n.getWorker(a.uri)).doHover(String(a.uri), Re(p));
2427
- if (x)
2428
- return Wn(x);
2912
+ async provideHover(d, y) {
2913
+ const k = await (await n.getWorker(d.uri)).doHover(String(d.uri), Te(y));
2914
+ if (k)
2915
+ return ao(k);
2429
2916
  }
2430
2917
  }),
2431
2918
  e.languages.registerDefinitionProvider("yaml", {
2432
- async provideDefinition(a, p) {
2433
- const x = await (await n.getWorker(a.uri)).doDefinition(String(a.uri), Re(p));
2434
- return x?.map(Hn);
2919
+ async provideDefinition(d, y) {
2920
+ const k = await (await n.getWorker(d.uri)).doDefinition(String(d.uri), Te(y));
2921
+ return k?.map(lo);
2435
2922
  }
2436
2923
  }),
2437
2924
  e.languages.registerDocumentSymbolProvider("yaml", {
2438
2925
  displayName: "yaml",
2439
- async provideDocumentSymbols(a) {
2440
- const g = await (await n.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
2441
- return g?.map(Nt);
2926
+ async provideDocumentSymbols(d) {
2927
+ const h = await (await n.getWorker(d.uri)).findDocumentSymbols(String(d.uri));
2928
+ return h?.map(Ht);
2442
2929
  }
2443
2930
  }),
2444
2931
  e.languages.registerDocumentFormattingEditProvider("yaml", {
2445
2932
  displayName: "yaml",
2446
- async provideDocumentFormattingEdits(a) {
2447
- const g = await (await n.getWorker(a.uri)).format(String(a.uri));
2448
- return g?.map(Xe);
2933
+ async provideDocumentFormattingEdits(d) {
2934
+ const h = await (await n.getWorker(d.uri)).format(String(d.uri));
2935
+ return h?.map(Qe);
2449
2936
  }
2450
2937
  }),
2451
2938
  e.languages.registerLinkProvider("yaml", {
2452
- async provideLinks(a) {
2453
- const g = await (await n.getWorker(a.uri)).findLinks(String(a.uri));
2454
- if (g)
2939
+ async provideLinks(d) {
2940
+ const h = await (await n.getWorker(d.uri)).findLinks(String(d.uri));
2941
+ if (h)
2455
2942
  return {
2456
- links: g.map(Bn)
2943
+ links: h.map(co)
2457
2944
  };
2458
2945
  }
2459
2946
  }),
2460
2947
  e.languages.registerCodeActionProvider("yaml", {
2461
- async provideCodeActions(a, p, g) {
2462
- var x;
2463
- const m = await (await n.getWorker(a.uri)).getCodeAction(String(a.uri), _n(p), {
2464
- diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((T) => p.intersectRanges(K(T.range)))) || [],
2465
- only: g.only ? [g.only] : void 0,
2466
- triggerKind: g.trigger
2948
+ async provideCodeActions(d, y, h) {
2949
+ var k;
2950
+ const m = await (await n.getWorker(d.uri)).getCodeAction(String(d.uri), zn(y), {
2951
+ diagnostics: ((k = c.get(d)) == null ? void 0 : k.filter((T) => y.intersectRanges(ee(T.range)))) || [],
2952
+ only: h.only ? [h.only] : void 0,
2953
+ triggerKind: h.trigger
2467
2954
  });
2468
2955
  if (m)
2469
2956
  return {
2470
- actions: m.map(Sn),
2957
+ actions: m.map(Gn),
2471
2958
  dispose() {
2472
2959
  }
2473
2960
  };
2474
2961
  }
2475
2962
  }),
2476
2963
  e.languages.registerFoldingRangeProvider("yaml", {
2477
- async provideFoldingRanges(a) {
2478
- const g = await (await n.getWorker(a.uri)).getFoldingRanges(String(a.uri));
2479
- return g?.map(Dn);
2964
+ async provideFoldingRanges(d) {
2965
+ const h = await (await n.getWorker(d.uri)).getFoldingRanges(String(d.uri));
2966
+ return h?.map(oo);
2480
2967
  }
2481
2968
  }),
2482
2969
  e.languages.setLanguageConfiguration("yaml", {
@@ -2506,76 +2993,76 @@ function Vn(e, t) {
2506
2993
  e.languages.registerOnTypeFormattingEditProvider("yaml", {
2507
2994
  autoFormatTriggerCharacters: [`
2508
2995
  `],
2509
- async provideOnTypeFormattingEdits(a, p, g, x) {
2510
- const m = await (await n.getWorker(a.uri)).doDocumentOnTypeFormatting(
2511
- String(a.uri),
2512
- Re(p),
2513
- g,
2514
- $n(x)
2996
+ async provideOnTypeFormattingEdits(d, y, h, k) {
2997
+ const m = await (await n.getWorker(d.uri)).doDocumentOnTypeFormatting(
2998
+ String(d.uri),
2999
+ Te(y),
3000
+ h,
3001
+ io(k)
2515
3002
  );
2516
- return m?.map(Xe);
3003
+ return m?.map(Qe);
2517
3004
  }
2518
3005
  }),
2519
3006
  e.languages.registerSelectionRangeProvider("yaml", {
2520
- async provideSelectionRanges(a, p) {
2521
- const x = await (await n.getWorker(a.uri)).getSelectionRanges(
2522
- String(a.uri),
2523
- p.map(Re)
3007
+ async provideSelectionRanges(d, y) {
3008
+ const k = await (await n.getWorker(d.uri)).getSelectionRanges(
3009
+ String(d.uri),
3010
+ y.map(Te)
2524
3011
  );
2525
- return x?.map(Un);
3012
+ return k?.map(uo);
2526
3013
  }
2527
3014
  })
2528
3015
  ];
2529
3016
  return {
2530
3017
  dispose() {
2531
- for (const a of l)
2532
- a.dispose();
3018
+ for (const d of l)
3019
+ d.dispose();
2533
3020
  },
2534
- async update(a) {
2535
- n.updateCreateData(Object.assign(r, a)), await u.revalidate();
3021
+ async update(d) {
3022
+ n.updateCreateData(Object.assign(r, d)), await i.revalidate();
2536
3023
  },
2537
3024
  getOptions() {
2538
3025
  return r;
2539
3026
  }
2540
3027
  };
2541
3028
  }
2542
- function Yn(e) {
3029
+ function ho(e) {
2543
3030
  return new Worker("/assets/editor.worker-CpuX8TSY.js", {
2544
3031
  name: e?.name
2545
3032
  });
2546
3033
  }
2547
- function qn(e) {
3034
+ function po(e) {
2548
3035
  return new Worker("/assets/json.worker-B4VHhH6h.js", {
2549
3036
  name: e?.name
2550
3037
  });
2551
3038
  }
2552
- function Jn(e) {
3039
+ function yo(e) {
2553
3040
  return new Worker("/assets/ts.worker-sl17zBDo.js", {
2554
3041
  name: e?.name
2555
3042
  });
2556
3043
  }
2557
- function Gn(e) {
3044
+ function vo(e) {
2558
3045
  return new Worker("/assets/css.worker-Dmf38jDD.js", {
2559
3046
  name: e?.name
2560
3047
  });
2561
3048
  }
2562
- function Xn(e) {
3049
+ function bo(e) {
2563
3050
  return new Worker("/assets/html.worker-DotaEs7v.js", {
2564
3051
  name: e?.name
2565
3052
  });
2566
3053
  }
2567
- function Qn(e) {
3054
+ function wo(e) {
2568
3055
  return new Worker("/assets/yaml.worker-JJoHBMla.js", {
2569
3056
  name: e?.name
2570
3057
  });
2571
3058
  }
2572
- function je(...e) {
3059
+ function Le(...e) {
2573
3060
  }
2574
- function Zn(...e) {
3061
+ function _o(...e) {
2575
3062
  }
2576
- const yt = "__omniview_monaco_setup__";
2577
- if (!globalThis[yt]) {
2578
- globalThis[yt] = !0;
3063
+ const Ct = "__omniview_monaco_setup__";
3064
+ if (!globalThis[Ct]) {
3065
+ globalThis[Ct] = !0;
2579
3066
  const e = self.MonacoEnvironment ?? {};
2580
3067
  self.MonacoEnvironment = {
2581
3068
  ...e,
@@ -2584,67 +3071,68 @@ if (!globalThis[yt]) {
2584
3071
  try {
2585
3072
  switch (r) {
2586
3073
  case "yaml":
2587
- n = new Qn();
3074
+ n = new wo();
2588
3075
  break;
2589
3076
  case "json":
2590
- n = new qn();
3077
+ n = new po();
2591
3078
  break;
2592
3079
  case "typescript":
2593
3080
  case "javascript":
2594
- n = new Jn();
3081
+ n = new yo();
2595
3082
  break;
2596
3083
  case "css":
2597
3084
  case "scss":
2598
3085
  case "less":
2599
- n = new Gn();
3086
+ n = new vo();
2600
3087
  break;
2601
3088
  case "html":
2602
3089
  case "handlebars":
2603
3090
  case "razor":
2604
- n = new Xn();
3091
+ n = new bo();
2605
3092
  break;
2606
3093
  default:
2607
- n = new Yn();
3094
+ n = new ho();
2608
3095
  break;
2609
3096
  }
2610
- je(`Worker created for "${r}" — instanceof Worker: ${n instanceof Worker}`);
3097
+ Le(`Worker created for "${r}" — instanceof Worker: ${n instanceof Worker}`);
2611
3098
  } catch (c) {
2612
3099
  throw c;
2613
3100
  }
2614
3101
  return n.onerror = (c) => {
2615
- Zn(`Worker "${r}" error:`, c.message, "| filename:", c.filename);
3102
+ _o(`Worker "${r}" error:`, c.message, "| filename:", c.filename);
2616
3103
  }, n.addEventListener("message", (c) => {
2617
- je(`Worker "${r}" first message:`, JSON.stringify(c.data).slice(0, 200));
3104
+ Le(`Worker "${r}" first message:`, JSON.stringify(c.data).slice(0, 200));
2618
3105
  }, {
2619
3106
  once: !0
2620
3107
  }), n;
2621
3108
  }
2622
3109
  };
2623
3110
  try {
2624
- const t = Vn($, {
3111
+ const t = mo(W, {
2625
3112
  enableSchemaRequest: !1,
2626
3113
  schemas: []
2627
3114
  });
2628
- je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), fe._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
3115
+ Le("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), fe._setYamlHandle(t), Le("YAML handle injected into EditorSchemaRegistry");
2629
3116
  } catch (t) {
2630
3117
  console.error("[monaco-setup] configureMonacoYaml FAILED:", t);
2631
3118
  }
2632
3119
  }
2633
- function ao() {
3120
+ function No() {
2634
3121
  }
2635
3122
  export {
2636
- br as CodeEditor,
2637
- Jr as CommandPalette,
2638
- xr as DiffViewer,
2639
- Dr as MarkdownPreview,
2640
- ge as OV_MONACO_THEME,
2641
- pn as ObjectInspector,
2642
- Tr as Terminal,
2643
- Oe as buildMonacoTheme,
2644
- Ye as buildXtermTheme,
3123
+ Mo as CelQueryEditor,
3124
+ Mt as CodeEditor,
3125
+ rn as CommandPalette,
3126
+ Nr as DiffViewer,
3127
+ Vr as MarkdownPreview,
3128
+ pe as OV_MONACO_THEME,
3129
+ kn as ObjectInspector,
3130
+ Dr as Terminal,
3131
+ $e as buildMonacoTheme,
3132
+ Je as buildXtermTheme,
2645
3133
  fe as editorSchemas,
2646
- io as getComputedToken,
2647
- ao as setupMonacoWorkers,
2648
- Ke as useEditorTheme
3134
+ To as getComputedToken,
3135
+ No as setupMonacoWorkers,
3136
+ rt as useEditorTheme
2649
3137
  };
2650
3138
  //# sourceMappingURL=index.js.map