@omniviewdev/runtime 0.2.2 → 0.3.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,15 +1,15 @@
1
- var jt = Object.defineProperty;
2
- var Gt = (e, t, n) => t in e ? jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var k = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var qt = Object.defineProperty;
2
+ var Gt = (e, t, n) => t in e ? qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var I = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as R, jsxs as ce } from "react/jsx-runtime";
5
- import S, { useContext as ne, createContext as he, useState as q, useRef as $, useEffect as j, useCallback as U, useMemo as Kt } from "react";
6
- import { Link as zt, useNavigate as Qt, useLocation as Wt, createMemoryRouter as Bt, RouterProvider as Ht } from "react-router-dom";
7
- import { P as Yt, G as Jt, V as Vt, S as Xt, h as it, U as Zt, R as en, i as tn, j as at, k as nn, L as rn, l as sn, m as on, n as an, o as cn, q as un, r as ln, s as dn, t as fn, Q as pn, u as yn, v as We, w as hn, x as ct, F as gn, y as mn, z as ut, D as lt, A as _n, B as En, E as Sn, H as dt, I as Cn, J as wn, K as ft, M as bn, N as vn, O as Dn, T as Pn, W as Rn, X as In, Y as Fn } from "./Client-RGYOEzh2.js";
8
- import { config as On, resource as A, exec as xn, logs as Be, networker as He } from "./models.js";
9
- import { useQueryClient as G, useMutation as v, useQuery as P, keepPreviousData as pt, useQueries as An } from "@tanstack/react-query";
10
- import { useNotificationStack as Tn } from "@omniviewdev/ui/feedback";
11
- import { EventsOn as x, BrowserOpenURL as yt, EventsOff as be } from "./runtime.js";
12
- const Le = S.createContext(void 0), M = {
5
+ import E, { useContext as ne, createContext as he, useState as q, useCallback as M, useSyncExternalStore as jt, useRef as U, useEffect as G, useMemo as zt } from "react";
6
+ import { Link as Kt, useNavigate as Qt, useLocation as Wt, createMemoryRouter as Bt, RouterProvider as Ht } from "react-router-dom";
7
+ import { P as Yt, G as Jt, V as Vt, S as Xt, h as it, U as Zt, R as en, i as tn, j as at, k as nn, L as rn, l as sn, m as on, n as an, o as cn, q as un, r as ln, s as dn, t as fn, Q as pn, u as yn, v as Be, w as hn, x as ct, F as gn, y as mn, z as ut, D as lt, A as _n, B as Sn, E as En, H as dt, I as wn, J as Cn, K as ft, M as bn, N as vn, O as Dn, T as Pn, W as In, X as Rn, Y as Fn } from "./Client-07zrOerN.js";
8
+ import { config as On, resource as N, exec as Tn, logs as He, networker as Ye } from "./models.js";
9
+ import { useQueryClient as j, useMutation as v, useQuery as P, keepPreviousData as pt, useQueries as An } from "@tanstack/react-query";
10
+ import { useNotificationStack as Nn } from "@omniviewdev/ui/feedback";
11
+ import { EventsOn as A, BrowserOpenURL as yt, EventsOff as be } from "./runtime.js";
12
+ const $e = E.createContext(void 0), L = {
13
13
  // Plugin
14
14
  PLUGIN_NOT_FOUND: "omniview:plugin/not-found",
15
15
  PLUGIN_NOT_LOADED: "omniview:plugin/not-loaded",
@@ -40,31 +40,31 @@ const Le = S.createContext(void 0), M = {
40
40
  VALIDATION: "omniview:validation",
41
41
  NOT_IMPLEMENTED: "omniview:not-implemented"
42
42
  };
43
- function Nn(e) {
43
+ function xn(e) {
44
44
  switch (e) {
45
45
  case "NOT_FOUND":
46
- return { typeUri: M.RESOURCE_NOT_FOUND, status: 404 };
46
+ return { typeUri: L.RESOURCE_NOT_FOUND, status: 404 };
47
47
  case "FORBIDDEN":
48
- return { typeUri: M.RESOURCE_FORBIDDEN, status: 403 };
48
+ return { typeUri: L.RESOURCE_FORBIDDEN, status: 403 };
49
49
  case "UNAUTHORIZED":
50
- return { typeUri: M.RESOURCE_UNAUTHORIZED, status: 401 };
50
+ return { typeUri: L.RESOURCE_UNAUTHORIZED, status: 401 };
51
51
  case "CONFLICT":
52
52
  case "ALREADY_EXISTS":
53
- return { typeUri: M.RESOURCE_CONFLICT, status: 409 };
53
+ return { typeUri: L.RESOURCE_CONFLICT, status: 409 };
54
54
  case "TIMEOUT":
55
- return { typeUri: M.RESOURCE_TIMEOUT, status: 408 };
55
+ return { typeUri: L.RESOURCE_TIMEOUT, status: 408 };
56
56
  case "CONNECTION_ERROR":
57
- return { typeUri: M.RESOURCE_CONNECTION_ERROR, status: 503 };
57
+ return { typeUri: L.RESOURCE_CONNECTION_ERROR, status: 503 };
58
58
  case "CERTIFICATE_ERROR":
59
- return { typeUri: M.RESOURCE_CERTIFICATE_ERROR, status: 502 };
59
+ return { typeUri: L.RESOURCE_CERTIFICATE_ERROR, status: 502 };
60
60
  default:
61
- return { typeUri: M.INTERNAL, status: 500 };
61
+ return { typeUri: L.INTERNAL, status: 500 };
62
62
  }
63
63
  }
64
- function K(e) {
64
+ function z(e) {
65
65
  if (e == null)
66
66
  return {
67
- type: M.INTERNAL,
67
+ type: L.INTERNAL,
68
68
  title: "Unknown error",
69
69
  status: 500,
70
70
  detail: "An unknown error occurred."
@@ -76,7 +76,7 @@ function K(e) {
76
76
  if (typeof n.type == "string" && typeof n.title == "string" && typeof n.status == "number" && typeof n.detail == "string")
77
77
  return n;
78
78
  if (typeof n.code == "string" && typeof n.title == "string" && typeof n.message == "string") {
79
- const { typeUri: r, status: s } = Nn(n.code);
79
+ const { typeUri: r, status: s } = xn(n.code);
80
80
  return {
81
81
  type: r,
82
82
  title: n.title,
@@ -88,14 +88,14 @@ function K(e) {
88
88
  } catch {
89
89
  }
90
90
  return {
91
- type: M.INTERNAL,
91
+ type: L.INTERNAL,
92
92
  title: "Error",
93
93
  status: 500,
94
94
  detail: t
95
95
  };
96
96
  }
97
97
  function ht(e) {
98
- return e == null ? !1 : (typeof e == "string" ? e : e instanceof Error ? e.message : String(e)) === "cancelled" ? !0 : K(e).type === M.CANCELLED;
98
+ return e == null ? !1 : (typeof e == "string" ? e : e instanceof Error ? e.message : String(e)) === "cancelled" ? !0 : z(e).type === L.CANCELLED;
99
99
  }
100
100
  function kn(e) {
101
101
  switch (e.type) {
@@ -135,39 +135,39 @@ function kn(e) {
135
135
  }
136
136
  }
137
137
  function gt(e, t) {
138
- var s, o;
138
+ var s, i;
139
139
  const n = [
140
140
  e.detail,
141
- ...((s = e.suggestions) == null ? void 0 : s.map((i) => `• ${i}`)) ?? []
141
+ ...((s = e.suggestions) == null ? void 0 : s.map((o) => `• ${o}`)) ?? []
142
142
  ].join(`
143
143
  `);
144
144
  return {
145
145
  message: t || (e.title !== "Error" ? e.title : "Operation failed"),
146
146
  status: "error",
147
147
  details: n,
148
- actions: (o = e.actions) == null ? void 0 : o.map(kn)
148
+ actions: (i = e.actions) == null ? void 0 : i.map(kn)
149
149
  };
150
150
  }
151
151
  function Z(e, t, n) {
152
152
  if (ht(t)) return;
153
- const r = K(t);
153
+ const r = z(t);
154
154
  e(gt(r, n));
155
155
  }
156
- function I(e, t) {
156
+ function F(e, t) {
157
157
  return (n) => {
158
158
  if (ht(n)) return;
159
- const r = K(n);
159
+ const r = z(n);
160
160
  e(gt(r, r.title !== "Error" ? r.title : t));
161
161
  };
162
162
  }
163
163
  function Es(e) {
164
- const { children: t, pluginId: n } = e, [r, s] = S.useState({}), [o, i] = S.useState(new On.PluginMeta()), [a, u] = S.useState(!1), [l, c] = S.useState(null);
164
+ const { children: t, pluginId: n } = e, [r, s] = E.useState({}), [i, o] = E.useState(new On.PluginMeta()), [a, u] = E.useState(!1), [l, c] = E.useState(null);
165
165
  console.debug("[PluginContextProvider] render", { pluginId: n, metaLoaded: a, metaError: !!l });
166
166
  const g = () => {
167
167
  n === void 0 || n === "" || (console.debug(`[PluginContextProvider] fetching settings for "${n}"`), Yt(n).then((d) => {
168
168
  console.debug(`[PluginContextProvider] settings loaded for "${n}"`, Object.keys(d)), s(d);
169
169
  }).catch((d) => {
170
- const h = K(d);
170
+ const h = z(d);
171
171
  console.error(`[PluginContextProvider] error fetching settings for "${n}":`, h.detail);
172
172
  }));
173
173
  }, f = () => {
@@ -176,13 +176,13 @@ function Es(e) {
176
176
  return;
177
177
  }
178
178
  console.debug(`[PluginContextProvider] fetching meta for "${n}"`), c(null), Jt(n).then((d) => {
179
- console.debug(`[PluginContextProvider] meta loaded for "${n}"`, { name: d == null ? void 0 : d.name, version: d == null ? void 0 : d.version }), i(d), u(!0);
179
+ console.debug(`[PluginContextProvider] meta loaded for "${n}"`, { name: d == null ? void 0 : d.name, version: d == null ? void 0 : d.version }), o(d), u(!0);
180
180
  }).catch((d) => {
181
- const h = K(d);
181
+ const h = z(d);
182
182
  console.error(`[PluginContextProvider] error fetching meta for "${n}":`, h.detail), c(h.detail), u(!1);
183
183
  });
184
184
  };
185
- return S.useEffect(() => {
185
+ return E.useEffect(() => {
186
186
  console.debug(`[PluginContextProvider] useEffect — pluginId changed to "${n}"`), g(), f();
187
187
  }, [n]), l ? /* @__PURE__ */ R("div", { style: {
188
188
  display: "flex",
@@ -225,7 +225,7 @@ function Es(e) {
225
225
  children: "Retry"
226
226
  }
227
227
  )
228
- ] }) }) : a ? /* @__PURE__ */ R(Le.Provider, { value: { pluginId: n, settings: r, meta: o }, children: t }) : /* @__PURE__ */ ce("div", { style: {
228
+ ] }) }) : a ? /* @__PURE__ */ R($e.Provider, { value: { pluginId: n, settings: r, meta: i }, children: t }) : /* @__PURE__ */ ce("div", { style: {
229
229
  display: "flex",
230
230
  flex: 1,
231
231
  alignItems: "center",
@@ -242,24 +242,24 @@ function Es(e) {
242
242
  /* @__PURE__ */ R("style", { children: "@keyframes plugin-spin { to { transform: rotate(360deg); } }" })
243
243
  ] });
244
244
  }
245
- function $e() {
246
- const e = ne(Le);
245
+ function Ue() {
246
+ const e = ne($e);
247
247
  if (!e)
248
248
  throw new Error("usePluginContext must be used within a PluginContextProvider");
249
249
  return e;
250
250
  }
251
- function Ss() {
252
- return $e().settings;
251
+ function ws() {
252
+ return Ue().settings;
253
253
  }
254
254
  const mt = he(void 0), Cs = ({ children: e }) => {
255
255
  const [t, n] = q({}), r = () => {
256
- Vt().then((o) => {
257
- console.log("Fetched settings:", o), n(o);
258
- }).catch((o) => {
259
- console.error("Error fetching settings:", o);
256
+ Vt().then((i) => {
257
+ console.log("Fetched settings:", i), n(i);
258
+ }).catch((i) => {
259
+ console.error("Error fetching settings:", i);
260
260
  });
261
261
  };
262
- S.useEffect(() => {
262
+ E.useEffect(() => {
263
263
  r();
264
264
  }, []);
265
265
  const s = () => {
@@ -290,69 +290,69 @@ const mt = he(void 0), Cs = ({ children: e }) => {
290
290
  },
291
291
  fullscreenDrawer: () => {
292
292
  }
293
- }, Ln = S.createContext(Mn), $n = he(void 0), Un = S.createContext(void 0), _t = S.createContext(void 0), qn = 3e4, ws = ({ children: e }) => {
294
- const [t, n] = S.useState([]), r = S.useCallback((a) => {
293
+ }, Ln = E.createContext(Mn), $n = he(void 0), Un = E.createContext(void 0), _t = E.createContext(void 0), qn = 3e4, bs = ({ children: e }) => {
294
+ const [t, n] = E.useState([]), r = E.useCallback((a) => {
295
295
  n((u) => [a, ...u]);
296
- }, []), s = S.useCallback((a, u) => {
296
+ }, []), s = E.useCallback((a, u) => {
297
297
  n(
298
298
  (l) => l.map((c) => c.id === a ? { ...c, ...u } : c)
299
299
  );
300
- }, []), o = S.useCallback((a) => {
300
+ }, []), i = E.useCallback((a) => {
301
301
  n((u) => u.filter((l) => l.id !== a));
302
302
  }, []);
303
- S.useEffect(() => {
303
+ E.useEffect(() => {
304
304
  const a = [];
305
305
  for (const u of t)
306
306
  if (u.status === "completed" || u.status === "error") {
307
307
  const l = Date.now() - (u.completedAt ?? u.startedAt), c = Math.max(0, qn - l);
308
- a.push(setTimeout(() => o(u.id), c));
308
+ a.push(setTimeout(() => i(u.id), c));
309
309
  }
310
310
  return () => a.forEach(clearTimeout);
311
- }, [t, o]);
312
- const i = S.useMemo(
313
- () => ({ operations: t, addOperation: r, updateOperation: s, removeOperation: o }),
314
- [t, r, s, o]
311
+ }, [t, i]);
312
+ const o = E.useMemo(
313
+ () => ({ operations: t, addOperation: r, updateOperation: s, removeOperation: i }),
314
+ [t, r, s, i]
315
315
  );
316
- return /* @__PURE__ */ R(_t.Provider, { value: i, children: e });
316
+ return /* @__PURE__ */ R(_t.Provider, { value: o, children: e });
317
317
  };
318
- var Ie = function(e, t) {
319
- return Ie = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
318
+ var Fe = function(e, t) {
319
+ return Fe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
320
320
  n.__proto__ = r;
321
321
  } || function(n, r) {
322
322
  for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
323
- }, Ie(e, t);
323
+ }, Fe(e, t);
324
324
  };
325
- function jn(e, t) {
325
+ function Gn(e, t) {
326
326
  if (typeof t != "function" && t !== null)
327
327
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
328
- Ie(e, t);
328
+ Fe(e, t);
329
329
  function n() {
330
330
  this.constructor = e;
331
331
  }
332
332
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
333
333
  }
334
- var ve = "Invariant Violation", Ye = Object.setPrototypeOf, Gn = Ye === void 0 ? function(e, t) {
334
+ var ve = "Invariant Violation", Je = Object.setPrototypeOf, jn = Je === void 0 ? function(e, t) {
335
335
  return e.__proto__ = t, e;
336
- } : Ye, Kn = (
336
+ } : Je, zn = (
337
337
  /** @class */
338
338
  function(e) {
339
- jn(t, e);
339
+ Gn(t, e);
340
340
  function t(n) {
341
341
  n === void 0 && (n = ve);
342
342
  var r = e.call(this, typeof n == "number" ? ve + ": " + n + " (see https://github.com/apollographql/invariant-packages)" : n) || this;
343
- return r.framesToPop = 1, r.name = ve, Gn(r, t.prototype), r;
343
+ return r.framesToPop = 1, r.name = ve, jn(r, t.prototype), r;
344
344
  }
345
345
  return t;
346
346
  }(Error)
347
347
  );
348
- function Fe(e, t) {
348
+ function Oe(e, t) {
349
349
  if (!e)
350
- throw new Kn(t);
350
+ throw new zn(t);
351
351
  }
352
- var Et = ["debug", "log", "warn", "error", "silent"], zn = Et.indexOf("log");
352
+ var St = ["debug", "log", "warn", "error", "silent"], Kn = St.indexOf("log");
353
353
  function ue(e) {
354
354
  return function() {
355
- if (Et.indexOf(e) >= zn) {
355
+ if (St.indexOf(e) >= Kn) {
356
356
  var t = console[e] || console.log;
357
357
  return t.apply(console, arguments);
358
358
  }
@@ -360,318 +360,320 @@ function ue(e) {
360
360
  }
361
361
  (function(e) {
362
362
  e.debug = ue("debug"), e.log = ue("log"), e.warn = ue("warn"), e.error = ue("error");
363
- })(Fe || (Fe = {}));
364
- const St = he(void 0), Ct = () => ne(St), bs = (e) => {
365
- const t = Ct();
366
- return t == null ? void 0 : t.getExtensionPoint(e);
367
- }, vs = (e) => {
368
- const t = Ct(), n = t == null ? void 0 : t.getExtensionPoint(e);
369
- return n ? n.provide({ getCacheKey: () => e }) : [];
370
- }, Ds = ({ registry: e, children: t }) => {
371
- const n = S.useRef(e);
372
- return S.useEffect(() => {
373
- Fe(
374
- n.current === e,
375
- "You can't change the extension registry after it has been rendered"
376
- );
377
- }, [e]), /* @__PURE__ */ R(St.Provider, { value: n.current, children: S.Children.only(t) });
378
- }, Je = (e) => {
363
+ })(Oe || (Oe = {}));
364
+ const Et = he(void 0), Qn = () => ne(Et);
365
+ function vs(e) {
366
+ const t = Qn(), n = E.useRef(null), r = t == null ? void 0 : t.getExtensionPoint(e), s = M(
367
+ (o) => {
368
+ const a = [];
369
+ return t && a.push(t.subscribe(o)), r && a.push(r.subscribe(o)), () => {
370
+ for (const u of a)
371
+ u();
372
+ };
373
+ },
374
+ [t, e, r]
375
+ ), i = M(() => {
376
+ const o = t == null ? void 0 : t.getExtensionPoint(e);
377
+ if (!o) {
378
+ if (n.current && n.current.store === void 0)
379
+ return n.current.sentinel;
380
+ const l = {};
381
+ return n.current = { store: void 0, version: -1, sentinel: l }, l;
382
+ }
383
+ const a = n.current;
384
+ if (a && a.store === o && a.version === o.version)
385
+ return a.sentinel;
386
+ const u = {};
387
+ return n.current = { store: o, version: o.version, sentinel: u }, u;
388
+ }, [t, e]);
389
+ return jt(s, i), t == null ? void 0 : t.getExtensionPoint(e);
390
+ }
391
+ const Ds = ({ registry: e, children: t }) => {
392
+ const n = E.useRef(e);
393
+ return Oe(
394
+ n.current === e,
395
+ "You can't change the extension registry after it has been rendered"
396
+ ), /* @__PURE__ */ R(Et.Provider, { value: n.current, children: t });
397
+ }, De = (e) => {
379
398
  if (!e || typeof e != "string")
380
399
  throw new TypeError(`extensionName is required to be a string and can't be: "${e}" (${typeof e})`);
381
400
  return e.trim();
382
401
  };
383
- class Qn {
402
+ class Wn {
384
403
  constructor(t) {
385
- k(this, "_settings");
386
- k(this, "_extensions", /* @__PURE__ */ new Map());
387
- k(this, "_lookupCache", /* @__PURE__ */ new Map());
388
- k(this, "_matchCache", /* @__PURE__ */ new Map());
389
- k(this, "_matcher");
390
- const { matcher: n, ...r } = t;
391
- this._settings = r, this._matcher = t.matcher;
404
+ I(this, "id");
405
+ I(this, "mode");
406
+ I(this, "_pluginId");
407
+ I(this, "_version", 0);
408
+ I(this, "_contributions", /* @__PURE__ */ new Map());
409
+ I(this, "_lookupCache", /* @__PURE__ */ new Map());
410
+ I(this, "_matcher");
411
+ I(this, "_select");
412
+ I(this, "_listeners", /* @__PURE__ */ new Set());
413
+ this.id = t.id, this.mode = t.mode ?? "multiple", this._pluginId = t.pluginId, this._matcher = t.matcher, this._select = t.select;
414
+ }
415
+ get pluginId() {
416
+ return this._pluginId;
392
417
  }
393
- settings() {
394
- return this._settings;
418
+ get version() {
419
+ return this._version;
395
420
  }
396
421
  /**
397
- * Registers a new component within the registry. Throws an error if a component with the same ID already exists.
398
- * This method should be used when initializing components or dynamically adding new components at runtime.
399
- *
400
- * @param opts The registration options for the component, containing its ID, plugin, and other metadata.
401
- * @throws Error if a component with the same ID is already registered.
402
- * @example
403
- * registry.register({
404
- * id: 'unique-sidebar-item',
405
- * plugin: 'examplePlugin',
406
- * label: 'My Sidebar Item',
407
- * component: MyComponent,
408
- * });
409
- */
422
+ * Register a contribution. Throws if the contribution ID already exists.
423
+ */
410
424
  register(t) {
411
- if (this._extensions.get(t.id))
412
- throw new Error(`Resource sidebar view with id ${t.id} already exists`);
413
- const n = {
414
- ...t,
415
- registeredAt: /* @__PURE__ */ new Date(),
416
- updatedAt: /* @__PURE__ */ new Date(),
417
- enabled: !0
418
- };
419
- this._extensions.set(t.id, n);
420
- const r = Array.from(this._matchCache.keys());
421
- for (const s of r)
422
- s.startsWith(t.plugin) && this._matchCache.delete(s);
425
+ if (this._contributions.has(t.id))
426
+ throw new Error(
427
+ `Contribution with id "${t.id}" already exists in extension point "${this.id}"`
428
+ );
429
+ this._contributions.set(t.id, t), this._invalidateCache(), this._notify();
423
430
  }
424
431
  /**
425
- * Unregisters a component from the registry by its ID. Useful for cleanup or when components are dynamically removed.
426
- *
427
- * @param id The ID of the component to unregister.
428
- * @example
429
- * registry.unregister('unique-sidebar-item');
430
- */
432
+ * Unregister a contribution by ID.
433
+ */
431
434
  unregister(t) {
432
- this._extensions.delete(t);
435
+ this._contributions.delete(t) && (this._invalidateCache(), this._notify());
433
436
  }
434
437
  /**
435
- * Retrieves a component by its ID from the registry. Returns undefined if no such component exists.
436
- *
437
- * @param id The ID of the component to retrieve.
438
- * @returns The component associated with the given ID, or undefined if not found.
439
- * @example
440
- * const component = registry.get('unique-sidebar-item');
441
- * if (component) {
442
- * render(component);
443
- * }
444
- */
445
- get(t) {
446
- var n;
447
- return (n = this._extensions.get(t)) == null ? void 0 : n.component;
438
+ * Synchronously provide matched values for the given context.
439
+ * In single mode, matcher is applied first, then select (or first match) picks one.
440
+ * In multiple mode, all matched contributions are returned in deterministic order.
441
+ */
442
+ provide(t) {
443
+ return this._getMatched(t).map((r) => r.value);
448
444
  }
449
445
  /**
450
- * Lists all registered components in the registry. Useful for debugging or generating summaries of available components.
451
- *
452
- * @returns An array of all registered components.
453
- * @example
454
- * const allComponents = registry.list();
455
- * console.log('Registered Components:', allComponents);
456
- */
457
- list() {
458
- return Array.from(this._extensions.values());
459
- }
460
- generateMatchCacheKey(t) {
461
- return `${t.plugin}/${t.id}`;
446
+ * Synchronously list matched contribution registrations for the given context.
447
+ */
448
+ list(t) {
449
+ return this._getMatched(t);
462
450
  }
463
451
  /**
464
- * Calculate the matches for the given context.
452
+ * List all contributions regardless of context/matcher.
465
453
  */
466
- calculateMatches(t) {
467
- if (!this._matcher)
468
- return Array.from(this._extensions.values());
469
- const n = [];
470
- for (const r of this._extensions.values()) {
471
- const s = this.generateMatchCacheKey(r), o = this._matchCache.has(s);
472
- if (o && this._matchCache.get(s)) {
473
- n.push(r);
474
- continue;
475
- }
476
- this._matcher(t, r) ? (this._matchCache.set(s, !0), n.push(r)) : o || this._matchCache.set(s, !1);
477
- }
478
- return n;
454
+ listAll() {
455
+ return Array.from(this._contributions.values());
479
456
  }
480
457
  /**
481
- * Preload the registry caches with the given expected context to avoid on-first-request calculation.
482
- * This is useful when the registry is used to provide components for a specific context, like for
483
- * specific resources types.
484
- *
485
- * If the cache is already populated for the expected context, the cache key will be recalculated.
486
- *
487
- * @param context The context expected to be called preload the registry with on provide.
458
+ * Subscribe to changes in this store. Returns an unsubscribe function.
488
459
  */
489
- preload(t) {
490
- const n = this.calculateMatches(t), r = t.getCacheKey();
491
- this._lookupCache.set(r, n.map((s) => s.id));
460
+ subscribe(t) {
461
+ return this._listeners.add(t), () => {
462
+ this._listeners.delete(t);
463
+ };
492
464
  }
493
465
  /**
494
- * Provide the components that match the given context.
466
+ * Remove all contributions owned by the given plugin.
495
467
  */
496
- provide(t) {
497
- if (this._settings.disabled)
498
- return [];
499
- if (this._settings.mode === "single") {
500
- const o = this._extensions.get(this._settings.selected);
501
- return o ? [o.component] : [];
502
- }
503
- const n = t.getCacheKey();
504
- let r = this._lookupCache.get(n);
505
- if (r) {
506
- let o = r.map((i) => this._extensions.get(i)).filter((i) => !!i).map((i) => i.component);
507
- return this._settings.order && (o = this.reorderComponents(o, r, this._settings.order)), o;
468
+ removeContributionsByPlugin(t) {
469
+ let n = !1;
470
+ for (const [r, s] of this._contributions)
471
+ s.plugin === t && (this._contributions.delete(r), n = !0);
472
+ n && (this._invalidateCache(), this._notify());
473
+ }
474
+ // --- private ---
475
+ _getMatched(t) {
476
+ const n = this._getCacheKey(t);
477
+ if (n != null) {
478
+ const s = this._lookupCache.get(n);
479
+ if (s) {
480
+ const i = s.map((o) => this._contributions.get(o)).filter((o) => o != null);
481
+ return this._applyMode(i, t);
482
+ }
508
483
  }
509
- r = this.calculateMatches(t).map((o) => o.id), this._lookupCache.set(n, r);
510
- let s = r.map((o) => this._extensions.get(o)).filter((o) => !!o).map((o) => o.component);
511
- return this._settings.order && (s = this.reorderComponents(s, r, this._settings.order)), s;
484
+ let r = this._sortDeterministic(Array.from(this._contributions.values()));
485
+ return this._matcher && t !== void 0 && (r = r.filter((s) => this._matcher(s, t))), n != null && this._lookupCache.set(n, r.map((s) => s.id)), this._applyMode(r, t);
512
486
  }
513
- reorderComponents(t, n, r) {
514
- const s = new Map(n.map((o, i) => [o, t[i]]));
515
- return r.map((o) => s.get(o)).filter((o) => !!o);
487
+ _applyMode(t, n) {
488
+ if (this.mode === "single") {
489
+ if (this._select) {
490
+ const r = this._select(t, n);
491
+ return r ? [r] : [];
492
+ }
493
+ return t.length > 0 ? [t[0]] : [];
494
+ }
495
+ return t;
516
496
  }
517
497
  /**
518
- * Reorder the components in the registry based on the given order.
498
+ * Sort contributions deterministically: plugin ascending, then id ascending.
519
499
  */
520
- reorder(t) {
521
- const n = t.map((i) => this._extensions.get(i)).filter((i) => !!i), r = Array.from(this._extensions.values()).filter((i) => !t.includes(i.id)), s = [...n, ...r];
522
- this._extensions.clear(), s.forEach((i) => this._extensions.set(i.id, i));
523
- const o = Array.from(this._lookupCache.keys());
524
- for (const i of o) {
525
- const a = this._lookupCache.get(i);
526
- if (!a)
527
- continue;
528
- const u = a.filter((l) => t.includes(l));
529
- this._lookupCache.set(i, u);
500
+ _sortDeterministic(t) {
501
+ return [...t].sort((n, r) => {
502
+ const s = n.plugin.localeCompare(r.plugin);
503
+ return s !== 0 ? s : n.id.localeCompare(r.id);
504
+ });
505
+ }
506
+ _getCacheKey(t) {
507
+ if (t != null && typeof t == "object" && "getCacheKey" in t) {
508
+ const n = t.getCacheKey;
509
+ if (typeof n == "function")
510
+ return n();
530
511
  }
531
512
  }
532
- clearLookupCache() {
513
+ _invalidateCache() {
533
514
  this._lookupCache.clear();
534
515
  }
535
- clearMatchCache() {
536
- this._matchCache.clear();
537
- }
538
- clearAllCaches() {
539
- this.clearLookupCache(), this.clearMatchCache();
516
+ _notify() {
517
+ this._version++;
518
+ for (const t of this._listeners)
519
+ t();
540
520
  }
541
521
  }
542
522
  class Ps {
543
- constructor({ initialStores: t }) {
544
- k(this, "store", {});
545
- t.forEach((n) => {
546
- this.addExtensionPoint(n);
547
- });
523
+ constructor(t) {
524
+ I(this, "_stores", /* @__PURE__ */ new Map());
525
+ I(this, "_storeUnsubs", /* @__PURE__ */ new Map());
526
+ I(this, "_listeners", /* @__PURE__ */ new Set());
527
+ if (t != null && t.initialStores)
528
+ for (const n of t.initialStores)
529
+ this.addExtensionPoint(n);
548
530
  }
549
531
  /**
550
- * Add a new extension point to the registry. If the extension point already exists, it will not be
551
- * added again.
552
- * @param opts The settings for the extension point
532
+ * Add a new extension point to the registry.
533
+ * Throws if the extension point ID already exists.
553
534
  */
554
535
  addExtensionPoint(t) {
555
- let n = Je(t.id);
556
- if (console.log("validated", n), console.log("store", this.store), this.store[n]) {
557
- console.warn(`Extension point ${n} already exists. Not adding again.`);
558
- return;
536
+ const n = De(t.id);
537
+ if (this._stores.has(n)) {
538
+ const s = this._stores.get(n);
539
+ throw new Error(
540
+ `Extension point "${n}" already exists (owned by "${s.pluginId ?? "unknown"}")`
541
+ );
559
542
  }
560
- this.store[n] = new Qn(t);
543
+ const r = new Wn({ ...t, id: n });
544
+ this._stores.set(n, r), this._storeUnsubs.set(n, r.subscribe(() => this._notify())), this._notify();
561
545
  }
562
546
  /**
563
- * Get an extension point from the registry.
547
+ * Get an extension point store by ID.
564
548
  */
565
549
  getExtensionPoint(t) {
566
- return t = Je(t), this.store[t];
550
+ const n = De(t);
551
+ return this._stores.get(n);
567
552
  }
568
553
  /**
569
- * List all extension points in the registry.
554
+ * Check if an extension point exists.
570
555
  */
571
- listExtensionPointIds() {
572
- return Object.keys(this.store);
556
+ hasExtensionPoint(t) {
557
+ const n = De(t);
558
+ return this._stores.has(n);
573
559
  }
574
- // /**
575
- // * List extension points, grouped by owner
576
- // */
577
- // listExtensionPointsByOwner(): Record<string, ExtensionPointSettings[]> {
578
- // const byOwner: Record<string, ExtensionPointSettings[]> = {};
579
- // Object.values(this.store).forEach((store) => {
580
- // const owner = store.settings().owner;
581
- // if (!byOwner[owner]) {
582
- // byOwner[owner] = [];
583
- // }
584
- //
585
- // byOwner[owner].push(store.settings());
586
- // });
587
- // return byOwner;
588
- // }
589
560
  /**
590
- * List all extensions in the registry.
561
+ * List all extension point IDs.
591
562
  */
592
563
  listExtensionPoints() {
593
- return Object.values(this.store).map((t) => t.settings());
564
+ return Array.from(this._stores.keys());
565
+ }
566
+ /**
567
+ * Remove all extension points owned by the given plugin.
568
+ */
569
+ removeExtensionPoints(t) {
570
+ var r;
571
+ let n = !1;
572
+ for (const [s, i] of this._stores)
573
+ i.pluginId === t && ((r = this._storeUnsubs.get(s)) == null || r(), this._storeUnsubs.delete(s), this._stores.delete(s), n = !0);
574
+ n && this._notify();
575
+ }
576
+ /**
577
+ * Remove all contributions from the given plugin across all extension points.
578
+ */
579
+ removeContributions(t) {
580
+ for (const n of this._stores.values())
581
+ n.removeContributionsByPlugin(t);
582
+ this._notify();
583
+ }
584
+ /**
585
+ * Subscribe to registry-level changes (extension points added/removed, contributions changed).
586
+ * Returns an unsubscribe function.
587
+ */
588
+ subscribe(t) {
589
+ return this._listeners.add(t), () => {
590
+ this._listeners.delete(t);
591
+ };
592
+ }
593
+ _notify() {
594
+ for (const t of this._listeners)
595
+ t();
594
596
  }
595
597
  }
596
- const wt = he(void 0), Wn = {
598
+ const wt = he(void 0), Bn = {
597
599
  default: "info",
598
600
  info: "info",
599
601
  success: "success",
600
602
  warning: "warning",
601
603
  error: "error"
602
- }, Rs = ({ children: e }) => {
603
- const { push: t } = Tn(), [n, r] = S.useState([]), s = (i) => {
604
- r((a) => [...a, i]);
605
- }, o = (i, a, u) => {
606
- const l = typeof i == "object";
604
+ }, Is = ({ children: e }) => {
605
+ const { push: t } = Nn(), [n, r] = E.useState([]), s = (o) => {
606
+ r((a) => [...a, o]);
607
+ }, i = (o, a, u) => {
608
+ const l = typeof o == "object";
607
609
  let c = "", g = "info", f, d = 5e3, h;
608
610
  if (l) {
609
- if (c = i.message, i.showOnce) {
611
+ if (c = o.message, o.showOnce) {
610
612
  if (n.includes(c))
611
613
  return;
612
614
  s(c);
613
615
  }
614
- g = i.status, f = i.details, d = i.autoHideDuration ?? 5e3, h = i.actions;
616
+ g = o.status, f = o.details, d = o.autoHideDuration ?? 5e3, h = o.actions;
615
617
  } else
616
- c = i, g = a, f = u;
618
+ c = o, g = a, f = u;
617
619
  t({
618
- severity: Wn[g] ?? "info",
620
+ severity: Bn[g] ?? "info",
619
621
  title: c,
620
622
  message: f,
621
623
  timeout: d,
622
624
  actions: h
623
625
  });
624
626
  };
625
- return /* @__PURE__ */ R(wt.Provider, { value: { showSnackbar: o }, children: e });
626
- }, L = () => {
627
+ return /* @__PURE__ */ R(wt.Provider, { value: { showSnackbar: i }, children: e });
628
+ }, $ = () => {
627
629
  const e = ne(wt);
628
630
  if (e === void 0)
629
631
  throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");
630
632
  return e;
631
633
  };
632
634
  function D(e) {
633
- const t = ne(Le), n = (t == null ? void 0 : t.pluginId) ?? e;
635
+ const t = ne($e), n = (t == null ? void 0 : t.pluginId) ?? e;
634
636
  if (!n)
635
637
  throw new Error(
636
638
  "pluginID must be provided either via PluginContext or as an explicit parameter"
637
639
  );
638
640
  return n;
639
641
  }
640
- const Is = ({ pluginID: e, connectionID: t }) => {
641
- const n = D(e), r = G(), { showSnackbar: s } = L(), o = [n, "connection", "detail", t], { mutateAsync: i } = v({
642
+ const Rs = ({ pluginID: e, connectionID: t }) => {
643
+ const n = D(e), r = j(), { showSnackbar: s } = $(), i = [n, "connection", "detail", t], { mutateAsync: o } = v({
642
644
  mutationFn: async () => Xt(n, t),
643
645
  onSuccess(g) {
644
- r.setQueryData(o, g), r.invalidateQueries({
646
+ r.setQueryData(i, g), r.invalidateQueries({
645
647
  queryKey: ["EDITOR_SCHEMAS", n, t]
646
648
  });
647
649
  },
648
- onError: I(s, "Failed to start connection")
650
+ onError: F(s, "Failed to start connection")
649
651
  }), { mutateAsync: a } = v({
650
652
  mutationFn: async () => it(n, t),
651
653
  onSuccess(g) {
652
- r.setQueryData(o, g);
654
+ r.setQueryData(i, g);
653
655
  },
654
- onError: I(s, "Failed to stop connection")
656
+ onError: F(s, "Failed to stop connection")
655
657
  }), { mutateAsync: u } = v({
656
658
  mutationFn: async (g) => Zt(n, g),
657
659
  onSuccess(g, { name: f }) {
658
- s({ message: `Connection ${f} successfully updated`, status: "success" }), r.setQueryData(o, c), r.setQueriesData(
660
+ s({ message: `Connection ${f} successfully updated`, status: "success" }), r.setQueryData(i, c), r.setQueriesData(
659
661
  { queryKey: [n, "connection", "list"] },
660
662
  (d) => d == null ? void 0 : d.map((h) => h.id === t ? g : h)
661
663
  );
662
664
  },
663
- onError: I(s, "Failed to update connection")
665
+ onError: F(s, "Failed to update connection")
664
666
  }), { mutateAsync: l } = v({
665
667
  mutationFn: async () => en(n, t),
666
668
  onSuccess() {
667
- s({ message: "Connection successfully removed", status: "success" }), r.setQueryData(o, void 0), r.setQueriesData(
669
+ s({ message: "Connection successfully removed", status: "success" }), r.setQueryData(i, void 0), r.setQueriesData(
668
670
  { queryKey: [n, "connection", "list"] },
669
671
  (g) => g == null ? void 0 : g.filter((f) => f.id !== t)
670
672
  );
671
673
  },
672
- onError: I(s, "Failed to remove connection")
674
+ onError: F(s, "Failed to remove connection")
673
675
  }), c = P({
674
- queryKey: o,
676
+ queryKey: i,
675
677
  queryFn: async () => tn(n, t)
676
678
  });
677
679
  return {
@@ -682,7 +684,7 @@ const Is = ({ pluginID: e, connectionID: t }) => {
682
684
  /**
683
685
  * Start the connection
684
686
  */
685
- startConnection: i,
687
+ startConnection: o,
686
688
  /**
687
689
  * Stop the connection
688
690
  */
@@ -696,18 +698,18 @@ const Is = ({ pluginID: e, connectionID: t }) => {
696
698
  */
697
699
  deleteConnection: l
698
700
  };
699
- }, Bn = (e) => [e, "connection", "list"], Fs = ({ plugin: e }) => {
700
- const t = D(e), n = G(), { showSnackbar: r } = L(), s = Bn(t), { mutateAsync: o } = v({
701
+ }, Hn = (e) => [e, "connection", "list"], Fs = ({ plugin: e }) => {
702
+ const t = D(e), n = j(), { showSnackbar: r } = $(), s = Hn(t), { mutateAsync: i } = v({
701
703
  mutationFn: async (l) => at(t, l.id),
702
- onError: I(r, "Failed to start connection watch")
703
- }), { mutateAsync: i } = v({
704
+ onError: F(r, "Failed to start connection watch")
705
+ }), { mutateAsync: o } = v({
704
706
  mutationFn: async (l) => nn(t, l.id),
705
- onError: I(r, "Failed to stop connection watch")
706
- }), a = S.useCallback((l) => {
707
+ onError: F(r, "Failed to stop connection watch")
708
+ }), a = E.useCallback((l) => {
707
709
  console.log("got update to connections", l), n.setQueryData(s, l);
708
710
  }, []);
709
- return S.useEffect(() => {
710
- const l = x(`${t}/connection/sync`, a);
711
+ return E.useEffect(() => {
712
+ const l = A(`${t}/connection/sync`, a);
711
713
  return () => {
712
714
  l();
713
715
  };
@@ -718,15 +720,15 @@ const Is = ({ pluginID: e, connectionID: t }) => {
718
720
  try {
719
721
  return await rn(t);
720
722
  } catch (l) {
721
- console.log(l), I(r, "Failed to load connections")(l);
723
+ console.log(l), F(r, "Failed to load connections")(l);
722
724
  }
723
725
  return [];
724
726
  },
725
727
  staleTime: 3e4,
726
728
  placeholderData: pt
727
729
  }),
728
- startWatch: o,
729
- stopWatch: i
730
+ startWatch: i,
731
+ stopWatch: o
730
732
  };
731
733
  }, Os = ({ pluginID: e, connectionID: t }) => {
732
734
  const n = D(e);
@@ -739,14 +741,14 @@ const Is = ({ pluginID: e, connectionID: t }) => {
739
741
  queryFn: async () => sn(n, t)
740
742
  })
741
743
  };
742
- }, C = A.WatchState, xs = A.SyncPolicy;
743
- function Oe(e) {
744
+ }, w = N.WatchState, Ts = N.SyncPolicy;
745
+ function Te(e) {
744
746
  const t = Object.values(e.states), n = t.length;
745
- let r = 0, s = 0, o = 0, i = 0;
747
+ let r = 0, s = 0, i = 0, o = 0;
746
748
  for (const c of t)
747
- c === C.SYNCED && r++, (c === C.ERROR || c === C.FAILED) && s++, c === C.FORBIDDEN && o++, c === C.SKIPPED && i++;
748
- const a = n - i, u = t.filter(
749
- (c) => c === C.SYNCED || c === C.ERROR || c === C.STOPPED || c === C.FAILED || c === C.FORBIDDEN
749
+ c === w.SYNCED && r++, (c === w.ERROR || c === w.FAILED) && s++, c === w.FORBIDDEN && i++, c === w.SKIPPED && o++;
750
+ const a = n - o, u = t.filter(
751
+ (c) => c === w.SYNCED || c === w.ERROR || c === w.STOPPED || c === w.FAILED || c === w.FORBIDDEN
750
752
  ).length, l = a > 0 ? u / a : 0;
751
753
  return {
752
754
  pluginID: e.pluginID,
@@ -755,8 +757,8 @@ function Oe(e) {
755
757
  watchedTotal: a,
756
758
  syncedCount: r,
757
759
  errorCount: s,
758
- forbiddenCount: o,
759
- skippedCount: i,
760
+ forbiddenCount: i,
761
+ skippedCount: o,
760
762
  doneCount: u,
761
763
  progress: l
762
764
  };
@@ -764,18 +766,18 @@ function Oe(e) {
764
766
  function de(e) {
765
767
  return e.watchedTotal > 0 && e.doneCount >= e.watchedTotal;
766
768
  }
767
- function bt(e) {
769
+ function Ct(e) {
768
770
  return e.some((t) => !de(t));
769
771
  }
770
- function vt(e) {
772
+ function bt(e) {
771
773
  const t = e.reduce((r, s) => r + s.watchedTotal, 0);
772
774
  return t === 0 ? 0 : e.reduce((r, s) => r + s.doneCount, 0) / t;
773
775
  }
774
- function Ue(e) {
776
+ function qe(e) {
775
777
  return `${e.pluginId}/${e.connection}`;
776
778
  }
777
- function Dt(e, t) {
778
- const n = Ue(t);
779
+ function vt(e, t) {
780
+ const n = qe(t);
779
781
  e.has(n) || e.set(n, {
780
782
  states: {},
781
783
  pluginID: t.pluginId,
@@ -785,76 +787,76 @@ function Dt(e, t) {
785
787
  return r.states[t.resourceKey] = t.state, r;
786
788
  }
787
789
  function As() {
788
- const [e, t] = q(/* @__PURE__ */ new Set()), [n, r] = q({}), [s, o] = q(/* @__PURE__ */ new Map()), i = $(/* @__PURE__ */ new Map());
789
- j(() => {
790
+ const [e, t] = q(/* @__PURE__ */ new Set()), [n, r] = q({}), [s, i] = q(/* @__PURE__ */ new Map()), o = U(/* @__PURE__ */ new Map());
791
+ G(() => {
790
792
  on().then((y) => {
791
793
  if (!y) return;
792
- const m = {}, p = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Map();
793
- for (const [_, w] of Object.entries(y)) {
794
- m[_] = w.map((F) => F.connection);
795
- for (const F of w) {
796
- if (!F.started) continue;
797
- const b = `${_}/${F.connection.id}`;
794
+ const m = {}, p = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Map();
795
+ for (const [_, C] of Object.entries(y)) {
796
+ m[_] = C.map((O) => O.connection);
797
+ for (const O of C) {
798
+ if (!O.started) continue;
799
+ const b = `${_}/${O.connection.id}`;
798
800
  p.add(b);
799
- const z = {
801
+ const K = {
800
802
  pluginID: _,
801
- connectionID: F.connection.id,
803
+ connectionID: O.connection.id,
802
804
  states: {}
803
805
  };
804
- if (F.resources)
805
- for (const [we, se] of Object.entries(F.resources))
806
- z.states[we] = se;
807
- i.current.set(b, z), E.set(b, Oe(z));
806
+ if (O.resources)
807
+ for (const [Ce, se] of Object.entries(O.resources))
808
+ K.states[Ce] = se;
809
+ o.current.set(b, K), S.set(b, Te(K));
808
810
  }
809
811
  }
810
- r(m), t(p), o(E);
812
+ r(m), t(p), i(S);
811
813
  }).catch(() => {
812
814
  });
813
- }, []), j(() => x("connection/status", (m) => {
815
+ }, []), G(() => A("connection/status", (m) => {
814
816
  const p = `${m.pluginID}/${m.connectionID}`;
815
- m.status === "DISCONNECTED" ? (t((E) => {
816
- const _ = new Set(E);
817
+ m.status === "DISCONNECTED" ? (t((S) => {
818
+ const _ = new Set(S);
817
819
  return _.delete(p), _;
818
- }), o((E) => {
819
- const _ = new Map(E);
820
+ }), i((S) => {
821
+ const _ = new Map(S);
820
822
  return _.delete(p), _;
821
- }), i.current.delete(p)) : t((E) => {
822
- const _ = new Set(E);
823
+ }), o.current.delete(p)) : t((S) => {
824
+ const _ = new Set(S);
823
825
  return _.add(p), _;
824
- }), an().then((E) => {
825
- E && r(E);
826
+ }), an().then((S) => {
827
+ S && r(S);
826
828
  }).catch(() => {
827
829
  });
828
830
  }), []);
829
- const a = U((y) => {
830
- const m = Ue(y);
831
+ const a = M((y) => {
832
+ const m = qe(y);
831
833
  t((_) => {
832
834
  if (_.has(m)) return _;
833
- const w = new Set(_);
834
- return w.add(m), w;
835
+ const C = new Set(_);
836
+ return C.add(m), C;
835
837
  });
836
- const p = Dt(i.current, y), E = Oe(p);
837
- o((_) => {
838
- const w = new Map(_);
839
- return w.set(m, E), w;
838
+ const p = vt(o.current, y), S = Te(p);
839
+ i((_) => {
840
+ const C = new Map(_);
841
+ return C.set(m, S), C;
840
842
  });
841
843
  }, []);
842
- j(() => x("watch/STATE", a), [a]);
843
- const u = U(async (y, m) => {
844
+ G(() => A("watch/STATE", a), [a]);
845
+ const u = M(async (y, m) => {
844
846
  await it(y, m);
845
- }, []), l = U(async (y, m) => {
847
+ }, []), l = M(async (y, m) => {
846
848
  await at(y, m);
847
849
  }, []), c = [];
848
850
  for (const y of e) {
849
- const [m, p] = y.split("/", 2), _ = (n[m] ?? []).find((z) => z.id === p), w = s.get(y), F = w != null && !de(w), b = w != null && w.errorCount > 0;
851
+ const [m, p] = y.split("/", 2), _ = (n[m] ?? []).find((K) => K.id === p), C = s.get(y), O = C != null && !de(C), b = C != null && C.errorCount > 0;
850
852
  c.push({
851
853
  pluginID: m,
852
854
  connectionID: p,
853
855
  name: (_ == null ? void 0 : _.name) ?? p,
854
856
  avatar: (_ == null ? void 0 : _.avatar) ?? "",
855
857
  isStarted: !0,
856
- sync: w,
857
- isSyncing: F,
858
+ sync: C,
859
+ isSyncing: O,
858
860
  hasErrors: b
859
861
  });
860
862
  }
@@ -870,63 +872,63 @@ function As() {
870
872
  connectedCount: c.length,
871
873
  syncingCount: d.length,
872
874
  errorCount: h.length,
873
- hasSyncing: bt(f),
874
- aggregateProgress: vt(f),
875
+ hasSyncing: Ct(f),
876
+ aggregateProgress: bt(f),
875
877
  disconnect: u,
876
878
  retryWatch: l
877
879
  };
878
880
  }
879
- function Hn(e, t) {
881
+ function Yn(e, t) {
880
882
  return window.go.data.Client.Get(e, t);
881
883
  }
882
- function Yn(e, t, n) {
884
+ function Jn(e, t, n) {
883
885
  return window.go.data.Client.Set(e, t, n);
884
886
  }
885
- function Ts(e, t, n) {
886
- const r = D(e), s = G(), o = [r, "data", t], i = P({
887
- queryKey: o,
887
+ function Ns(e, t, n) {
888
+ const r = D(e), s = j(), i = [r, "data", t], o = P({
889
+ queryKey: i,
888
890
  queryFn: async () => {
889
- const u = await Hn(r, t);
891
+ const u = await Yn(r, t);
890
892
  return u ?? n;
891
893
  }
892
894
  }), a = v({
893
895
  mutationFn: async (u) => {
894
- await Yn(r, t, u);
896
+ await Jn(r, t, u);
895
897
  },
896
898
  onMutate: async (u) => {
897
- await s.cancelQueries({ queryKey: o });
898
- const l = s.getQueryData(o);
899
- return s.setQueryData(o, u), { previous: l };
899
+ await s.cancelQueries({ queryKey: i });
900
+ const l = s.getQueryData(i);
901
+ return s.setQueryData(i, u), { previous: l };
900
902
  },
901
903
  onError: (u, l, c) => {
902
- (c == null ? void 0 : c.previous) !== void 0 && s.setQueryData(o, c.previous);
904
+ (c == null ? void 0 : c.previous) !== void 0 && s.setQueryData(i, c.previous);
903
905
  },
904
906
  onSettled: () => {
905
- s.invalidateQueries({ queryKey: o });
907
+ s.invalidateQueries({ queryKey: i });
906
908
  }
907
909
  });
908
910
  return {
909
- data: i.data ?? n,
911
+ data: o.data ?? n,
910
912
  update: async (u) => {
911
913
  await a.mutateAsync(u);
912
914
  },
913
- isLoading: i.isLoading
915
+ isLoading: o.isLoading
914
916
  };
915
917
  }
916
- const Ns = () => {
918
+ const xs = () => {
917
919
  const e = ne($n);
918
920
  if (!e) throw new Error("useRightDrawer must be used within a RightDrawerProvider");
919
921
  return e;
920
- }, Pt = () => {
922
+ }, Dt = () => {
921
923
  const e = ne(Ln);
922
924
  if (e === void 0)
923
925
  throw new Error("useBottomDrawer must be used within a BottomDrawerProvider");
924
926
  return e;
925
927
  }, ks = ({ pluginID: e }) => {
926
- const t = D(e), { showSnackbar: n } = L(), { createTab: r, updateTab: s } = Pt();
928
+ const t = D(e), { showSnackbar: n } = $(), { createTab: r, updateTab: s } = Dt();
927
929
  return {
928
930
  createSession: v({
929
- mutationFn: async ({ connectionID: i, icon: a, label: u, opts: l }) => {
931
+ mutationFn: async ({ connectionID: o, icon: a, label: u, opts: l }) => {
930
932
  const c = `pending-${crypto.randomUUID()}`;
931
933
  r({
932
934
  id: c,
@@ -936,31 +938,31 @@ const Ns = () => {
936
938
  properties: {
937
939
  status: "connecting",
938
940
  pluginID: t,
939
- connectionID: i,
941
+ connectionID: o,
940
942
  opts: { ...l }
941
943
  }
942
944
  });
943
- const g = xn.SessionOptions.createFrom({
945
+ const g = Tn.SessionOptions.createFrom({
944
946
  command: ["/bin/bash"],
945
947
  tty: !0,
946
948
  ...l
947
949
  });
948
950
  try {
949
- const f = await cn(t, i, g);
951
+ const f = await cn(t, o, g);
950
952
  s(
951
953
  { id: c },
952
954
  {
953
955
  id: f.id,
954
956
  title: u ?? `Session ${f.id.substring(0, 8)}`,
955
- properties: { status: "connected", pluginID: t, connectionID: i, opts: { ...l } }
957
+ properties: { status: "connected", pluginID: t, connectionID: o, opts: { ...l } }
956
958
  }
957
959
  );
958
960
  } catch (f) {
959
- const d = K(f);
961
+ const d = z(f);
960
962
  s(
961
963
  { id: c },
962
964
  {
963
- properties: { status: "error", error: d.detail, pluginID: t, connectionID: i, opts: { ...l } }
965
+ properties: { status: "error", error: d.detail, pluginID: t, connectionID: o, opts: { ...l } }
964
966
  }
965
967
  ), Z(n, f, "Failed to start session");
966
968
  }
@@ -968,9 +970,9 @@ const Ns = () => {
968
970
  }).mutateAsync
969
971
  };
970
972
  }, Ms = ({ pluginID: e }) => {
971
- const t = D(e), { showSnackbar: n } = L(), { createTab: r } = Pt(), s = v({
973
+ const t = D(e), { showSnackbar: n } = $(), { createTab: r } = Dt(), s = v({
972
974
  mutationFn: async ({
973
- connectionID: i,
975
+ connectionID: o,
974
976
  resourceKey: a,
975
977
  resourceID: u,
976
978
  resourceData: l,
@@ -981,11 +983,11 @@ const Ns = () => {
981
983
  tailLines: h = 1e3,
982
984
  params: y
983
985
  }) => {
984
- const m = Be.CreateSessionOptions.createFrom({
986
+ const m = He.CreateSessionOptions.createFrom({
985
987
  resource_key: a,
986
988
  resource_id: u,
987
989
  resource_data: l,
988
- options: Be.LogSessionOptions.createFrom({
990
+ options: He.LogSessionOptions.createFrom({
989
991
  target: f ?? "",
990
992
  follow: d,
991
993
  include_previous: !1,
@@ -996,7 +998,7 @@ const Ns = () => {
996
998
  include_source_events: !0,
997
999
  params: y ?? {}
998
1000
  })
999
- }), p = await un(t, i, m);
1001
+ }), p = await un(t, o, m);
1000
1002
  return r({
1001
1003
  id: p.id,
1002
1004
  title: g ?? `Logs ${p.id.substring(0, 8)}`,
@@ -1004,22 +1006,22 @@ const Ns = () => {
1004
1006
  icon: c ?? "LuLogs"
1005
1007
  }), p;
1006
1008
  },
1007
- onError: I(n, "Failed to start log session")
1008
- }), o = v({
1009
- mutationFn: async (i) => {
1010
- await ln(i);
1009
+ onError: F(n, "Failed to start log session")
1010
+ }), i = v({
1011
+ mutationFn: async (o) => {
1012
+ await ln(o);
1011
1013
  },
1012
- onError: I(n, "Failed to close log session")
1014
+ onError: F(n, "Failed to close log session")
1013
1015
  });
1014
1016
  return {
1015
1017
  createLogSession: s.mutateAsync,
1016
- closeLogSession: o.mutateAsync
1018
+ closeLogSession: i.mutateAsync
1017
1019
  };
1018
1020
  }, Ls = () => P({
1019
1021
  queryKey: ["metric", "providers"],
1020
1022
  queryFn: dn,
1021
1023
  staleTime: 3e4
1022
- }), Jn = (e) => P({
1024
+ }), Vn = (e) => P({
1023
1025
  queryKey: ["metric", "providers", e],
1024
1026
  queryFn: () => fn(e),
1025
1027
  enabled: !!e,
@@ -1031,8 +1033,8 @@ const Ns = () => {
1031
1033
  resourceKey: n,
1032
1034
  resourceID: r,
1033
1035
  resourceNamespace: s = "",
1034
- resourceData: o = {},
1035
- metricIDs: i = [],
1036
+ resourceData: i = {},
1037
+ metricIDs: o = [],
1036
1038
  shape: a = 0,
1037
1039
  // CURRENT
1038
1040
  timeRange: u,
@@ -1041,7 +1043,7 @@ const Ns = () => {
1041
1043
  } = e, {
1042
1044
  data: g,
1043
1045
  isLoading: f
1044
- } = Jn(n), d = g ?? [], h = u ? Math.max(
1046
+ } = Vn(n), d = g ?? [], h = u ? Math.max(
1045
1047
  Math.floor((u.end.getTime() - u.start.getTime()) / 250),
1046
1048
  15e3
1047
1049
  ) * 1e6 : 0, y = P({
@@ -1052,7 +1054,7 @@ const Ns = () => {
1052
1054
  n,
1053
1055
  r,
1054
1056
  s,
1055
- i,
1057
+ o,
1056
1058
  a,
1057
1059
  (m = u == null ? void 0 : u.start) == null ? void 0 : m.getTime(),
1058
1060
  (p = u == null ? void 0 : u.end) == null ? void 0 : p.getTime()
@@ -1062,8 +1064,8 @@ const Ns = () => {
1062
1064
  n,
1063
1065
  r,
1064
1066
  s,
1065
- o,
1066
1067
  i,
1068
+ o,
1067
1069
  a,
1068
1070
  (u == null ? void 0 : u.start) ?? /* @__PURE__ */ new Date(0),
1069
1071
  (u == null ? void 0 : u.end) ?? /* @__PURE__ */ new Date(0),
@@ -1089,87 +1091,87 @@ const Ns = () => {
1089
1091
  connectionID: n,
1090
1092
  resourceKey: r,
1091
1093
  resourceID: s,
1092
- resourceNamespace: o = "",
1093
- resourceData: i = {},
1094
+ resourceNamespace: i = "",
1095
+ resourceData: o = {},
1094
1096
  metricIDs: a = [],
1095
1097
  interval: u = 1e4,
1096
1098
  enabled: l = !0
1097
- } = e, c = D(t), [g, f] = q(null), [d, h] = q(null), [y, m] = q(!1), [p, E] = q(null), _ = $(null), w = U(async () => {
1099
+ } = e, c = D(t), [g, f] = q(null), [d, h] = q(null), [y, m] = q(!1), [p, S] = q(null), _ = U(null), C = M(async () => {
1098
1100
  if (!(!l || !c || !n || !r || !s))
1099
1101
  try {
1100
1102
  const b = await yn(c, n, {
1101
1103
  resource_key: r,
1102
1104
  resource_id: s,
1103
- resource_namespace: o,
1104
- resource_data: i,
1105
+ resource_namespace: i,
1106
+ resource_data: o,
1105
1107
  metric_ids: a,
1106
1108
  interval: u * 1e6
1107
1109
  // ms to nanoseconds for Go time.Duration
1108
1110
  });
1109
- h(b), m(!0), E(null);
1110
- const z = x(`core/metrics/data/${b}`, (se) => {
1111
+ h(b), m(!0), S(null);
1112
+ const K = A(`core/metrics/data/${b}`, (se) => {
1111
1113
  try {
1112
1114
  const Q = JSON.parse(se);
1113
1115
  Q.results && f(Q.results);
1114
1116
  } catch (Q) {
1115
1117
  console.error("Failed to parse metric stream data:", Q);
1116
1118
  }
1117
- }), we = x(`core/metrics/error/${b}`, (se) => {
1119
+ }), Ce = A(`core/metrics/error/${b}`, (se) => {
1118
1120
  try {
1119
1121
  const Q = JSON.parse(se);
1120
- E(Q.error || "Unknown error");
1122
+ S(Q.error || "Unknown error");
1121
1123
  } catch {
1122
- E("Failed to parse metric stream error");
1124
+ S("Failed to parse metric stream error");
1123
1125
  }
1124
1126
  });
1125
1127
  _.current = () => {
1126
- z(), we();
1128
+ K(), Ce();
1127
1129
  };
1128
1130
  } catch (b) {
1129
- E(b instanceof Error ? b.message : String(b));
1131
+ S(b instanceof Error ? b.message : String(b));
1130
1132
  }
1131
- }, [c, n, r, s, o, a, u, l]), F = U(async () => {
1133
+ }, [c, n, r, s, i, a, u, l]), O = M(async () => {
1132
1134
  if (d)
1133
1135
  try {
1134
- await We(d);
1136
+ await Be(d);
1135
1137
  } catch (b) {
1136
1138
  console.error("Failed to unsubscribe:", b);
1137
1139
  }
1138
1140
  _.current && (_.current(), _.current = null), h(null), m(!1);
1139
1141
  }, [d]);
1140
- return j(() => () => {
1141
- d && We(d).catch(console.error), _.current && _.current();
1142
+ return G(() => () => {
1143
+ d && Be(d).catch(console.error), _.current && _.current();
1142
1144
  }, [d]), {
1143
1145
  data: g,
1144
1146
  subscriptionID: d,
1145
1147
  isStreaming: y,
1146
1148
  error: p,
1147
- start: w,
1148
- stop: F
1149
+ start: C,
1150
+ stop: O
1149
1151
  };
1150
1152
  }, X = ["networker", "portforward", "all-sessions"];
1151
1153
  function qs() {
1152
- const { showSnackbar: e } = L(), t = G(), n = P({
1154
+ const { showSnackbar: e } = $(), t = j(), n = P({
1153
1155
  queryKey: [...X],
1154
- queryFn: async () => hn().catch((o) => {
1155
- if (K(o).detail.includes("not found")) return [];
1156
- throw o;
1156
+ queryFn: async () => hn().catch((i) => {
1157
+ if (z(i).detail.includes("not found")) return [];
1158
+ throw i;
1157
1159
  }),
1158
1160
  retry: !1
1159
1161
  });
1160
- j(() => {
1161
- const o = x("core/networker/portforward/created", () => {
1162
+ G(() => {
1163
+ const i = A("core/networker/portforward/created", () => {
1162
1164
  t.invalidateQueries({ queryKey: [...X] });
1163
- }), i = x("core/networker/portforward/closed", () => {
1165
+ }), o = A("core/networker/portforward/closed", () => {
1164
1166
  t.invalidateQueries({ queryKey: [...X] });
1165
1167
  });
1166
1168
  return () => {
1167
- o(), i();
1169
+ i(), o();
1168
1170
  };
1169
1171
  }, [t]);
1170
1172
  const r = n.data ?? [], s = v({
1171
- mutationFn: async (o) => ct(o),
1172
- onError: I(e, "Failed to close port forwarding session"),
1173
+ mutationFn: async (i) => ct(i),
1174
+ onError: F(e, "Failed to close port forwarding session"),
1173
1175
  onSuccess: async () => {
1174
1176
  await t.invalidateQueries({ queryKey: [...X] });
1175
1177
  }
@@ -1178,23 +1180,23 @@ function qs() {
1178
1180
  sessions: n,
1179
1181
  activeSessions: r,
1180
1182
  closeSession: s.mutateAsync,
1181
- openInBrowser: (o) => yt(`http://localhost:${o}`)
1183
+ openInBrowser: (i) => yt(`http://localhost:${i}`)
1182
1184
  };
1183
1185
  }
1184
- function js({ pluginID: e, connectionID: t, resourceID: n }) {
1185
- const r = D(e), s = ["networker", "portforward", "sessions", r, t, n], { showSnackbar: o } = L(), i = G(), a = P({
1186
+ function Gs({ pluginID: e, connectionID: t, resourceID: n }) {
1187
+ const r = D(e), s = ["networker", "portforward", "sessions", r, t, n], { showSnackbar: i } = $(), o = j(), a = P({
1186
1188
  queryKey: s,
1187
- queryFn: async () => gn(r, t, He.FindPortForwardSessionRequest.createFrom({
1189
+ queryFn: async () => gn(r, t, Ye.FindPortForwardSessionRequest.createFrom({
1188
1190
  resource_id: n,
1189
1191
  connection_id: t
1190
1192
  })).catch((c) => {
1191
- const g = K(c);
1192
- return g.detail.includes("not found") ? [] : (o({ message: "Failed to fetch port forward sessions", status: "error", details: g.detail }), []);
1193
+ const g = z(c);
1194
+ return g.detail.includes("not found") ? [] : (i({ message: "Failed to fetch port forward sessions", status: "error", details: g.detail }), []);
1193
1195
  }),
1194
1196
  retry: !1
1195
1197
  }), u = v({
1196
1198
  mutationFn: async ({ opts: c }) => {
1197
- const g = He.PortForwardSessionOptions.createFrom({
1199
+ const g = Ye.PortForwardSessionOptions.createFrom({
1198
1200
  local_port: c.localPort || 0,
1199
1201
  remote_port: c.remotePort,
1200
1202
  protocol: c.protocol || "TCP",
@@ -1211,20 +1213,20 @@ function js({ pluginID: e, connectionID: t, resourceID: n }) {
1211
1213
  }), f = await mn(r, t, g);
1212
1214
  return c.openInBrowser && yt(`http://localhost:${f.local_port}`), f;
1213
1215
  },
1214
- onError: I(o, "Failed to start port forwarding session"),
1216
+ onError: F(i, "Failed to start port forwarding session"),
1215
1217
  onSuccess: async () => {
1216
1218
  await Promise.all([
1217
- i.invalidateQueries({ queryKey: s }),
1218
- i.invalidateQueries({ queryKey: [...X] })
1219
+ o.invalidateQueries({ queryKey: s }),
1220
+ o.invalidateQueries({ queryKey: [...X] })
1219
1221
  ]);
1220
1222
  }
1221
1223
  }), l = v({
1222
1224
  mutationFn: async ({ opts: c }) => ct(c.sessionID),
1223
- onError: I(o, "Failed to close port forwarding session"),
1225
+ onError: F(i, "Failed to close port forwarding session"),
1224
1226
  onSuccess: async () => {
1225
1227
  await Promise.all([
1226
- i.invalidateQueries({ queryKey: s }),
1227
- i.invalidateQueries({ queryKey: [...X] })
1228
+ o.invalidateQueries({ queryKey: s }),
1229
+ o.invalidateQueries({ queryKey: [...X] })
1228
1230
  ]);
1229
1231
  }
1230
1232
  });
@@ -1234,37 +1236,37 @@ function js({ pluginID: e, connectionID: t, resourceID: n }) {
1234
1236
  close: l.mutateAsync
1235
1237
  };
1236
1238
  }
1237
- const Gs = () => {
1238
- const e = S.useContext(Un);
1239
+ const js = () => {
1240
+ const e = E.useContext(Un);
1239
1241
  if (!e) throw new Error("useConfirmationModal must be used within a ConfirmationModalProvider");
1240
1242
  return e;
1241
- }, Ks = ({
1243
+ }, zs = ({
1242
1244
  pluginID: e,
1243
1245
  connectionID: t,
1244
1246
  resourceKey: n,
1245
1247
  resourceID: r,
1246
1248
  namespace: s = ""
1247
1249
  }) => {
1248
- const o = D(e), i = G(), { showSnackbar: a } = L(), u = ["RESOURCE", o, t, n, r, s], { mutateAsync: l } = v({
1249
- mutationFn: async (f) => ut(o, t, n, A.ClientUpdateInput.createFrom({
1250
+ const i = D(e), o = j(), { showSnackbar: a } = $(), u = ["RESOURCE", i, t, n, r, s], { mutateAsync: l } = v({
1251
+ mutationFn: async (f) => ut(i, t, n, N.ClientUpdateInput.createFrom({
1250
1252
  input: f.input,
1251
1253
  id: r,
1252
1254
  namespace: s
1253
1255
  })),
1254
1256
  onSuccess: async () => {
1255
- a(`Resource ${r} updated`, "success"), await i.invalidateQueries({ queryKey: u });
1257
+ a(`Resource ${r} updated`, "success"), await o.invalidateQueries({ queryKey: u });
1256
1258
  },
1257
- onError: I(a, `Failed to update resource ${r}`)
1259
+ onError: F(a, `Failed to update resource ${r}`)
1258
1260
  }), { mutateAsync: c } = v({
1259
- mutationFn: async (f = {}) => lt(o, t, n, A.DeleteInput.createFrom({
1261
+ mutationFn: async (f = {}) => lt(i, t, n, N.DeleteInput.createFrom({
1260
1262
  id: r,
1261
1263
  namespace: s,
1262
1264
  gracePeriodSeconds: f.gracePeriodSeconds
1263
1265
  })),
1264
1266
  onSuccess: async () => {
1265
- a(`Resource ${r} deleted`, "success"), await i.invalidateQueries({ queryKey: u });
1267
+ a(`Resource ${r} deleted`, "success"), await o.invalidateQueries({ queryKey: u });
1266
1268
  },
1267
- onError: I(a, `Failed to delete resource ${r}`)
1269
+ onError: F(a, `Failed to delete resource ${r}`)
1268
1270
  });
1269
1271
  return {
1270
1272
  /**
@@ -1273,7 +1275,7 @@ const Gs = () => {
1273
1275
  */
1274
1276
  resource: P({
1275
1277
  queryKey: u,
1276
- queryFn: async () => _n(o, t, n, A.GetInput.createFrom({
1278
+ queryFn: async () => _n(i, t, n, N.GetInput.createFrom({
1277
1279
  id: r,
1278
1280
  namespace: s
1279
1281
  })),
@@ -1294,7 +1296,7 @@ const Gs = () => {
1294
1296
  */
1295
1297
  remove: c
1296
1298
  };
1297
- }, zs = (e) => {
1299
+ }, Ks = (e) => {
1298
1300
  const t = ["component", e.plugin, e.resource, e.area];
1299
1301
  return {
1300
1302
  /**
@@ -1303,7 +1305,7 @@ const Gs = () => {
1303
1305
  */
1304
1306
  component: P({
1305
1307
  queryKey: t,
1306
- queryFn: async () => En(e)
1308
+ queryFn: async () => Sn(e)
1307
1309
  })
1308
1310
  };
1309
1311
  }, Qs = ({ pluginID: e, connectionID: t }) => {
@@ -1314,7 +1316,7 @@ const Gs = () => {
1314
1316
  */
1315
1317
  groups: P({
1316
1318
  queryKey: [n, "resource_groups", "list"],
1317
- queryFn: async () => Sn(n, t),
1319
+ queryFn: async () => En(n, t),
1318
1320
  retry: !1
1319
1321
  })
1320
1322
  };
@@ -1323,15 +1325,15 @@ const Gs = () => {
1323
1325
  connectionID: t,
1324
1326
  searches: n
1325
1327
  }) => {
1326
- const r = D(e), s = (i) => [r, t, i.key, i.namespaces, "list"];
1328
+ const r = D(e), s = (o) => [r, t, o.key, o.namespaces, "list"];
1327
1329
  return An({
1328
- queries: n.map((i) => ({
1329
- queryKey: s(i),
1330
- queryFn: async () => dt(r, t, i.key, A.ListInput.createFrom({
1330
+ queries: n.map((o) => ({
1331
+ queryKey: s(o),
1332
+ queryFn: async () => dt(r, t, o.key, N.ListInput.createFrom({
1331
1333
  order: [{ field: "name", descending: !1 }],
1332
1334
  pagination: { page: 1, pageSize: 200 },
1333
- namespaces: i.namespaces
1334
- })).then((a) => (console.log(a.result), a.result && i.postFilter ? Object.values(a.result).filter(i.postFilter) : Object.values(a.result || {}))),
1335
+ namespaces: o.namespaces
1336
+ })).then((a) => (console.log(a.result), a.result && o.postFilter ? Object.values(a.result).filter(o.postFilter) : Object.values(a.result || {}))),
1335
1337
  retry: !1
1336
1338
  }))
1337
1339
  });
@@ -1343,7 +1345,7 @@ const Gs = () => {
1343
1345
  */
1344
1346
  resourceType: P({
1345
1347
  queryKey: [n, "resources", t],
1346
- queryFn: async () => Cn(n, t),
1348
+ queryFn: async () => wn(n, t),
1347
1349
  retry: !1
1348
1350
  })
1349
1351
  };
@@ -1355,12 +1357,12 @@ const Gs = () => {
1355
1357
  */
1356
1358
  types: P({
1357
1359
  queryKey: [n, "resources", "list"],
1358
- queryFn: async () => wn(n, t),
1360
+ queryFn: async () => Cn(n, t),
1359
1361
  retry: !1
1360
1362
  })
1361
1363
  };
1362
1364
  };
1363
- var Rt = Symbol.for("immer-nothing"), Ve = Symbol.for("immer-draftable"), T = Symbol.for("immer-state"), Vn = process.env.NODE_ENV !== "production" ? [
1365
+ var Pt = Symbol.for("immer-nothing"), Ve = Symbol.for("immer-draftable"), x = Symbol.for("immer-state"), Xn = process.env.NODE_ENV !== "production" ? [
1364
1366
  // All error codes, starting by 0:
1365
1367
  function(e) {
1366
1368
  return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
@@ -1391,9 +1393,9 @@ var Rt = Symbol.for("immer-nothing"), Ve = Symbol.for("immer-draftable"), T = Sy
1391
1393
  // Note: if more errors are added, the errorOffset in Patches.ts should be increased
1392
1394
  // See Patches.ts for additional errors
1393
1395
  ] : [];
1394
- function O(e, ...t) {
1396
+ function T(e, ...t) {
1395
1397
  if (process.env.NODE_ENV !== "production") {
1396
- const n = Vn[e], r = typeof n == "function" ? n.apply(null, t) : n;
1398
+ const n = Xn[e], r = typeof n == "function" ? n.apply(null, t) : n;
1397
1399
  throw new Error(`[Immer] ${r}`);
1398
1400
  }
1399
1401
  throw new Error(
@@ -1402,13 +1404,13 @@ function O(e, ...t) {
1402
1404
  }
1403
1405
  var ee = Object.getPrototypeOf;
1404
1406
  function te(e) {
1405
- return !!e && !!e[T];
1407
+ return !!e && !!e[x];
1406
1408
  }
1407
1409
  function B(e) {
1408
1410
  var t;
1409
1411
  return e ? It(e) || Array.isArray(e) || !!e[Ve] || !!((t = e.constructor) != null && t[Ve]) || me(e) || _e(e) : !1;
1410
1412
  }
1411
- var Xn = Object.prototype.constructor.toString();
1413
+ var Zn = Object.prototype.constructor.toString();
1412
1414
  function It(e) {
1413
1415
  if (!e || typeof e != "object")
1414
1416
  return !1;
@@ -1416,7 +1418,7 @@ function It(e) {
1416
1418
  if (t === null)
1417
1419
  return !0;
1418
1420
  const n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
1419
- return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Xn;
1421
+ return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Zn;
1420
1422
  }
1421
1423
  function fe(e, t) {
1422
1424
  ge(e) === 0 ? Reflect.ownKeys(e).forEach((n) => {
@@ -1424,17 +1426,17 @@ function fe(e, t) {
1424
1426
  }) : e.forEach((n, r) => t(r, n, e));
1425
1427
  }
1426
1428
  function ge(e) {
1427
- const t = e[T];
1429
+ const t = e[x];
1428
1430
  return t ? t.type_ : Array.isArray(e) ? 1 : me(e) ? 2 : _e(e) ? 3 : 0;
1429
1431
  }
1430
- function xe(e, t) {
1432
+ function Ae(e, t) {
1431
1433
  return ge(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
1432
1434
  }
1433
- function Ft(e, t, n) {
1435
+ function Rt(e, t, n) {
1434
1436
  const r = ge(e);
1435
1437
  r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
1436
1438
  }
1437
- function Zn(e, t) {
1439
+ function er(e, t) {
1438
1440
  return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
1439
1441
  }
1440
1442
  function me(e) {
@@ -1446,7 +1448,7 @@ function _e(e) {
1446
1448
  function W(e) {
1447
1449
  return e.copy_ || e.base_;
1448
1450
  }
1449
- function Ae(e, t) {
1451
+ function Ne(e, t) {
1450
1452
  if (me(e))
1451
1453
  return new Map(e);
1452
1454
  if (_e(e))
@@ -1456,16 +1458,16 @@ function Ae(e, t) {
1456
1458
  const n = It(e);
1457
1459
  if (t === !0 || t === "class_only" && !n) {
1458
1460
  const r = Object.getOwnPropertyDescriptors(e);
1459
- delete r[T];
1461
+ delete r[x];
1460
1462
  let s = Reflect.ownKeys(r);
1461
- for (let o = 0; o < s.length; o++) {
1462
- const i = s[o], a = r[i];
1463
- a.writable === !1 && (a.writable = !0, a.configurable = !0), (a.get || a.set) && (r[i] = {
1463
+ for (let i = 0; i < s.length; i++) {
1464
+ const o = s[i], a = r[o];
1465
+ a.writable === !1 && (a.writable = !0, a.configurable = !0), (a.get || a.set) && (r[o] = {
1464
1466
  configurable: !0,
1465
1467
  writable: !0,
1466
1468
  // could live with !!desc.set as well here...
1467
1469
  enumerable: a.enumerable,
1468
- value: e[i]
1470
+ value: e[o]
1469
1471
  });
1470
1472
  }
1471
1473
  return Object.create(ee(e), r);
@@ -1477,25 +1479,25 @@ function Ae(e, t) {
1477
1479
  return Object.assign(s, e);
1478
1480
  }
1479
1481
  }
1480
- function qe(e, t = !1) {
1481
- return Ee(e) || te(e) || !B(e) || (ge(e) > 1 && (e.set = e.add = e.clear = e.delete = er), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => qe(r, !0))), e;
1482
+ function Ge(e, t = !1) {
1483
+ return Se(e) || te(e) || !B(e) || (ge(e) > 1 && (e.set = e.add = e.clear = e.delete = tr), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => Ge(r, !0))), e;
1482
1484
  }
1483
- function er() {
1484
- O(2);
1485
+ function tr() {
1486
+ T(2);
1485
1487
  }
1486
- function Ee(e) {
1488
+ function Se(e) {
1487
1489
  return Object.isFrozen(e);
1488
1490
  }
1489
- var tr = {};
1491
+ var nr = {};
1490
1492
  function H(e) {
1491
- const t = tr[e];
1492
- return t || O(0, e), t;
1493
+ const t = nr[e];
1494
+ return t || T(0, e), t;
1493
1495
  }
1494
1496
  var oe;
1495
- function Ot() {
1497
+ function Ft() {
1496
1498
  return oe;
1497
1499
  }
1498
- function nr(e, t) {
1500
+ function rr(e, t) {
1499
1501
  return {
1500
1502
  drafts_: [],
1501
1503
  parent_: e,
@@ -1509,37 +1511,37 @@ function nr(e, t) {
1509
1511
  function Xe(e, t) {
1510
1512
  t && (H("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
1511
1513
  }
1512
- function Te(e) {
1513
- Ne(e), e.drafts_.forEach(rr), e.drafts_ = null;
1514
+ function xe(e) {
1515
+ ke(e), e.drafts_.forEach(sr), e.drafts_ = null;
1514
1516
  }
1515
- function Ne(e) {
1517
+ function ke(e) {
1516
1518
  e === oe && (oe = e.parent_);
1517
1519
  }
1518
1520
  function Ze(e) {
1519
- return oe = nr(oe, e);
1521
+ return oe = rr(oe, e);
1520
1522
  }
1521
- function rr(e) {
1522
- const t = e[T];
1523
+ function sr(e) {
1524
+ const t = e[x];
1523
1525
  t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
1524
1526
  }
1525
1527
  function et(e, t) {
1526
1528
  t.unfinalizedDrafts_ = t.drafts_.length;
1527
1529
  const n = t.drafts_[0];
1528
- return e !== void 0 && e !== n ? (n[T].modified_ && (Te(t), O(4)), B(e) && (e = pe(t, e), t.parent_ || ye(t, e)), t.patches_ && H("Patches").generateReplacementPatches_(
1529
- n[T].base_,
1530
+ return e !== void 0 && e !== n ? (n[x].modified_ && (xe(t), T(4)), B(e) && (e = pe(t, e), t.parent_ || ye(t, e)), t.patches_ && H("Patches").generateReplacementPatches_(
1531
+ n[x].base_,
1530
1532
  e,
1531
1533
  t.patches_,
1532
1534
  t.inversePatches_
1533
- )) : e = pe(t, n, []), Te(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Rt ? e : void 0;
1535
+ )) : e = pe(t, n, []), xe(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Pt ? e : void 0;
1534
1536
  }
1535
1537
  function pe(e, t, n) {
1536
- if (Ee(t))
1538
+ if (Se(t))
1537
1539
  return t;
1538
- const r = t[T];
1540
+ const r = t[x];
1539
1541
  if (!r)
1540
1542
  return fe(
1541
1543
  t,
1542
- (s, o) => tt(e, r, t, s, o, n)
1544
+ (s, i) => tt(e, r, t, s, i, n)
1543
1545
  ), t;
1544
1546
  if (r.scope_ !== e)
1545
1547
  return t;
@@ -1548,10 +1550,10 @@ function pe(e, t, n) {
1548
1550
  if (!r.finalized_) {
1549
1551
  r.finalized_ = !0, r.scope_.unfinalizedDrafts_--;
1550
1552
  const s = r.copy_;
1551
- let o = s, i = !1;
1552
- r.type_ === 3 && (o = new Set(s), s.clear(), i = !0), fe(
1553
- o,
1554
- (a, u) => tt(e, r, s, a, u, n, i)
1553
+ let i = s, o = !1;
1554
+ r.type_ === 3 && (i = new Set(s), s.clear(), o = !0), fe(
1555
+ i,
1556
+ (a, u) => tt(e, r, s, a, u, n, o)
1555
1557
  ), ye(e, s, !1), n && e.patches_ && H("Patches").generatePatches_(
1556
1558
  r,
1557
1559
  n,
@@ -1561,29 +1563,29 @@ function pe(e, t, n) {
1561
1563
  }
1562
1564
  return r.copy_;
1563
1565
  }
1564
- function tt(e, t, n, r, s, o, i) {
1565
- if (process.env.NODE_ENV !== "production" && s === n && O(5), te(s)) {
1566
- const a = o && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
1567
- !xe(t.assigned_, r) ? o.concat(r) : void 0, u = pe(e, s, a);
1568
- if (Ft(n, r, u), te(u))
1566
+ function tt(e, t, n, r, s, i, o) {
1567
+ if (process.env.NODE_ENV !== "production" && s === n && T(5), te(s)) {
1568
+ const a = i && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
1569
+ !Ae(t.assigned_, r) ? i.concat(r) : void 0, u = pe(e, s, a);
1570
+ if (Rt(n, r, u), te(u))
1569
1571
  e.canAutoFreeze_ = !1;
1570
1572
  else
1571
1573
  return;
1572
- } else i && n.add(s);
1573
- if (B(s) && !Ee(s)) {
1574
+ } else o && n.add(s);
1575
+ if (B(s) && !Se(s)) {
1574
1576
  if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
1575
1577
  return;
1576
1578
  pe(e, s), (!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && ye(e, s);
1577
1579
  }
1578
1580
  }
1579
1581
  function ye(e, t, n = !1) {
1580
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && qe(t, n);
1582
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && Ge(t, n);
1581
1583
  }
1582
- function sr(e, t) {
1584
+ function or(e, t) {
1583
1585
  const n = Array.isArray(e), r = {
1584
1586
  type_: n ? 1 : 0,
1585
1587
  // Track which produce call this is associated with.
1586
- scope_: t ? t.scope_ : Ot(),
1588
+ scope_: t ? t.scope_ : Ft(),
1587
1589
  // True for both shallow and deep changes.
1588
1590
  modified_: !1,
1589
1591
  // Used during finalization.
@@ -1603,20 +1605,20 @@ function sr(e, t) {
1603
1605
  revoke_: null,
1604
1606
  isManual_: !1
1605
1607
  };
1606
- let s = r, o = je;
1607
- n && (s = [r], o = ie);
1608
- const { revoke: i, proxy: a } = Proxy.revocable(s, o);
1609
- return r.draft_ = a, r.revoke_ = i, a;
1608
+ let s = r, i = je;
1609
+ n && (s = [r], i = ie);
1610
+ const { revoke: o, proxy: a } = Proxy.revocable(s, i);
1611
+ return r.draft_ = a, r.revoke_ = o, a;
1610
1612
  }
1611
1613
  var je = {
1612
1614
  get(e, t) {
1613
- if (t === T)
1615
+ if (t === x)
1614
1616
  return e;
1615
1617
  const n = W(e);
1616
- if (!xe(n, t))
1617
- return or(e, n, t);
1618
+ if (!Ae(n, t))
1619
+ return ir(e, n, t);
1618
1620
  const r = n[t];
1619
- return e.finalized_ || !B(r) ? r : r === De(e.base_, t) ? (Pe(e), e.copy_[t] = Me(r, e)) : r;
1621
+ return e.finalized_ || !B(r) ? r : r === Pe(e.base_, t) ? (Ie(e), e.copy_[t] = Le(r, e)) : r;
1620
1622
  },
1621
1623
  has(e, t) {
1622
1624
  return t in W(e);
@@ -1625,23 +1627,23 @@ var je = {
1625
1627
  return Reflect.ownKeys(W(e));
1626
1628
  },
1627
1629
  set(e, t, n) {
1628
- const r = xt(W(e), t);
1630
+ const r = Ot(W(e), t);
1629
1631
  if (r != null && r.set)
1630
1632
  return r.set.call(e.draft_, n), !0;
1631
1633
  if (!e.modified_) {
1632
- const s = De(W(e), t), o = s == null ? void 0 : s[T];
1633
- if (o && o.base_ === n)
1634
+ const s = Pe(W(e), t), i = s == null ? void 0 : s[x];
1635
+ if (i && i.base_ === n)
1634
1636
  return e.copy_[t] = n, e.assigned_[t] = !1, !0;
1635
- if (Zn(n, s) && (n !== void 0 || xe(e.base_, t)))
1637
+ if (er(n, s) && (n !== void 0 || Ae(e.base_, t)))
1636
1638
  return !0;
1637
- Pe(e), ke(e);
1639
+ Ie(e), Me(e);
1638
1640
  }
1639
1641
  return e.copy_[t] === n && // special case: handle new props with value 'undefined'
1640
1642
  (n !== void 0 || t in e.copy_) || // special case: NaN
1641
1643
  Number.isNaN(n) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = n, e.assigned_[t] = !0), !0;
1642
1644
  },
1643
1645
  deleteProperty(e, t) {
1644
- return De(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, Pe(e), ke(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
1646
+ return Pe(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, Ie(e), Me(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
1645
1647
  },
1646
1648
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
1647
1649
  // the same guarantee in ES5 mode.
@@ -1655,13 +1657,13 @@ var je = {
1655
1657
  };
1656
1658
  },
1657
1659
  defineProperty() {
1658
- O(11);
1660
+ T(11);
1659
1661
  },
1660
1662
  getPrototypeOf(e) {
1661
1663
  return ee(e.base_);
1662
1664
  },
1663
1665
  setPrototypeOf() {
1664
- O(12);
1666
+ T(12);
1665
1667
  }
1666
1668
  }, ie = {};
1667
1669
  fe(je, (e, t) => {
@@ -1670,25 +1672,25 @@ fe(je, (e, t) => {
1670
1672
  };
1671
1673
  });
1672
1674
  ie.deleteProperty = function(e, t) {
1673
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && O(13), ie.set.call(this, e, t, void 0);
1675
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && T(13), ie.set.call(this, e, t, void 0);
1674
1676
  };
1675
1677
  ie.set = function(e, t, n) {
1676
- return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && O(14), je.set.call(this, e[0], t, n, e[0]);
1678
+ return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && T(14), je.set.call(this, e[0], t, n, e[0]);
1677
1679
  };
1678
- function De(e, t) {
1679
- const n = e[T];
1680
+ function Pe(e, t) {
1681
+ const n = e[x];
1680
1682
  return (n ? W(n) : e)[t];
1681
1683
  }
1682
- function or(e, t, n) {
1684
+ function ir(e, t, n) {
1683
1685
  var s;
1684
- const r = xt(t, n);
1686
+ const r = Ot(t, n);
1685
1687
  return r ? "value" in r ? r.value : (
1686
1688
  // This is a very special case, if the prop is a getter defined by the
1687
1689
  // prototype, we should invoke it with the draft as context!
1688
1690
  (s = r.get) == null ? void 0 : s.call(e.draft_)
1689
1691
  ) : void 0;
1690
1692
  }
1691
- function xt(e, t) {
1693
+ function Ot(e, t) {
1692
1694
  if (!(t in e))
1693
1695
  return;
1694
1696
  let n = ee(e);
@@ -1699,62 +1701,62 @@ function xt(e, t) {
1699
1701
  n = ee(n);
1700
1702
  }
1701
1703
  }
1702
- function ke(e) {
1703
- e.modified_ || (e.modified_ = !0, e.parent_ && ke(e.parent_));
1704
+ function Me(e) {
1705
+ e.modified_ || (e.modified_ = !0, e.parent_ && Me(e.parent_));
1704
1706
  }
1705
- function Pe(e) {
1706
- e.copy_ || (e.copy_ = Ae(
1707
+ function Ie(e) {
1708
+ e.copy_ || (e.copy_ = Ne(
1707
1709
  e.base_,
1708
1710
  e.scope_.immer_.useStrictShallowCopy_
1709
1711
  ));
1710
1712
  }
1711
- var ir = class {
1713
+ var ar = class {
1712
1714
  constructor(e) {
1713
1715
  this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, n, r) => {
1714
1716
  if (typeof t == "function" && typeof n != "function") {
1715
- const o = n;
1717
+ const i = n;
1716
1718
  n = t;
1717
- const i = this;
1718
- return function(u = o, ...l) {
1719
- return i.produce(u, (c) => n.call(this, c, ...l));
1719
+ const o = this;
1720
+ return function(u = i, ...l) {
1721
+ return o.produce(u, (c) => n.call(this, c, ...l));
1720
1722
  };
1721
1723
  }
1722
- typeof n != "function" && O(6), r !== void 0 && typeof r != "function" && O(7);
1724
+ typeof n != "function" && T(6), r !== void 0 && typeof r != "function" && T(7);
1723
1725
  let s;
1724
1726
  if (B(t)) {
1725
- const o = Ze(this), i = Me(t, void 0);
1727
+ const i = Ze(this), o = Le(t, void 0);
1726
1728
  let a = !0;
1727
1729
  try {
1728
- s = n(i), a = !1;
1730
+ s = n(o), a = !1;
1729
1731
  } finally {
1730
- a ? Te(o) : Ne(o);
1732
+ a ? xe(i) : ke(i);
1731
1733
  }
1732
- return Xe(o, r), et(s, o);
1734
+ return Xe(i, r), et(s, i);
1733
1735
  } else if (!t || typeof t != "object") {
1734
- if (s = n(t), s === void 0 && (s = t), s === Rt && (s = void 0), this.autoFreeze_ && qe(s, !0), r) {
1735
- const o = [], i = [];
1736
- H("Patches").generateReplacementPatches_(t, s, o, i), r(o, i);
1736
+ if (s = n(t), s === void 0 && (s = t), s === Pt && (s = void 0), this.autoFreeze_ && Ge(s, !0), r) {
1737
+ const i = [], o = [];
1738
+ H("Patches").generateReplacementPatches_(t, s, i, o), r(i, o);
1737
1739
  }
1738
1740
  return s;
1739
1741
  } else
1740
- O(1, t);
1742
+ T(1, t);
1741
1743
  }, this.produceWithPatches = (t, n) => {
1742
1744
  if (typeof t == "function")
1743
- return (i, ...a) => this.produceWithPatches(i, (u) => t(u, ...a));
1745
+ return (o, ...a) => this.produceWithPatches(o, (u) => t(u, ...a));
1744
1746
  let r, s;
1745
- return [this.produce(t, n, (i, a) => {
1746
- r = i, s = a;
1747
+ return [this.produce(t, n, (o, a) => {
1748
+ r = o, s = a;
1747
1749
  }), r, s];
1748
1750
  }, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
1749
1751
  }
1750
1752
  createDraft(e) {
1751
- B(e) || O(8), te(e) && (e = ar(e));
1752
- const t = Ze(this), n = Me(e, void 0);
1753
- return n[T].isManual_ = !0, Ne(t), n;
1753
+ B(e) || T(8), te(e) && (e = cr(e));
1754
+ const t = Ze(this), n = Le(e, void 0);
1755
+ return n[x].isManual_ = !0, ke(t), n;
1754
1756
  }
1755
1757
  finishDraft(e, t) {
1756
- const n = e && e[T];
1757
- (!n || !n.isManual_) && O(9);
1758
+ const n = e && e[x];
1759
+ (!n || !n.isManual_) && T(9);
1758
1760
  const { scope_: r } = n;
1759
1761
  return Xe(r, t), et(void 0, r);
1760
1762
  }
@@ -1791,46 +1793,46 @@ var ir = class {
1791
1793
  );
1792
1794
  }
1793
1795
  };
1794
- function Me(e, t) {
1795
- const n = me(e) ? H("MapSet").proxyMap_(e, t) : _e(e) ? H("MapSet").proxySet_(e, t) : sr(e, t);
1796
- return (t ? t.scope_ : Ot()).drafts_.push(n), n;
1796
+ function Le(e, t) {
1797
+ const n = me(e) ? H("MapSet").proxyMap_(e, t) : _e(e) ? H("MapSet").proxySet_(e, t) : or(e, t);
1798
+ return (t ? t.scope_ : Ft()).drafts_.push(n), n;
1797
1799
  }
1798
- function ar(e) {
1799
- return te(e) || O(10, e), At(e);
1800
+ function cr(e) {
1801
+ return te(e) || T(10, e), Tt(e);
1800
1802
  }
1801
- function At(e) {
1802
- if (!B(e) || Ee(e))
1803
+ function Tt(e) {
1804
+ if (!B(e) || Se(e))
1803
1805
  return e;
1804
- const t = e[T];
1806
+ const t = e[x];
1805
1807
  let n;
1806
1808
  if (t) {
1807
1809
  if (!t.modified_)
1808
1810
  return t.base_;
1809
- t.finalized_ = !0, n = Ae(e, t.scope_.immer_.useStrictShallowCopy_);
1811
+ t.finalized_ = !0, n = Ne(e, t.scope_.immer_.useStrictShallowCopy_);
1810
1812
  } else
1811
- n = Ae(e, !0);
1813
+ n = Ne(e, !0);
1812
1814
  return fe(n, (r, s) => {
1813
- Ft(n, r, At(s));
1815
+ Rt(n, r, Tt(s));
1814
1816
  }), t && (t.finalized_ = !1), n;
1815
1817
  }
1816
- var N = new ir(), Tt = N.produce;
1817
- N.produceWithPatches.bind(
1818
- N
1818
+ var k = new ar(), At = k.produce;
1819
+ k.produceWithPatches.bind(
1820
+ k
1819
1821
  );
1820
- N.setAutoFreeze.bind(N);
1821
- N.setUseStrictShallowCopy.bind(N);
1822
- N.applyPatches.bind(N);
1823
- N.createDraft.bind(N);
1824
- N.finishDraft.bind(N);
1822
+ k.setAutoFreeze.bind(k);
1823
+ k.setUseStrictShallowCopy.bind(k);
1824
+ k.applyPatches.bind(k);
1825
+ k.createDraft.bind(k);
1826
+ k.finishDraft.bind(k);
1825
1827
  var le = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1826
- function cr(e) {
1828
+ function ur(e) {
1827
1829
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1828
1830
  }
1829
- var ur = "Expected a function", Nt = "__lodash_hash_undefined__", lr = "[object Function]", dr = "[object GeneratorFunction]", fr = "[object Symbol]", pr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, yr = /^\w*$/, hr = /^\./, gr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, mr = /[\\^$.*+?()[\]{}|]/g, _r = /\\(\\)?/g, Er = /^\[object .+?Constructor\]$/, Sr = typeof le == "object" && le && le.Object === Object && le, Cr = typeof self == "object" && self && self.Object === Object && self, Ge = Sr || Cr || Function("return this")();
1830
- function wr(e, t) {
1831
+ var lr = "Expected a function", Nt = "__lodash_hash_undefined__", dr = "[object Function]", fr = "[object GeneratorFunction]", pr = "[object Symbol]", yr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, hr = /^\w*$/, gr = /^\./, mr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _r = /[\\^$.*+?()[\]{}|]/g, Sr = /\\(\\)?/g, Er = /^\[object .+?Constructor\]$/, wr = typeof le == "object" && le && le.Object === Object && le, Cr = typeof self == "object" && self && self.Object === Object && self, ze = wr || Cr || Function("return this")();
1832
+ function br(e, t) {
1831
1833
  return e == null ? void 0 : e[t];
1832
1834
  }
1833
- function br(e) {
1835
+ function vr(e) {
1834
1836
  var t = !1;
1835
1837
  if (e != null && typeof e.toString != "function")
1836
1838
  try {
@@ -1839,12 +1841,12 @@ function br(e) {
1839
1841
  }
1840
1842
  return t;
1841
1843
  }
1842
- var vr = Array.prototype, Dr = Function.prototype, kt = Object.prototype, Re = Ge["__core-js_shared__"], nt = function() {
1844
+ var Dr = Array.prototype, Pr = Function.prototype, xt = Object.prototype, Re = ze["__core-js_shared__"], nt = function() {
1843
1845
  var e = /[^.]+$/.exec(Re && Re.keys && Re.keys.IE_PROTO || "");
1844
1846
  return e ? "Symbol(src)_1." + e : "";
1845
- }(), Mt = Dr.toString, Ke = kt.hasOwnProperty, Lt = kt.toString, Pr = RegExp(
1846
- "^" + Mt.call(Ke).replace(mr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1847
- ), rt = Ge.Symbol, Rr = vr.splice, Ir = $t(Ge, "Map"), ae = $t(Object, "create"), st = rt ? rt.prototype : void 0, ot = st ? st.toString : void 0;
1847
+ }(), kt = Pr.toString, Ke = xt.hasOwnProperty, Mt = xt.toString, Ir = RegExp(
1848
+ "^" + kt.call(Ke).replace(_r, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1849
+ ), rt = ze.Symbol, Rr = Dr.splice, Fr = Lt(ze, "Map"), ae = Lt(Object, "create"), st = rt ? rt.prototype : void 0, ot = st ? st.toString : void 0;
1848
1850
  function Y(e) {
1849
1851
  var t = -1, n = e ? e.length : 0;
1850
1852
  for (this.clear(); ++t < n; ) {
@@ -1852,13 +1854,13 @@ function Y(e) {
1852
1854
  this.set(r[0], r[1]);
1853
1855
  }
1854
1856
  }
1855
- function Fr() {
1857
+ function Or() {
1856
1858
  this.__data__ = ae ? ae(null) : {};
1857
1859
  }
1858
- function Or(e) {
1860
+ function Tr(e) {
1859
1861
  return this.has(e) && delete this.__data__[e];
1860
1862
  }
1861
- function xr(e) {
1863
+ function Ar(e) {
1862
1864
  var t = this.__data__;
1863
1865
  if (ae) {
1864
1866
  var n = t[e];
@@ -1866,19 +1868,19 @@ function xr(e) {
1866
1868
  }
1867
1869
  return Ke.call(t, e) ? t[e] : void 0;
1868
1870
  }
1869
- function Ar(e) {
1871
+ function Nr(e) {
1870
1872
  var t = this.__data__;
1871
1873
  return ae ? t[e] !== void 0 : Ke.call(t, e);
1872
1874
  }
1873
- function Tr(e, t) {
1875
+ function xr(e, t) {
1874
1876
  var n = this.__data__;
1875
1877
  return n[e] = ae && t === void 0 ? Nt : t, this;
1876
1878
  }
1877
- Y.prototype.clear = Fr;
1878
- Y.prototype.delete = Or;
1879
- Y.prototype.get = xr;
1880
- Y.prototype.has = Ar;
1881
- Y.prototype.set = Tr;
1879
+ Y.prototype.clear = Or;
1880
+ Y.prototype.delete = Tr;
1881
+ Y.prototype.get = Ar;
1882
+ Y.prototype.has = Nr;
1883
+ Y.prototype.set = xr;
1882
1884
  function re(e) {
1883
1885
  var t = -1, n = e ? e.length : 0;
1884
1886
  for (this.clear(); ++t < n; ) {
@@ -1886,32 +1888,32 @@ function re(e) {
1886
1888
  this.set(r[0], r[1]);
1887
1889
  }
1888
1890
  }
1889
- function Nr() {
1891
+ function kr() {
1890
1892
  this.__data__ = [];
1891
1893
  }
1892
- function kr(e) {
1893
- var t = this.__data__, n = Se(t, e);
1894
+ function Mr(e) {
1895
+ var t = this.__data__, n = Ee(t, e);
1894
1896
  if (n < 0)
1895
1897
  return !1;
1896
1898
  var r = t.length - 1;
1897
1899
  return n == r ? t.pop() : Rr.call(t, n, 1), !0;
1898
1900
  }
1899
- function Mr(e) {
1900
- var t = this.__data__, n = Se(t, e);
1901
+ function Lr(e) {
1902
+ var t = this.__data__, n = Ee(t, e);
1901
1903
  return n < 0 ? void 0 : t[n][1];
1902
1904
  }
1903
- function Lr(e) {
1904
- return Se(this.__data__, e) > -1;
1905
+ function $r(e) {
1906
+ return Ee(this.__data__, e) > -1;
1905
1907
  }
1906
- function $r(e, t) {
1907
- var n = this.__data__, r = Se(n, e);
1908
+ function Ur(e, t) {
1909
+ var n = this.__data__, r = Ee(n, e);
1908
1910
  return r < 0 ? n.push([e, t]) : n[r][1] = t, this;
1909
1911
  }
1910
- re.prototype.clear = Nr;
1911
- re.prototype.delete = kr;
1912
- re.prototype.get = Mr;
1913
- re.prototype.has = Lr;
1914
- re.prototype.set = $r;
1912
+ re.prototype.clear = kr;
1913
+ re.prototype.delete = Mr;
1914
+ re.prototype.get = Lr;
1915
+ re.prototype.has = $r;
1916
+ re.prototype.set = Ur;
1915
1917
  function J(e) {
1916
1918
  var t = -1, n = e ? e.length : 0;
1917
1919
  for (this.clear(); ++t < n; ) {
@@ -1919,97 +1921,97 @@ function J(e) {
1919
1921
  this.set(r[0], r[1]);
1920
1922
  }
1921
1923
  }
1922
- function Ur() {
1924
+ function qr() {
1923
1925
  this.__data__ = {
1924
1926
  hash: new Y(),
1925
- map: new (Ir || re)(),
1927
+ map: new (Fr || re)(),
1926
1928
  string: new Y()
1927
1929
  };
1928
1930
  }
1929
- function qr(e) {
1930
- return Ce(this, e).delete(e);
1931
+ function Gr(e) {
1932
+ return we(this, e).delete(e);
1931
1933
  }
1932
1934
  function jr(e) {
1933
- return Ce(this, e).get(e);
1935
+ return we(this, e).get(e);
1934
1936
  }
1935
- function Gr(e) {
1936
- return Ce(this, e).has(e);
1937
+ function zr(e) {
1938
+ return we(this, e).has(e);
1937
1939
  }
1938
1940
  function Kr(e, t) {
1939
- return Ce(this, e).set(e, t), this;
1941
+ return we(this, e).set(e, t), this;
1940
1942
  }
1941
- J.prototype.clear = Ur;
1942
- J.prototype.delete = qr;
1943
+ J.prototype.clear = qr;
1944
+ J.prototype.delete = Gr;
1943
1945
  J.prototype.get = jr;
1944
- J.prototype.has = Gr;
1946
+ J.prototype.has = zr;
1945
1947
  J.prototype.set = Kr;
1946
- function Se(e, t) {
1948
+ function Ee(e, t) {
1947
1949
  for (var n = e.length; n--; )
1948
- if (es(e[n][0], t))
1950
+ if (ts(e[n][0], t))
1949
1951
  return n;
1950
1952
  return -1;
1951
1953
  }
1952
- function zr(e, t) {
1953
- t = Hr(t, e) ? [t] : Br(t);
1954
+ function Qr(e, t) {
1955
+ t = Yr(t, e) ? [t] : Hr(t);
1954
1956
  for (var n = 0, r = t.length; e != null && n < r; )
1955
- e = e[Xr(t[n++])];
1957
+ e = e[Zr(t[n++])];
1956
1958
  return n && n == r ? e : void 0;
1957
1959
  }
1958
- function Qr(e) {
1959
- if (!qt(e) || Jr(e))
1960
+ function Wr(e) {
1961
+ if (!Ut(e) || Vr(e))
1960
1962
  return !1;
1961
- var t = ts(e) || br(e) ? Pr : Er;
1962
- return t.test(Zr(e));
1963
+ var t = ns(e) || vr(e) ? Ir : Er;
1964
+ return t.test(es(e));
1963
1965
  }
1964
- function Wr(e) {
1966
+ function Br(e) {
1965
1967
  if (typeof e == "string")
1966
1968
  return e;
1967
- if (Qe(e))
1969
+ if (We(e))
1968
1970
  return ot ? ot.call(e) : "";
1969
1971
  var t = e + "";
1970
1972
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
1971
1973
  }
1972
- function Br(e) {
1973
- return Ut(e) ? e : Vr(e);
1974
+ function Hr(e) {
1975
+ return $t(e) ? e : Xr(e);
1974
1976
  }
1975
- function Ce(e, t) {
1977
+ function we(e, t) {
1976
1978
  var n = e.__data__;
1977
- return Yr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
1979
+ return Jr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
1978
1980
  }
1979
- function $t(e, t) {
1980
- var n = wr(e, t);
1981
- return Qr(n) ? n : void 0;
1981
+ function Lt(e, t) {
1982
+ var n = br(e, t);
1983
+ return Wr(n) ? n : void 0;
1982
1984
  }
1983
- function Hr(e, t) {
1984
- if (Ut(e))
1985
+ function Yr(e, t) {
1986
+ if ($t(e))
1985
1987
  return !1;
1986
1988
  var n = typeof e;
1987
- return n == "number" || n == "symbol" || n == "boolean" || e == null || Qe(e) ? !0 : yr.test(e) || !pr.test(e) || t != null && e in Object(t);
1989
+ return n == "number" || n == "symbol" || n == "boolean" || e == null || We(e) ? !0 : hr.test(e) || !yr.test(e) || t != null && e in Object(t);
1988
1990
  }
1989
- function Yr(e) {
1991
+ function Jr(e) {
1990
1992
  var t = typeof e;
1991
1993
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
1992
1994
  }
1993
- function Jr(e) {
1995
+ function Vr(e) {
1994
1996
  return !!nt && nt in e;
1995
1997
  }
1996
- var Vr = ze(function(e) {
1997
- e = rs(e);
1998
+ var Xr = Qe(function(e) {
1999
+ e = ss(e);
1998
2000
  var t = [];
1999
- return hr.test(e) && t.push(""), e.replace(gr, function(n, r, s, o) {
2000
- t.push(s ? o.replace(_r, "$1") : r || n);
2001
+ return gr.test(e) && t.push(""), e.replace(mr, function(n, r, s, i) {
2002
+ t.push(s ? i.replace(Sr, "$1") : r || n);
2001
2003
  }), t;
2002
2004
  });
2003
- function Xr(e) {
2004
- if (typeof e == "string" || Qe(e))
2005
+ function Zr(e) {
2006
+ if (typeof e == "string" || We(e))
2005
2007
  return e;
2006
2008
  var t = e + "";
2007
2009
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
2008
2010
  }
2009
- function Zr(e) {
2011
+ function es(e) {
2010
2012
  if (e != null) {
2011
2013
  try {
2012
- return Mt.call(e);
2014
+ return kt.call(e);
2013
2015
  } catch {
2014
2016
  }
2015
2017
  try {
@@ -2019,82 +2021,82 @@ function Zr(e) {
2019
2021
  }
2020
2022
  return "";
2021
2023
  }
2022
- function ze(e, t) {
2024
+ function Qe(e, t) {
2023
2025
  if (typeof e != "function" || t && typeof t != "function")
2024
- throw new TypeError(ur);
2026
+ throw new TypeError(lr);
2025
2027
  var n = function() {
2026
- var r = arguments, s = t ? t.apply(this, r) : r[0], o = n.cache;
2027
- if (o.has(s))
2028
- return o.get(s);
2029
- var i = e.apply(this, r);
2030
- return n.cache = o.set(s, i), i;
2028
+ var r = arguments, s = t ? t.apply(this, r) : r[0], i = n.cache;
2029
+ if (i.has(s))
2030
+ return i.get(s);
2031
+ var o = e.apply(this, r);
2032
+ return n.cache = i.set(s, o), o;
2031
2033
  };
2032
- return n.cache = new (ze.Cache || J)(), n;
2034
+ return n.cache = new (Qe.Cache || J)(), n;
2033
2035
  }
2034
- ze.Cache = J;
2035
- function es(e, t) {
2036
+ Qe.Cache = J;
2037
+ function ts(e, t) {
2036
2038
  return e === t || e !== e && t !== t;
2037
2039
  }
2038
- var Ut = Array.isArray;
2039
- function ts(e) {
2040
- var t = qt(e) ? Lt.call(e) : "";
2041
- return t == lr || t == dr;
2040
+ var $t = Array.isArray;
2041
+ function ns(e) {
2042
+ var t = Ut(e) ? Mt.call(e) : "";
2043
+ return t == dr || t == fr;
2042
2044
  }
2043
- function qt(e) {
2045
+ function Ut(e) {
2044
2046
  var t = typeof e;
2045
2047
  return !!e && (t == "object" || t == "function");
2046
2048
  }
2047
- function ns(e) {
2049
+ function rs(e) {
2048
2050
  return !!e && typeof e == "object";
2049
2051
  }
2050
- function Qe(e) {
2051
- return typeof e == "symbol" || ns(e) && Lt.call(e) == fr;
2052
+ function We(e) {
2053
+ return typeof e == "symbol" || rs(e) && Mt.call(e) == pr;
2052
2054
  }
2053
- function rs(e) {
2054
- return e == null ? "" : Wr(e);
2055
+ function ss(e) {
2056
+ return e == null ? "" : Br(e);
2055
2057
  }
2056
- function ss(e, t, n) {
2057
- var r = e == null ? void 0 : zr(e, t);
2058
+ function os(e, t, n) {
2059
+ var r = e == null ? void 0 : Qr(e, t);
2058
2060
  return r === void 0 ? n : r;
2059
2061
  }
2060
- var os = ss;
2061
- const V = /* @__PURE__ */ cr(os);
2062
- function is(e, t, n) {
2063
- return Tt(e ?? { result: [], success: !0, totalCount: 0 }, (s) => {
2064
- for (const o of t)
2065
- switch (o.type) {
2062
+ var is = os;
2063
+ const V = /* @__PURE__ */ ur(is);
2064
+ function as(e, t, n) {
2065
+ return At(e ?? { result: [], success: !0, totalCount: 0 }, (s) => {
2066
+ for (const i of t)
2067
+ switch (i.type) {
2066
2068
  case "ADD": {
2067
2069
  s.result.findIndex(
2068
- (a) => V(o.payload.data, n) === V(a, n)
2069
- ) === -1 && s.result.push(o.payload.data);
2070
+ (a) => V(i.payload.data, n) === V(a, n)
2071
+ ) === -1 && s.result.push(i.payload.data);
2070
2072
  break;
2071
2073
  }
2072
2074
  case "UPDATE": {
2073
- const i = s.result.findIndex(
2074
- (a) => V(o.payload.data, n) === V(a, n)
2075
+ const o = s.result.findIndex(
2076
+ (a) => V(i.payload.data, n) === V(a, n)
2075
2077
  );
2076
- i !== -1 && (s.result[i] = o.payload.data);
2078
+ o !== -1 && (s.result[o] = i.payload.data);
2077
2079
  break;
2078
2080
  }
2079
2081
  case "DELETE": {
2080
- const i = s.result.findIndex(
2081
- (a) => V(o.payload.data, n) === V(a, n)
2082
+ const o = s.result.findIndex(
2083
+ (a) => V(i.payload.data, n) === V(a, n)
2082
2084
  );
2083
- i !== -1 && s.result.splice(i, 1);
2085
+ o !== -1 && s.result.splice(o, 1);
2084
2086
  break;
2085
2087
  }
2086
2088
  }
2087
2089
  });
2088
2090
  }
2089
- function as(e, t, n, r, s, o) {
2090
- const i = (o == null ? void 0 : o.syncWindowMs) ?? 500, a = $([]), u = $(null), l = $(null), c = $(s);
2091
+ function cs(e, t, n, r, s, i) {
2092
+ const o = (i == null ? void 0 : i.syncWindowMs) ?? 500, a = U([]), u = U(null), l = U(null), c = U(s);
2091
2093
  c.current = s;
2092
- const g = U(() => {
2094
+ const g = M(() => {
2093
2095
  const d = a.current;
2094
2096
  if (a.current = [], u.current = null, l.current = null, !(d.length === 0 || !r)) {
2095
2097
  e.setQueryData(
2096
2098
  t,
2097
- (h) => is(h, d, r)
2099
+ (h) => as(h, d, r)
2098
2100
  );
2099
2101
  for (const h of d)
2100
2102
  (h.type === "ADD" || h.type === "UPDATE") && e.setQueryData(
@@ -2102,13 +2104,13 @@ function as(e, t, n, r, s, o) {
2102
2104
  { result: h.payload.data }
2103
2105
  );
2104
2106
  }
2105
- }, [e, t, n, r]), f = U(
2107
+ }, [e, t, n, r]), f = M(
2106
2108
  (d) => {
2107
- a.current.push(d), !(u.current !== null || l.current !== null) && (c.current === 1 ? u.current = setTimeout(g, i) : l.current = requestAnimationFrame(g));
2109
+ a.current.push(d), !(u.current !== null || l.current !== null) && (c.current === 1 ? u.current = setTimeout(g, o) : l.current = requestAnimationFrame(g));
2108
2110
  },
2109
- [g, i]
2111
+ [g, o]
2110
2112
  );
2111
- return j(() => () => {
2113
+ return G(() => () => {
2112
2114
  u.current !== null && (clearTimeout(u.current), u.current = null), l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
2113
2115
  }, []), f;
2114
2116
  }
@@ -2119,63 +2121,63 @@ const Ys = ({
2119
2121
  idAccessor: r,
2120
2122
  namespaces: s
2121
2123
  }) => {
2122
- const o = D(e), i = G(), { showSnackbar: a } = L(), u = S.useMemo(() => s ?? [], [s]), l = S.useMemo(
2123
- () => [o, t, n, u, "list"],
2124
- [o, t, n, u]
2125
- ), c = S.useCallback(
2126
- (m, p) => [o, t, n, p, m],
2127
- [o, t, n]
2124
+ const i = D(e), o = j(), { showSnackbar: a } = $(), u = E.useMemo(() => s ?? [], [s]), l = E.useMemo(
2125
+ () => [i, t, n, u, "list"],
2126
+ [i, t, n, u]
2127
+ ), c = E.useCallback(
2128
+ (m, p) => [i, t, n, p, m],
2129
+ [i, t, n]
2128
2130
  ), { mutateAsync: g } = v({
2129
- mutationFn: async (m) => ft(o, t, n, A.ClientCreateInput.createFrom({
2131
+ mutationFn: async (m) => ft(i, t, n, N.ClientCreateInput.createFrom({
2130
2132
  input: m.input,
2131
2133
  namespace: m.namespace ?? (u.length === 1 ? u[0] : "")
2132
2134
  })),
2133
2135
  onSuccess: async (m) => {
2134
- var w;
2136
+ var C;
2135
2137
  const p = m.result;
2136
- let E = "";
2137
- (w = p == null ? void 0 : p.metadata) != null && w.name ? E = p.metadata.name : p != null && p.id ? E = p.id : p != null && p.name ? E = p.name : p != null && p.ID ? E = p.ID : p != null && p.Name && (E = p.Name);
2138
- const _ = E ? `Resource ${E} created` : "Resource created";
2139
- a(_, "success"), await i.invalidateQueries({ queryKey: l });
2138
+ let S = "";
2139
+ (C = p == null ? void 0 : p.metadata) != null && C.name ? S = p.metadata.name : p != null && p.id ? S = p.id : p != null && p.name ? S = p.name : p != null && p.ID ? S = p.ID : p != null && p.Name && (S = p.Name);
2140
+ const _ = S ? `Resource ${S} created` : "Resource created";
2141
+ a(_, "success"), await o.invalidateQueries({ queryKey: l });
2140
2142
  },
2141
- onError: I(a, "Failed to create resource")
2143
+ onError: F(a, "Failed to create resource")
2142
2144
  }), f = P({
2143
2145
  queryKey: l,
2144
- queryFn: async () => dt(o, t, n, A.ListInput.createFrom({
2146
+ queryFn: async () => dt(i, t, n, N.ListInput.createFrom({
2145
2147
  order: [{ field: "name", descending: !1 }],
2146
2148
  pagination: { page: 1, pageSize: 200 },
2147
2149
  namespaces: u
2148
2150
  })),
2149
2151
  placeholderData: (m, p) => m,
2150
2152
  retry: !1
2151
- }), [d, h] = S.useState(
2152
- C.IDLE
2153
+ }), [d, h] = E.useState(
2154
+ w.IDLE
2153
2155
  );
2154
- S.useEffect(() => x(
2155
- `${o}/${t}/watch/STATE`,
2156
+ E.useEffect(() => A(
2157
+ `${i}/${t}/watch/STATE`,
2156
2158
  (p) => {
2157
2159
  p.resourceKey === n && h(p.state);
2158
2160
  }
2159
- ), [o, t, n]);
2160
- const y = as(i, l, c, r, d);
2161
- return S.useEffect(() => {
2161
+ ), [i, t, n]);
2162
+ const y = cs(o, l, c, r, d);
2163
+ return E.useEffect(() => {
2162
2164
  if (!r)
2163
2165
  return;
2164
- bn(o, t, n);
2165
- const m = x(
2166
- `${o}/${t}/${n}/ADD`,
2166
+ bn(i, t, n);
2167
+ const m = A(
2168
+ `${i}/${t}/${n}/ADD`,
2167
2169
  (_) => y({ type: "ADD", payload: _ })
2168
- ), p = x(
2169
- `${o}/${t}/${n}/UPDATE`,
2170
+ ), p = A(
2171
+ `${i}/${t}/${n}/UPDATE`,
2170
2172
  (_) => y({ type: "UPDATE", payload: _ })
2171
- ), E = x(
2172
- `${o}/${t}/${n}/DELETE`,
2173
+ ), S = A(
2174
+ `${i}/${t}/${n}/DELETE`,
2173
2175
  (_) => y({ type: "DELETE", payload: _ })
2174
2176
  );
2175
2177
  return () => {
2176
- m(), p(), E(), vn(o, t, n);
2178
+ m(), p(), S(), vn(i, t, n);
2177
2179
  };
2178
- }, [o, t, n, y]), {
2180
+ }, [i, t, n, y]), {
2179
2181
  /**
2180
2182
  * Fetch result for the resource. The client will automatically cache the result, and update the cache
2181
2183
  * when the resources are updated or deleted via the returned create and remove mutation functions, or
@@ -2192,68 +2194,68 @@ const Ys = ({
2192
2194
  /** Current watch state for this resource type */
2193
2195
  watchState: d,
2194
2196
  /** Whether the watch is currently syncing */
2195
- isSyncing: d === C.SYNCING,
2197
+ isSyncing: d === w.SYNCING,
2196
2198
  /** Whether the watch has fully synced */
2197
- isSynced: d === C.SYNCED,
2199
+ isSynced: d === w.SYNCED,
2198
2200
  /** Whether the watch encountered an error */
2199
- watchError: d === C.ERROR
2201
+ watchError: d === w.ERROR
2200
2202
  };
2201
2203
  }, Js = ({ pluginID: e }) => {
2202
- const t = D(e), { showSnackbar: n } = L(), r = v({
2203
- mutationFn: async ({ opts: i, input: a }) => ft(
2204
+ const t = D(e), { showSnackbar: n } = $(), r = v({
2205
+ mutationFn: async ({ opts: o, input: a }) => ft(
2204
2206
  t,
2205
- i.connectionID,
2206
- i.resourceKey,
2207
- A.ClientCreateInput.createFrom({
2207
+ o.connectionID,
2208
+ o.resourceKey,
2209
+ N.ClientCreateInput.createFrom({
2208
2210
  input: a.input,
2209
- namespace: a.namespace ?? i.namespace ?? ""
2211
+ namespace: a.namespace ?? o.namespace ?? ""
2210
2212
  })
2211
2213
  ),
2212
- onSuccess: (i, { opts: a }) => {
2214
+ onSuccess: (o, { opts: a }) => {
2213
2215
  n(`Resource ${a.resourceID} created`, "success");
2214
2216
  },
2215
- onError(i, { opts: a }) {
2216
- Z(n, i, `Failed to create resource ${a.resourceID}`);
2217
+ onError(o, { opts: a }) {
2218
+ Z(n, o, `Failed to create resource ${a.resourceID}`);
2217
2219
  }
2218
2220
  }), s = v({
2219
- mutationFn: async ({ opts: i, input: a }) => ut(
2221
+ mutationFn: async ({ opts: o, input: a }) => ut(
2220
2222
  t,
2221
- i.connectionID,
2222
- i.resourceKey,
2223
- A.ClientUpdateInput.createFrom({
2223
+ o.connectionID,
2224
+ o.resourceKey,
2225
+ N.ClientUpdateInput.createFrom({
2224
2226
  input: a.input,
2225
- id: i.resourceID,
2226
- namespace: i.namespace ?? ""
2227
+ id: o.resourceID,
2228
+ namespace: o.namespace ?? ""
2227
2229
  })
2228
2230
  ),
2229
- onSuccess: (i, { opts: a }) => {
2231
+ onSuccess: (o, { opts: a }) => {
2230
2232
  n(`Resource ${a.resourceID} updated`, "success");
2231
2233
  },
2232
- onError(i, { opts: a }) {
2233
- Z(n, i, `Failed to update resource ${a.resourceID}`);
2234
+ onError(o, { opts: a }) {
2235
+ Z(n, o, `Failed to update resource ${a.resourceID}`);
2234
2236
  }
2235
- }), o = v({
2236
- mutationFn: async ({ opts: i, input: a }) => lt(
2237
+ }), i = v({
2238
+ mutationFn: async ({ opts: o, input: a }) => lt(
2237
2239
  t,
2238
- i.connectionID,
2239
- i.resourceKey,
2240
- A.DeleteInput.createFrom({
2241
- id: i.resourceID,
2242
- namespace: i.namespace ?? "",
2240
+ o.connectionID,
2241
+ o.resourceKey,
2242
+ N.DeleteInput.createFrom({
2243
+ id: o.resourceID,
2244
+ namespace: o.namespace ?? "",
2243
2245
  gracePeriodSeconds: a.gracePeriodSeconds
2244
2246
  })
2245
2247
  ),
2246
- onSuccess: (i, { opts: a }) => {
2248
+ onSuccess: (o, { opts: a }) => {
2247
2249
  n(`Resource ${a.resourceID} deleted`, "success");
2248
2250
  },
2249
- onError(i, { opts: a }) {
2250
- Z(n, i, `Failed to delete resource ${a.resourceID}`);
2251
+ onError(o, { opts: a }) {
2252
+ Z(n, o, `Failed to delete resource ${a.resourceID}`);
2251
2253
  }
2252
2254
  });
2253
2255
  return {
2254
2256
  create: r.mutateAsync,
2255
2257
  update: s.mutateAsync,
2256
- remove: o.mutateAsync
2258
+ remove: i.mutateAsync
2257
2259
  };
2258
2260
  }, Vs = ({
2259
2261
  pluginID: e,
@@ -2261,7 +2263,7 @@ const Ys = ({
2261
2263
  resourceKey: n,
2262
2264
  enabled: r = !0
2263
2265
  }) => {
2264
- const s = D(e), o = P({
2266
+ const s = D(e), i = P({
2265
2267
  queryKey: ["RESOURCE_ACTIONS", s, t, n],
2266
2268
  queryFn: () => Dn(s, t, n),
2267
2269
  enabled: r && !!s && !!t && !!n,
@@ -2269,36 +2271,36 @@ const Ys = ({
2269
2271
  // actions don't change often
2270
2272
  });
2271
2273
  return {
2272
- actions: o.data ?? [],
2273
- isLoading: o.isLoading,
2274
- error: o.error
2274
+ actions: i.data ?? [],
2275
+ isLoading: i.isLoading,
2276
+ error: i.error
2275
2277
  };
2276
2278
  }, Xs = ({
2277
2279
  pluginID: e,
2278
2280
  connectionID: t,
2279
2281
  resourceKey: n
2280
2282
  }) => {
2281
- const r = D(e), s = G(), { showSnackbar: o } = L(), i = v({
2283
+ const r = D(e), s = j(), { showSnackbar: i } = $(), o = v({
2282
2284
  mutationFn: async ({ actionID: a, id: u = "", namespace: l = "", params: c = {} }) => Pn(
2283
2285
  r,
2284
2286
  t,
2285
2287
  n,
2286
2288
  a,
2287
- A.ActionInput.createFrom({ id: u, namespace: l, params: c })
2289
+ N.ActionInput.createFrom({ id: u, namespace: l, params: c })
2288
2290
  ),
2289
2291
  onSuccess: (a) => {
2290
- a.message && o(a.message, "success"), s.invalidateQueries({
2292
+ a.message && i(a.message, "success"), s.invalidateQueries({
2291
2293
  queryKey: ["RESOURCES", r, t, n]
2292
2294
  });
2293
2295
  },
2294
2296
  onError: (a, u) => {
2295
- Z(o, a, `Failed to execute action "${u.actionID}"`);
2297
+ Z(i, a, `Failed to execute action "${u.actionID}"`);
2296
2298
  }
2297
2299
  });
2298
2300
  return {
2299
- executeAction: i.mutateAsync,
2300
- isExecuting: i.isPending,
2301
- error: i.error
2301
+ executeAction: o.mutateAsync,
2302
+ isExecuting: o.isPending,
2303
+ error: o.error
2302
2304
  };
2303
2305
  }, Zs = ({
2304
2306
  pluginID: e,
@@ -2307,7 +2309,7 @@ const Ys = ({
2307
2309
  }) => {
2308
2310
  const r = D(e), s = P({
2309
2311
  queryKey: ["EDITOR_SCHEMAS", r, t],
2310
- queryFn: () => Rn(r, t),
2312
+ queryFn: () => In(r, t),
2311
2313
  enabled: n && !!r && !!t,
2312
2314
  staleTime: 10 * 60 * 1e3,
2313
2315
  // schemas are fairly stable per connection
@@ -2324,24 +2326,24 @@ const Ys = ({
2324
2326
  connectionID: t,
2325
2327
  enabled: n = !0
2326
2328
  }) => {
2327
- const r = D(e), s = G(), o = [r, t, "watch-state"], i = $([]), a = $(!1), u = U((f) => {
2328
- s.setQueryData(o, (d) => d && Tt(d, (h) => {
2329
+ const r = D(e), s = j(), i = [r, t, "watch-state"], o = U([]), a = U(!1), u = M((f) => {
2330
+ s.setQueryData(i, (d) => d && At(d, (h) => {
2329
2331
  h.resources[f.resourceKey] = f.state, h.resourceCounts[f.resourceKey] = f.resourceCount;
2330
2332
  let y = 0, m = 0;
2331
2333
  for (const p of Object.values(h.resources))
2332
- p === C.SYNCED && y++, (p === C.ERROR || p === C.FAILED) && m++;
2334
+ p === w.SYNCED && y++, (p === w.ERROR || p === w.FAILED) && m++;
2333
2335
  h.syncedCount = y, h.errorCount = m;
2334
2336
  }));
2335
2337
  }, [s, r, t]), l = P({
2336
- queryKey: o,
2338
+ queryKey: i,
2337
2339
  queryFn: async () => {
2338
- const f = await In(r, t), d = {};
2340
+ const f = await Rn(r, t), d = {};
2339
2341
  let h = 0, y = 0;
2340
- for (const [p, E] of Object.entries(f.resources ?? {}))
2341
- d[p] = E, E === C.SYNCED && h++, E === C.ERROR && y++;
2342
+ for (const [p, S] of Object.entries(f.resources ?? {}))
2343
+ d[p] = S, S === w.SYNCED && h++, S === w.ERROR && y++;
2342
2344
  const m = {};
2343
- for (const [p, E] of Object.entries(f.resourceCounts ?? {}))
2344
- m[p] = E;
2345
+ for (const [p, S] of Object.entries(f.resourceCounts ?? {}))
2346
+ m[p] = S;
2345
2347
  return {
2346
2348
  connection: f.connectionId,
2347
2349
  resources: d,
@@ -2357,36 +2359,36 @@ const Ys = ({
2357
2359
  if (!d || d.totalResources === 0) return 3e3;
2358
2360
  let h = 0;
2359
2361
  for (const y of Object.values(d.resources))
2360
- (y === C.SYNCED || y === C.ERROR || y === C.STOPPED || y === C.FAILED || y === C.FORBIDDEN || y === C.SKIPPED) && h++;
2362
+ (y === w.SYNCED || y === w.ERROR || y === w.STOPPED || y === w.FAILED || y === w.FORBIDDEN || y === w.SKIPPED) && h++;
2361
2363
  return h >= d.totalResources ? !1 : 3e3;
2362
2364
  }
2363
2365
  });
2364
- j(() => {
2366
+ G(() => {
2365
2367
  if (!l.data || a.current) return;
2366
2368
  a.current = !0;
2367
- const f = i.current;
2368
- i.current = [];
2369
+ const f = o.current;
2370
+ o.current = [];
2369
2371
  for (const d of f)
2370
2372
  u(d);
2371
- }, [l.data, u]), j(() => {
2373
+ }, [l.data, u]), G(() => {
2372
2374
  if (!n || !r || !t)
2373
2375
  return;
2374
- a.current = !1, i.current = [];
2375
- const f = x(
2376
+ a.current = !1, o.current = [];
2377
+ const f = A(
2376
2378
  `${r}/${t}/watch/STATE`,
2377
2379
  (d) => {
2378
- a.current ? u(d) : i.current.push(d);
2380
+ a.current ? u(d) : o.current.push(d);
2379
2381
  }
2380
2382
  );
2381
2383
  return () => {
2382
- f(), a.current = !1, i.current = [];
2384
+ f(), a.current = !1, o.current = [];
2383
2385
  };
2384
2386
  }, [r, t, n, u]);
2385
2387
  const c = l.data;
2386
2388
  let g = 0;
2387
2389
  if (c != null && c.resources)
2388
2390
  for (const f of Object.values(c.resources))
2389
- (f === C.SYNCED || f === C.ERROR || f === C.STOPPED || f === C.FAILED || f === C.FORBIDDEN || f === C.SKIPPED) && g++;
2391
+ (f === w.SYNCED || f === w.ERROR || f === w.STOPPED || f === w.FAILED || f === w.FORBIDDEN || f === w.SKIPPED) && g++;
2390
2392
  return {
2391
2393
  /** Full summary query result */
2392
2394
  summary: l,
@@ -2400,8 +2402,8 @@ const Ys = ({
2400
2402
  errorCount: (c == null ? void 0 : c.errorCount) ?? 0
2401
2403
  };
2402
2404
  }, to = () => {
2403
- const [e, t] = q(/* @__PURE__ */ new Map()), n = $(/* @__PURE__ */ new Map()), r = $(/* @__PURE__ */ new Map()), s = U((l) => {
2404
- const c = Ue(l), g = Dt(n.current, l), f = Oe(g);
2405
+ const [e, t] = q(/* @__PURE__ */ new Map()), n = U(/* @__PURE__ */ new Map()), r = U(/* @__PURE__ */ new Map()), s = M((l) => {
2406
+ const c = qe(l), g = vt(n.current, l), f = Te(g);
2405
2407
  if (t((d) => {
2406
2408
  const h = new Map(d);
2407
2409
  return h.set(c, f), h;
@@ -2415,27 +2417,27 @@ const Ys = ({
2415
2417
  r.current.set(c, d);
2416
2418
  }
2417
2419
  }, []);
2418
- j(() => {
2419
- const l = x("watch/STATE", s);
2420
+ G(() => {
2421
+ const l = A("watch/STATE", s);
2420
2422
  return () => {
2421
2423
  l();
2422
2424
  for (const c of r.current.values())
2423
2425
  clearTimeout(c);
2424
2426
  };
2425
2427
  }, [s]);
2426
- const o = Array.from(e.values()), i = bt(o), a = o.find((l) => !de(l)) ?? o[0] ?? null, u = vt(o);
2428
+ const i = Array.from(e.values()), o = Ct(i), a = i.find((l) => !de(l)) ?? i[0] ?? null, u = bt(i);
2427
2429
  return {
2428
2430
  /** All tracked syncs */
2429
- syncs: o,
2431
+ syncs: i,
2430
2432
  /** Whether any connection is actively syncing */
2431
- hasSyncing: i,
2433
+ hasSyncing: o,
2432
2434
  /** The primary (first incomplete) sync or most recent */
2433
2435
  primarySync: a,
2434
2436
  /** Aggregate progress across all connections (0-1) */
2435
2437
  aggregateProgress: u
2436
2438
  };
2437
- }, cs = () => {
2438
- const e = S.useContext(_t);
2439
+ }, us = () => {
2440
+ const e = E.useContext(_t);
2439
2441
  if (!e) throw new Error("useOperations must be used within an OperationsProvider");
2440
2442
  return e;
2441
2443
  }, no = ({
@@ -2443,10 +2445,10 @@ const Ys = ({
2443
2445
  connectionID: t,
2444
2446
  resourceKey: n
2445
2447
  }) => {
2446
- const r = D(e), { showSnackbar: s } = L(), { addOperation: o, updateOperation: i } = cs(), a = S.useRef([]);
2447
- return S.useEffect(() => () => {
2448
+ const r = D(e), { showSnackbar: s } = $(), { addOperation: i, updateOperation: o } = us(), a = E.useRef([]);
2449
+ return E.useEffect(() => () => {
2448
2450
  a.current.forEach((l) => l());
2449
- }, []), { startStreamAction: S.useCallback(
2451
+ }, []), { startStreamAction: E.useCallback(
2450
2452
  async ({ actionID: l, id: c, namespace: g, label: f, params: d = {} }) => {
2451
2453
  try {
2452
2454
  const h = await Fn(
@@ -2454,9 +2456,9 @@ const Ys = ({
2454
2456
  t,
2455
2457
  n,
2456
2458
  l,
2457
- A.ActionInput.createFrom({ id: c, namespace: g, params: d })
2459
+ N.ActionInput.createFrom({ id: c, namespace: g, params: d })
2458
2460
  );
2459
- o({
2461
+ i({
2460
2462
  id: h,
2461
2463
  label: f,
2462
2464
  resourceKey: n,
@@ -2466,30 +2468,30 @@ const Ys = ({
2466
2468
  status: "running",
2467
2469
  startedAt: Date.now()
2468
2470
  });
2469
- const y = `action/stream/${h}`, m = x(y, (p) => {
2470
- var E, _, w, F;
2471
+ const y = `action/stream/${h}`, m = A(y, (p) => {
2472
+ var S, _, C, O;
2471
2473
  switch (p.type) {
2472
2474
  case "progress": {
2473
2475
  const b = p.data ?? {};
2474
- i(h, {
2476
+ o(h, {
2475
2477
  message: b.message,
2476
2478
  progress: b.ready !== void 0 && b.desired !== void 0 ? { ready: b.ready, desired: b.desired } : void 0
2477
2479
  });
2478
2480
  break;
2479
2481
  }
2480
2482
  case "complete":
2481
- i(h, {
2483
+ o(h, {
2482
2484
  status: "completed",
2483
- message: ((E = p.data) == null ? void 0 : E.message) ?? "Completed",
2485
+ message: ((S = p.data) == null ? void 0 : S.message) ?? "Completed",
2484
2486
  completedAt: Date.now()
2485
2487
  }), s(((_ = p.data) == null ? void 0 : _.message) ?? f + " completed", "success"), be(y);
2486
2488
  break;
2487
2489
  case "error":
2488
- i(h, {
2490
+ o(h, {
2489
2491
  status: "error",
2490
- message: ((w = p.data) == null ? void 0 : w.message) ?? "Failed",
2492
+ message: ((C = p.data) == null ? void 0 : C.message) ?? "Failed",
2491
2493
  completedAt: Date.now()
2492
- }), s(((F = p.data) == null ? void 0 : F.message) ?? f + " failed", "error"), be(y);
2494
+ }), s(((O = p.data) == null ? void 0 : O.message) ?? f + " failed", "error"), be(y);
2493
2495
  break;
2494
2496
  }
2495
2497
  });
@@ -2500,41 +2502,41 @@ const Ys = ({
2500
2502
  throw Z(s, h, `Failed to start "${l}"`), h;
2501
2503
  }
2502
2504
  },
2503
- [r, t, n, o, i, s]
2505
+ [r, t, n, i, o, s]
2504
2506
  ) };
2505
2507
  }, ro = () => {
2506
- const e = S.useContext(mt);
2508
+ const e = E.useContext(mt);
2507
2509
  if (!e)
2508
2510
  throw new Error("useSettings must be used within a SettingsProvider");
2509
2511
  return e;
2510
2512
  }, so = ({ to: e, withinContext: t, ...n }) => {
2511
- const { pluginId: r } = $e();
2513
+ const { pluginId: r } = Ue();
2512
2514
  r || console.error("Link used outside of a plugin context");
2513
2515
  const s = `/_plugin/${r}${e.startsWith("/") ? "" : "/"}${e}`;
2514
- return S.useMemo(() => /* @__PURE__ */ R(zt, { style: { textDecoration: "none", color: "inherit" }, ...n, to: s }), [n, s]);
2516
+ return E.useMemo(() => /* @__PURE__ */ R(Kt, { style: { textDecoration: "none", color: "inherit" }, ...n, to: s }), [n, s]);
2515
2517
  };
2516
2518
  function oo() {
2517
- const e = Qt(), t = Wt(), { pluginId: n } = $e();
2519
+ const e = Qt(), t = Wt(), { pluginId: n } = Ue();
2518
2520
  n || console.error("usePluginRouter used outside of a plugin context");
2519
- const r = `/_plugin/${n}`, s = t.pathname.startsWith(r) ? t.pathname.slice(r.length) || "/" : t.pathname, o = U((i, a) => {
2521
+ const r = `/_plugin/${n}`, s = t.pathname.startsWith(r) ? t.pathname.slice(r.length) || "/" : t.pathname, i = M((o, a) => {
2520
2522
  const { ...u } = a ?? {};
2521
- i.startsWith("/") ? e(`${r}${i}`, u) : e(i, u);
2523
+ o.startsWith("/") ? e(`${r}${o}`, u) : e(o, u);
2522
2524
  }, [e, r]);
2523
- return Kt(() => ({
2525
+ return zt(() => ({
2524
2526
  location: t,
2525
- navigate: o,
2527
+ navigate: i,
2526
2528
  pluginPath: s
2527
- }), [t, o, s]);
2529
+ }), [t, i, s]);
2528
2530
  }
2529
2531
  class io {
2530
2532
  }
2531
2533
  class ao {
2532
2534
  constructor() {
2533
- k(this, "_extensions");
2535
+ I(this, "_extensions");
2534
2536
  /**
2535
2537
  * The root component to render for the application window.
2536
2538
  */
2537
- k(this, "root");
2539
+ I(this, "root");
2538
2540
  /**
2539
2541
  * Various pages to render under the root component. These can be navigated to using
2540
2542
  * the built-in navigation system both programatically and through Links.
@@ -2564,8 +2566,8 @@ class ao {
2564
2566
  * ```
2565
2567
  *
2566
2568
  */
2567
- k(this, "pages");
2568
- k(this, "_routes");
2569
+ I(this, "pages");
2570
+ I(this, "_routes");
2569
2571
  }
2570
2572
  get extensions() {
2571
2573
  return this._extensions || [];
@@ -2621,7 +2623,7 @@ class ao {
2621
2623
  return this._routes = t, this;
2622
2624
  }
2623
2625
  }
2624
- var us = /* @__PURE__ */ ((e) => (e.MISSING_MANIFEST = "MISSING_MANIFEST", e.MISSING_PLUGIN = "MISSING_PLUGIN", e.MISSING_ENTRYPOINT = "MISSING_ENTRYPOINT", e))(us || {});
2626
+ var ls = /* @__PURE__ */ ((e) => (e.MISSING_MANIFEST = "MISSING_MANIFEST", e.MISSING_PLUGIN = "MISSING_PLUGIN", e.MISSING_ENTRYPOINT = "MISSING_ENTRYPOINT", e))(ls || {});
2625
2627
  const co = (e) => {
2626
2628
  const t = e.split("::");
2627
2629
  return t.length === 1 ? { group: "core", version: "", kind: t[0] } : {
@@ -2634,73 +2636,72 @@ export {
2634
2636
  X as ALL_SESSIONS_KEY,
2635
2637
  Ln as BottomDrawerContext,
2636
2638
  Un as ConfirmationModalContext,
2637
- M as ErrorTypes,
2639
+ L as ErrorTypes,
2638
2640
  Ps as ExtensionPointRegistry,
2639
- Qn as ExtensionPointStore,
2641
+ Wn as ExtensionPointStore,
2640
2642
  Ds as ExtensionProvider,
2641
2643
  so as Link,
2642
2644
  _t as OperationsContext,
2643
- ws as OperationsProvider,
2644
- Le as PluginContext,
2645
+ bs as OperationsProvider,
2646
+ $e as PluginContext,
2645
2647
  Es as PluginContextProvider,
2646
- us as PluginErrorCode,
2648
+ ls as PluginErrorCode,
2647
2649
  ao as PluginWindow,
2648
2650
  io as PluginWindowRootProps,
2649
2651
  $n as RightDrawerContext,
2650
2652
  mt as SettingsContext,
2651
2653
  Cs as SettingsProvider,
2652
- Rs as SnackbarProvider,
2653
- xs as SyncPolicy,
2654
- C as WatchState,
2654
+ Is as SnackbarProvider,
2655
+ Ts as SyncPolicy,
2656
+ w as WatchState,
2655
2657
  kn as actionToSnackbar,
2656
- is as applyBatch,
2657
- Bn as connectionListQueryKey,
2658
- I as createErrorHandler,
2658
+ as as applyBatch,
2659
+ Hn as connectionListQueryKey,
2660
+ F as createErrorHandler,
2659
2661
  Mn as defaultState,
2660
2662
  uo as formatGroup,
2661
2663
  ht as isCancelledError,
2662
- K as parseAppError,
2664
+ z as parseAppError,
2663
2665
  co as parseResourceKey,
2664
2666
  Z as showAppError,
2665
2667
  to as useActiveSyncs,
2666
- Pt as useBottomDrawer,
2667
- Gs as useConfirmationModal,
2668
- Is as useConnection,
2668
+ Dt as useBottomDrawer,
2669
+ js as useConfirmationModal,
2670
+ Rs as useConnection,
2669
2671
  Os as useConnectionNamespaces,
2670
2672
  As as useConnectionStatus,
2671
2673
  Fs as useConnections,
2672
2674
  Zs as useEditorSchemas,
2673
- as as useEventBatcher,
2675
+ cs as useEventBatcher,
2674
2676
  ks as useExec,
2675
2677
  Xs as useExecuteAction,
2676
- bs as useExtensionPoint,
2677
- vs as useExtensionPointComponents,
2678
- Ct as useExtensionRegistry,
2678
+ vs as useExtensionPoint,
2679
+ Qn as useExtensionRegistry,
2679
2680
  Ms as useLogs,
2680
2681
  Ls as useMetricProviders,
2681
- Jn as useMetricProvidersForResource,
2682
+ Vn as useMetricProvidersForResource,
2682
2683
  Us as useMetricStream,
2683
- cs as useOperations,
2684
- $e as usePluginContext,
2685
- Ts as usePluginData,
2684
+ us as useOperations,
2685
+ Ue as usePluginContext,
2686
+ Ns as usePluginData,
2686
2687
  oo as usePluginRouter,
2687
- Ss as usePluginSettings,
2688
+ ws as usePluginSettings,
2688
2689
  qs as usePortForwardSessions,
2689
2690
  D as useResolvedPluginId,
2690
- Ks as useResource,
2691
+ zs as useResource,
2691
2692
  Vs as useResourceActions,
2692
- zs as useResourceAreaComponent,
2693
+ Ks as useResourceAreaComponent,
2693
2694
  Qs as useResourceGroups,
2694
2695
  $s as useResourceMetrics,
2695
2696
  Js as useResourceMutations,
2696
- js as useResourcePortForwarder,
2697
+ Gs as useResourcePortForwarder,
2697
2698
  Ws as useResourceSearch,
2698
2699
  Bs as useResourceType,
2699
2700
  Hs as useResourceTypes,
2700
2701
  Ys as useResources,
2701
- Ns as useRightDrawer,
2702
+ xs as useRightDrawer,
2702
2703
  ro as useSettings,
2703
- L as useSnackbar,
2704
+ $ as useSnackbar,
2704
2705
  no as useStreamAction,
2705
2706
  eo as useWatchState
2706
2707
  };