@synopackageland/sdk 0.9.0 → 0.9.1

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/vue.js CHANGED
@@ -1,7 +1,7 @@
1
- import { shellCopy as Oe, nasCopy as oe, nasErrorCopy as we, format as ve, saveCopy as Ce, saveError as be, createNasProvider as $e, identityCopy as qe, backgroundCopy as Re, createBackgroundPickerProvider as Le, backgroundErrorCopy as Be, requestKey as _e, delegateCopy as xe, errorCopy as Fe, scopedPicker as Ne, authorizationCopy as Me } from "./index.js";
2
- import { activePage as yt, authorizationCatalogs as mt, backgroundCatalogs as bt, catalogs as kt, createBackgroundSaveFacade as _t, createFileTransfers as gt, decodeResponse as ht, delegateCatalogs as wt, encodeRequest as Ct, identityCatalogs as $t, nasCatalogs as xt, protocolCodes as St, protocolOps as zt, protocolSchemas as Vt, saveCatalogs as Ut, shellCatalogs as Pt, shellPages as Dt, uiLocale as At, uiLocales as Et } from "./index.js";
3
- import { inject as He, ref as c, onBeforeUnmount as se, defineComponent as ae, computed as N, openBlock as t, createBlock as h, unref as e, withCtx as s, createVNode as b, renderSlot as ke, createElementVNode as g, onMounted as ie, createElementBlock as C, toDisplayString as l, createTextVNode as p, createCommentVNode as y, Fragment as j, renderList as te, watch as Se, withModifiers as ce, onUnmounted as ze, nextTick as Ke, resolveDynamicComponent as Je } from "vue";
4
- import { AppLayout as Xe, PageContent as Ge, PageHeader as Qe, AppSidebar as We, Button as z, FilePicker as Ye, Callout as Q, TreeView as Ze, DataGrid as je, Dialog as Ve, SettingsSection as de, Link as Ue, Form as pe, FormItem as ne, Input as re, FormActions as fe, Select as Pe, Checkbox as ea, Surface as aa } from "@synopackageland/ui";
1
+ import { shellCopy as Oe, nasCopy as oe, nasErrorCopy as we, format as ve, saveCopy as Ce, saveError as be, createNasProvider as $e, identityCopy as Re, backgroundCopy as qe, createBackgroundPickerProvider as Le, backgroundErrorCopy as Be, requestKey as _e, delegateCopy as xe, errorCopy as Fe, scopedPicker as Ne, authorizationCopy as Me } from "./index.js";
2
+ import { activePage as mt, authorizationCatalogs as bt, backgroundCatalogs as kt, catalogs as _t, createBackgroundSaveFacade as gt, createFileTransfers as ht, decodeResponse as wt, delegateCatalogs as Ct, encodeRequest as $t, identityCatalogs as xt, nasCatalogs as St, protocolCodes as zt, protocolOps as Vt, protocolSchemas as Pt, saveCatalogs as Ut, shellCatalogs as Dt, shellPages as At, uiLocale as Et, uiLocales as Tt } from "./index.js";
3
+ import { inject as He, ref as p, onBeforeUnmount as se, defineComponent as ae, computed as N, openBlock as t, createBlock as g, unref as e, withCtx as s, createVNode as b, renderSlot as ke, createElementVNode as _, onMounted as ie, createElementBlock as C, toDisplayString as l, createTextVNode as f, createCommentVNode as m, Fragment as j, renderList as te, watch as Se, withModifiers as ce, onUnmounted as ze, nextTick as Ke, resolveDynamicComponent as Je } from "vue";
4
+ import { AppLayout as Xe, PageContent as Ge, PageHeader as Qe, AppSidebar as Ye, Button as z, FilePicker as We, Callout as Q, TreeView as Ze, DataGrid as je, Dialog as Ve, SettingsSection as de, Link as Pe, Form as pe, FormItem as ne, Input as re, FormActions as fe, Select as Ue, Checkbox as ea, Surface as aa } from "@synopackageland/ui";
5
5
  import { Timer as la, Info as ta, Folder as ge, File as na, TriangleAlert as sa, ShieldCheck as he } from "@lucide/vue";
6
6
  const ua = /* @__PURE__ */ Symbol("executor-setup");
7
7
  function ia() {
@@ -17,100 +17,100 @@ function ia() {
17
17
  }
18
18
  });
19
19
  }
20
- function tt(f) {
21
- const P = c(!1), a = c(!1), $ = c(), u = c("");
20
+ function nt(y) {
21
+ const D = p(!1), a = p(!1), $ = p(), u = p("");
22
22
  let r = !1, n = 0, i, o;
23
- function w() {
23
+ function h() {
24
24
  clearTimeout(i), clearTimeout(o);
25
25
  }
26
- function d(V = "") {
27
- n++, w(), $.value = void 0, u.value = V;
26
+ function v(P = "") {
27
+ n++, h(), $.value = void 0, u.value = P;
28
28
  }
29
- function k(V) {
29
+ function w(P) {
30
30
  if (r) return;
31
- const R = Date.parse(V.expiresAt) - Date.now();
32
- if (!Number.isFinite(R) || R <= 0) {
33
- d("expired");
31
+ const q = Date.parse(P.expiresAt) - Date.now();
32
+ if (!Number.isFinite(q) || q <= 0) {
33
+ v("expired");
34
34
  return;
35
35
  }
36
- w(), $.value = V, u.value = "", i = setTimeout(() => d("expired"), R);
37
- const W = n;
36
+ h(), $.value = P, u.value = "", i = setTimeout(() => v("expired"), q);
37
+ const Y = n;
38
38
  o = setTimeout(async () => {
39
39
  try {
40
- const X = await f.call("identity.session");
41
- !r && n === W && k(X);
40
+ const X = await y.call("identity.session");
41
+ !r && n === Y && w(X);
42
42
  } catch {
43
- !r && n === W && d("expired");
43
+ !r && n === Y && v("expired");
44
44
  }
45
- }, Math.min(6e4, R));
45
+ }, Math.min(6e4, q));
46
46
  }
47
- async function E() {
47
+ async function U() {
48
48
  try {
49
- const V = await f.call("identity.status");
49
+ const P = await y.call("identity.status");
50
50
  if (r) return;
51
- if (P.value = V.enabled === !0, P.value)
51
+ if (D.value = P.enabled === !0, D.value)
52
52
  try {
53
- k(await f.call("identity.session", { bootstrap: !0 }));
53
+ w(await y.call("identity.session", { bootstrap: !0 }));
54
54
  } catch {
55
- r || d();
55
+ r || v();
56
56
  }
57
- } catch (V) {
58
- const R = V?.code;
59
- P.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(R || ""), P.value && (u.value = "unavailable");
57
+ } catch (P) {
58
+ const q = P?.code;
59
+ D.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(q || ""), D.value && (u.value = "unavailable");
60
60
  } finally {
61
61
  r || (a.value = !0);
62
62
  }
63
63
  }
64
- async function m(V, R) {
65
- const W = n;
64
+ async function c(P, q) {
65
+ const Y = n;
66
66
  try {
67
- const X = await f.call(V, R);
68
- if (r || P.value && W !== n) throw { code: "session_required" };
67
+ const X = await y.call(P, q);
68
+ if (r || D.value && Y !== n) throw { code: "session_required" };
69
69
  return X;
70
70
  } catch (X) {
71
71
  const F = X?.code;
72
- throw !r && W === n && P.value && ["session_required", "session_revalidation_required"].includes(F || "") && d(F === "session_revalidation_required" ? "revalidate" : "expired"), X;
72
+ throw !r && Y === n && D.value && ["session_required", "session_revalidation_required"].includes(F || "") && v(F === "session_revalidation_required" ? "revalidate" : "expired"), X;
73
73
  }
74
74
  }
75
- async function U(V, R, W) {
76
- const X = await f.call("identity.login", { account: V, password: R, otp: W });
77
- r || (n++, k(X));
75
+ async function V(P, q, Y) {
76
+ const X = await y.call("identity.login", { account: P, password: q, otp: Y });
77
+ r || (n++, w(X));
78
78
  }
79
79
  async function S() {
80
- const V = await f.call("identity.session", { bootstrap: !0 });
81
- r || (n++, k(V));
80
+ const P = await y.call("identity.session", { bootstrap: !0 });
81
+ r || (n++, w(P));
82
82
  }
83
- async function A() {
84
- await f.call("identity.logout"), r || d();
83
+ async function E() {
84
+ await y.call("identity.logout"), r || v();
85
85
  }
86
86
  function H() {
87
- r = !0, d();
87
+ r = !0, v();
88
88
  }
89
- return { enabled: P, ready: a, subject: $, notice: u, start: E, call: m, login: U, bootstrap: S, logout: A, dispose: H };
89
+ return { enabled: D, ready: a, subject: $, notice: u, start: U, call: c, login: V, bootstrap: S, logout: E, dispose: H };
90
90
  }
91
91
  function oa() {
92
- const f = c(!1), P = c();
92
+ const y = p(!1), D = p();
93
93
  let a = !1, $ = 0, u;
94
94
  function r() {
95
- $++, u?.abort(), u = void 0, f.value = !1, P.value = void 0;
95
+ $++, u?.abort(), u = void 0, y.value = !1, D.value = void 0;
96
96
  }
97
97
  async function n(i) {
98
- if (a || f.value) return;
99
- const o = ++$, w = new AbortController();
100
- u = w, f.value = !0, P.value = void 0;
98
+ if (a || y.value) return;
99
+ const o = ++$, h = new AbortController();
100
+ u = h, y.value = !0, D.value = void 0;
101
101
  try {
102
- const d = await i(w.signal);
103
- return !a && o === $ ? d : void 0;
104
- } catch (d) {
105
- !a && o === $ && (P.value = d);
102
+ const v = await i(h.signal);
103
+ return !a && o === $ ? v : void 0;
104
+ } catch (v) {
105
+ !a && o === $ && (D.value = v);
106
106
  return;
107
107
  } finally {
108
- !a && o === $ && (f.value = !1, u = void 0);
108
+ !a && o === $ && (y.value = !1, u = void 0);
109
109
  }
110
110
  }
111
111
  return se(() => {
112
112
  a = !0, r();
113
- }), { busy: f, error: P, run: n, cancel: r };
113
+ }), { busy: y, error: D, run: n, cancel: r };
114
114
  }
115
115
  const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
116
116
  __name: "AppShell",
@@ -121,20 +121,20 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
121
121
  description: {}
122
122
  },
123
123
  emits: ["update:modelValue"],
124
- setup(f, { emit: P }) {
125
- const a = f, $ = P, u = N(() => Oe(a.locale)), r = { status: ta, background: la }, n = N(() => [{
124
+ setup(y, { emit: D }) {
125
+ const a = y, $ = D, u = N(() => Oe(a.locale)), r = { status: ta, background: la }, n = N(() => [{
126
126
  items: a.pages.map((o) => ({ key: o, label: u.value[o], icon: r[o] }))
127
127
  }]), i = N(() => u.value[a.modelValue] ?? u.value.status);
128
- return (o, w) => (t(), h(e(Xe), {
128
+ return (o, h) => (t(), g(e(Xe), {
129
129
  class: "app-shell",
130
130
  "min-height": "0",
131
131
  "wide-layout": "window"
132
132
  }, {
133
133
  sidebar: s(() => [
134
- b(e(We), {
135
- "model-value": f.modelValue,
134
+ b(e(Ye), {
135
+ "model-value": y.modelValue,
136
136
  groups: n.value,
137
- "onUpdate:modelValue": w[0] || (w[0] = (d) => $("update:modelValue", d))
137
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => $("update:modelValue", v))
138
138
  }, null, 8, ["model-value", "groups"])
139
139
  ]),
140
140
  default: s(() => [
@@ -142,14 +142,14 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
142
142
  default: s(() => [
143
143
  b(e(Qe), {
144
144
  title: i.value,
145
- description: f.description
145
+ description: y.description
146
146
  }, {
147
147
  actions: s(() => [
148
148
  ke(o.$slots, "actions", {}, void 0, !0)
149
149
  ]),
150
150
  _: 3
151
151
  }, 8, ["title", "description"]),
152
- g("div", ra, [
152
+ _("div", ra, [
153
153
  ke(o.$slots, "default", {}, void 0, !0)
154
154
  ])
155
155
  ]),
@@ -159,12 +159,12 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
159
159
  _: 3
160
160
  }));
161
161
  }
162
- }), ue = (f, P) => {
163
- const a = f.__vccOpts || f;
164
- for (const [$, u] of P)
162
+ }), ue = (y, D) => {
163
+ const a = y.__vccOpts || y;
164
+ for (const [$, u] of D)
165
165
  a[$] = u;
166
166
  return a;
167
- }, nt = /* @__PURE__ */ ue(da, [["__scopeId", "data-v-05f63ca5"]]), va = ["aria-busy", "aria-label"], ca = ["aria-label"], pa = {
167
+ }, st = /* @__PURE__ */ ue(da, [["__scopeId", "data-v-05f63ca5"]]), va = ["aria-busy", "aria-label"], ca = ["aria-label"], pa = {
168
168
  key: 0,
169
169
  class: "file-toolbar"
170
170
  }, fa = {
@@ -189,17 +189,17 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
189
189
  transfers: { type: Boolean, default: !1 }
190
190
  },
191
191
  emits: ["selected"],
192
- setup(f, { emit: P }) {
193
- const a = f, $ = P, u = N(() => oe(a.locale)), r = oa(), { busy: n, error: i } = r, o = c([]), w = c([]), d = c([]), k = c(), E = c(), m = c([]), U = c(), S = c({ key: "name", direction: "asc" }), A = c(0), H = c([]), V = c(!1);
194
- let R = new AbortController();
195
- async function W() {
196
- const v = k.value;
197
- !v || v.isDir || !a.provider.download || await r.run(async (_) => (await a.provider.info(v.path, _), a.provider.download(v.path), !0));
192
+ setup(y, { emit: D }) {
193
+ const a = y, $ = D, u = N(() => oe(a.locale)), r = oa(), { busy: n, error: i } = r, o = p([]), h = p([]), v = p([]), w = p(), U = p(), c = p([]), V = p(), S = p({ key: "name", direction: "asc" }), E = p(0), H = p([]), P = p(!1);
194
+ let q = new AbortController();
195
+ async function Y() {
196
+ const d = w.value;
197
+ !d || d.isDir || !a.provider.download || await r.run(async (k) => (await a.provider.info(d.path, k), a.provider.download(d.path), !0));
198
198
  }
199
199
  async function X() {
200
- const v = d.value.at(-1)?.path, _ = H.value[0];
201
- if (!v || !_ || !a.provider.upload) return;
202
- V.value = !1, await r.run(async (G) => (await a.provider.upload(v, _, G), !0)) && (H.value = [], await q(d.value), V.value = !0);
200
+ const d = v.value.at(-1)?.path, k = H.value[0];
201
+ if (!d || !k || !a.provider.upload) return;
202
+ P.value = !1, await r.run(async (G) => (await a.provider.upload(d, k, G), !0)) && (H.value = [], await R(v.value), P.value = !0);
203
203
  }
204
204
  const F = N(() => [
205
205
  { key: "name", label: u.value.nameColumn, sortable: !0 },
@@ -207,64 +207,64 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
207
207
  { key: "bytes", label: u.value.sizeColumn, align: "right", sortable: !0 },
208
208
  { key: "selection", label: u.value.selectAction }
209
209
  ]);
210
- function L(v) {
211
- return { id: v.path, label: v.name, icon: ge, data: v };
210
+ function L(d) {
211
+ return { id: d.path, label: d.name, icon: ge, data: d };
212
212
  }
213
- function J(v) {
214
- k.value = v, $("selected", v?.path);
213
+ function J(d) {
214
+ w.value = d, $("selected", d?.path);
215
215
  }
216
- function K(v, _, x = []) {
217
- for (const G of v) {
216
+ function K(d, k, x = []) {
217
+ for (const G of d) {
218
218
  const Z = [...x, G.data];
219
- if (G.id === _) return Z;
220
- const ee = K(G.children ?? [], _, Z);
219
+ if (G.id === k) return Z;
220
+ const ee = K(G.children ?? [], k, Z);
221
221
  if (ee) return ee;
222
222
  }
223
223
  }
224
- async function Y(v) {
225
- const _ = A.value, x = R.signal;
224
+ async function W(d) {
225
+ const k = E.value, x = q.signal;
226
226
  try {
227
227
  const G = [];
228
228
  let Z = 0;
229
229
  for (; Z !== void 0; ) {
230
- const ee = await a.provider.list(v.id, { offset: Z, sortBy: "name", sortDirection: "ASC" }, x);
231
- if (x.aborted || _ !== A.value) return;
230
+ const ee = await a.provider.list(d.id, { offset: Z, sortBy: "name", sortDirection: "ASC" }, x);
231
+ if (x.aborted || k !== E.value) return;
232
232
  G.push(...ee.entries.filter((me) => me.isDir).map(L)), Z = ee.nextOffset;
233
233
  }
234
234
  return G;
235
235
  } catch (G) {
236
- !x.aborted && _ === A.value && (i.value = G, J());
236
+ !x.aborted && k === E.value && (i.value = G, J());
237
237
  return;
238
238
  }
239
239
  }
240
- async function q(v, _ = !1) {
240
+ async function R(d, k = !1) {
241
241
  if (n.value) return;
242
- J(), o.value = _ ? o.value : [], E.value = _ ? E.value : void 0;
243
- const x = _ ? E.value ?? 0 : 0, G = v.at(-1)?.path;
244
- d.value = v;
242
+ J(), o.value = k ? o.value : [], U.value = k ? U.value : void 0;
243
+ const x = k ? U.value ?? 0 : 0, G = d.at(-1)?.path;
244
+ v.value = d;
245
245
  const Z = await r.run((ee) => G ? a.provider.list(G, { offset: x, sortBy: S.value.key, sortDirection: S.value.direction === "asc" ? "ASC" : "DESC" }, ee) : a.provider.shares(x, ee));
246
- Z && (o.value = _ ? [...o.value, ...Z.entries] : Z.entries, E.value = Z.nextOffset, G || (w.value = o.value.filter((ee) => ee.isDir).map(L)));
246
+ Z && (o.value = k ? [...o.value, ...Z.entries] : Z.entries, U.value = Z.nextOffset, G || (h.value = o.value.filter((ee) => ee.isDir).map(L)));
247
247
  }
248
- function O(v) {
249
- q([...d.value, v]);
248
+ function O(d) {
249
+ R([...v.value, d]);
250
250
  }
251
- function T(v) {
252
- S.value = { key: v?.key === "bytes" ? "size" : "name", direction: v?.direction ?? "asc" }, q(d.value);
251
+ function T(d) {
252
+ S.value = { key: d?.key === "bytes" ? "size" : "name", direction: d?.direction ?? "asc" }, R(v.value);
253
253
  }
254
254
  function M() {
255
- n.value || (A.value++, R.abort(), R = new AbortController(), w.value = [], m.value = [], U.value = void 0, q([]));
255
+ n.value || (E.value++, q.abort(), q = new AbortController(), h.value = [], c.value = [], V.value = void 0, R([]));
256
256
  }
257
257
  return ie(() => {
258
- q([]);
258
+ R([]);
259
259
  }), se(() => {
260
- A.value++, R.abort();
261
- }), (v, _) => (t(), C("section", {
260
+ E.value++, q.abort();
261
+ }), (d, k) => (t(), C("section", {
262
262
  class: "file-browser",
263
263
  "aria-busy": e(n),
264
264
  "aria-label": u.value.title
265
265
  }, [
266
- g("p", null, l(u.value.ownPermissions), 1),
267
- g("nav", {
266
+ _("p", null, l(u.value.ownPermissions), 1),
267
+ _("nav", {
268
268
  class: "file-toolbar",
269
269
  "aria-label": u.value.directoryKind
270
270
  }, [
@@ -274,53 +274,53 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
274
274
  onClick: M
275
275
  }, {
276
276
  default: s(() => [
277
- p(l(u.value.refresh), 1)
277
+ f(l(u.value.refresh), 1)
278
278
  ]),
279
279
  _: 1
280
280
  }, 8, ["disabled"]),
281
- d.value.length ? (t(), h(e(z), {
281
+ v.value.length ? (t(), g(e(z), {
282
282
  key: 0,
283
283
  variant: "secondary",
284
284
  disabled: e(n),
285
- onClick: _[0] || (_[0] = (x) => q(d.value.slice(0, -1)))
285
+ onClick: k[0] || (k[0] = (x) => R(v.value.slice(0, -1)))
286
286
  }, {
287
287
  default: s(() => [
288
- p(l(u.value.back), 1)
288
+ f(l(u.value.back), 1)
289
289
  ]),
290
290
  _: 1
291
- }, 8, ["disabled"])) : y("", !0),
291
+ }, 8, ["disabled"])) : m("", !0),
292
292
  b(e(z), {
293
293
  variant: "secondary",
294
294
  disabled: e(n),
295
- onClick: _[1] || (_[1] = (x) => q([]))
295
+ onClick: k[1] || (k[1] = (x) => R([]))
296
296
  }, {
297
297
  default: s(() => [
298
- p(l(u.value.roots), 1)
298
+ f(l(u.value.roots), 1)
299
299
  ]),
300
300
  _: 1
301
301
  }, 8, ["disabled"]),
302
- (t(!0), C(j, null, te(d.value, (x, G) => (t(), h(e(z), {
302
+ (t(!0), C(j, null, te(v.value, (x, G) => (t(), g(e(z), {
303
303
  key: x.path,
304
304
  variant: "secondary",
305
305
  disabled: e(n),
306
- onClick: (Z) => q(d.value.slice(0, G + 1))
306
+ onClick: (Z) => R(v.value.slice(0, G + 1))
307
307
  }, {
308
308
  default: s(() => [
309
- p(l(x.name), 1)
309
+ f(l(x.name), 1)
310
310
  ]),
311
311
  _: 2
312
312
  }, 1032, ["disabled", "onClick"]))), 128))
313
313
  ], 8, ca),
314
- f.transfers && f.provider.upload && d.value.length ? (t(), C("div", pa, [
315
- b(e(Ye), {
314
+ y.transfers && y.provider.upload && v.value.length ? (t(), C("div", pa, [
315
+ b(e(We), {
316
316
  modelValue: H.value,
317
- "onUpdate:modelValue": _[2] || (_[2] = (x) => H.value = x),
317
+ "onUpdate:modelValue": k[2] || (k[2] = (x) => H.value = x),
318
318
  variant: "compact",
319
319
  disabled: e(n),
320
320
  "max-files": 1,
321
321
  "max-size": 16 * 1024 ** 3,
322
322
  title: u.value.upload,
323
- onRejected: _[3] || (_[3] = (x) => i.value = { code: "upload_size_required" })
323
+ onRejected: k[3] || (k[3] = (x) => i.value = { code: "upload_size_required" })
324
324
  }, null, 8, ["modelValue", "disabled", "title"]),
325
325
  b(e(z), {
326
326
  variant: "primary",
@@ -328,53 +328,53 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
328
328
  onClick: X
329
329
  }, {
330
330
  default: s(() => [
331
- p(l(u.value.upload), 1)
331
+ f(l(u.value.upload), 1)
332
332
  ]),
333
333
  _: 1
334
334
  }, 8, ["disabled"])
335
- ])) : y("", !0),
336
- V.value ? (t(), C("p", fa, l(u.value.uploaded), 1)) : y("", !0),
337
- f.transfers && f.provider.download && k.value && !k.value.isDir && !e(i) ? (t(), h(e(z), {
335
+ ])) : m("", !0),
336
+ P.value ? (t(), C("p", fa, l(u.value.uploaded), 1)) : m("", !0),
337
+ y.transfers && y.provider.download && w.value && !w.value.isDir && !e(i) ? (t(), g(e(z), {
338
338
  key: 2,
339
339
  variant: "secondary",
340
340
  disabled: e(n),
341
- onClick: W
341
+ onClick: Y
342
342
  }, {
343
343
  default: s(() => [
344
- p(l(u.value.download), 1)
344
+ f(l(u.value.download), 1)
345
345
  ]),
346
346
  _: 1
347
- }, 8, ["disabled"])) : y("", !0),
348
- e(i) ? (t(), h(e(Q), {
347
+ }, 8, ["disabled"])) : m("", !0),
348
+ e(i) ? (t(), g(e(Q), {
349
349
  key: 3,
350
350
  tone: "danger"
351
351
  }, {
352
352
  default: s(() => [
353
- g("span", ya, l(e(we)(e(i), u.value)), 1)
353
+ _("span", ya, l(e(we)(e(i), u.value)), 1)
354
354
  ]),
355
355
  _: 1
356
- })) : y("", !0),
357
- e(n) ? (t(), C("p", ma, l(u.value.loading), 1)) : y("", !0),
358
- g("div", ba, [
359
- g("aside", {
356
+ })) : m("", !0),
357
+ e(n) ? (t(), C("p", ma, l(u.value.loading), 1)) : m("", !0),
358
+ _("div", ba, [
359
+ _("aside", {
360
360
  class: "file-tree",
361
361
  "aria-label": u.value.roots
362
362
  }, [
363
- w.value.length ? (t(), h(e(Ze), {
364
- key: A.value,
365
- modelValue: U.value,
366
- "onUpdate:modelValue": _[4] || (_[4] = (x) => U.value = x),
367
- nodes: w.value,
368
- "onUpdate:nodes": _[5] || (_[5] = (x) => w.value = x),
369
- expanded: m.value,
370
- "onUpdate:expanded": _[6] || (_[6] = (x) => m.value = x),
371
- "load-children": Y,
363
+ h.value.length ? (t(), g(e(Ze), {
364
+ key: E.value,
365
+ modelValue: V.value,
366
+ "onUpdate:modelValue": k[4] || (k[4] = (x) => V.value = x),
367
+ nodes: h.value,
368
+ "onUpdate:nodes": k[5] || (k[5] = (x) => h.value = x),
369
+ expanded: c.value,
370
+ "onUpdate:expanded": k[6] || (k[6] = (x) => c.value = x),
371
+ "load-children": W,
372
372
  "expand-label": (x, G) => e(ve)(G ? u.value.collapse : u.value.expand, x.label),
373
- onSelect: _[7] || (_[7] = (x) => q(K(w.value, x.id) ?? [x.data]))
374
- }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : y("", !0)
373
+ onSelect: k[7] || (k[7] = (x) => R(K(h.value, x.id) ?? [x.data]))
374
+ }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : m("", !0)
375
375
  ], 8, ka),
376
- g("div", _a, [
377
- e(i) ? y("", !0) : (t(), h(e(je), {
376
+ _("div", _a, [
377
+ e(i) ? m("", !0) : (t(), g(e(je), {
378
378
  key: 0,
379
379
  columns: F.value,
380
380
  rows: o.value.map((x) => ({ ...x, kind: x.isDir ? u.value.directoryKind : u.value.fileKind })),
@@ -390,7 +390,7 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
390
390
  "onUpdate:sort": T
391
391
  }, {
392
392
  "cell-name": s(({ row: x }) => [
393
- x.isDir ? (t(), h(e(z), {
393
+ x.isDir ? (t(), g(e(z), {
394
394
  key: 0,
395
395
  variant: "secondary",
396
396
  disabled: e(n),
@@ -402,7 +402,7 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
402
402
  size: 16,
403
403
  "aria-hidden": "true"
404
404
  }),
405
- p(l(x.name), 1)
405
+ f(l(x.name), 1)
406
406
  ]),
407
407
  _: 2
408
408
  }, 1032, ["disabled", "aria-label", "onClick"])) : (t(), C("span", ga, [
@@ -410,54 +410,54 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
410
410
  size: 16,
411
411
  "aria-hidden": "true"
412
412
  }),
413
- p(l(x.name), 1)
413
+ f(l(x.name), 1)
414
414
  ]))
415
415
  ]),
416
416
  "cell-bytes": s(({ row: x }) => [
417
- g("span", ha, l(x.isDir ? "—" : x.bytes ?? "—"), 1)
417
+ _("span", ha, l(x.isDir ? "—" : x.bytes ?? "—"), 1)
418
418
  ]),
419
419
  "cell-selection": s(({ row: x }) => [
420
- (f.mode === "folder" ? x.isDir : !x.isDir) ? (t(), h(e(z), {
420
+ (y.mode === "folder" ? x.isDir : !x.isDir) ? (t(), g(e(z), {
421
421
  key: 0,
422
422
  variant: "secondary",
423
423
  disabled: e(n),
424
- "aria-pressed": k.value?.path === x.path,
424
+ "aria-pressed": w.value?.path === x.path,
425
425
  "aria-label": e(ve)(u.value.select, String(x.name)),
426
426
  onClick: (G) => J(o.value.find((Z) => Z.path === x.path))
427
427
  }, {
428
428
  default: s(() => [
429
- p(l(u.value.selectAction), 1)
429
+ f(l(u.value.selectAction), 1)
430
430
  ]),
431
431
  _: 1
432
- }, 8, ["disabled", "aria-pressed", "aria-label", "onClick"])) : y("", !0)
432
+ }, 8, ["disabled", "aria-pressed", "aria-label", "onClick"])) : m("", !0)
433
433
  ]),
434
434
  _: 1
435
435
  }, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels"])),
436
- E.value !== void 0 && !e(i) ? (t(), h(e(z), {
436
+ U.value !== void 0 && !e(i) ? (t(), g(e(z), {
437
437
  key: 1,
438
438
  variant: "secondary",
439
439
  disabled: e(n),
440
- onClick: _[8] || (_[8] = (x) => q(d.value, !0))
440
+ onClick: k[8] || (k[8] = (x) => R(v.value, !0))
441
441
  }, {
442
442
  default: s(() => [
443
- p(l(u.value.loadMore), 1)
443
+ f(l(u.value.loadMore), 1)
444
444
  ]),
445
445
  _: 1
446
- }, 8, ["disabled"])) : y("", !0),
447
- f.mode === "folder" && d.value.length && !e(i) ? (t(), h(e(z), {
446
+ }, 8, ["disabled"])) : m("", !0),
447
+ y.mode === "folder" && v.value.length && !e(i) ? (t(), g(e(z), {
448
448
  key: 2,
449
449
  variant: "secondary",
450
450
  disabled: e(n),
451
- onClick: _[9] || (_[9] = (x) => J(d.value.at(-1)))
451
+ onClick: k[9] || (k[9] = (x) => J(v.value.at(-1)))
452
452
  }, {
453
453
  default: s(() => [
454
- p(l(e(ve)(u.value.select, d.value.at(-1).name)), 1)
454
+ f(l(e(ve)(u.value.select, v.value.at(-1).name)), 1)
455
455
  ]),
456
456
  _: 1
457
- }, 8, ["disabled"])) : y("", !0)
457
+ }, 8, ["disabled"])) : m("", !0)
458
458
  ])
459
459
  ]),
460
- k.value && !e(i) ? (t(), C("p", wa, l(e(ve)(u.value.selected, k.value.path)), 1)) : y("", !0)
460
+ w.value && !e(i) ? (t(), C("p", wa, l(e(ve)(u.value.selected, w.value.path)), 1)) : m("", !0)
461
461
  ], 8, va));
462
462
  }
463
463
  }), De = /* @__PURE__ */ ue(Ca, [["__scopeId", "data-v-f1aee828"]]), $a = {
@@ -475,231 +475,238 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
475
475
  destination: {}
476
476
  },
477
477
  emits: ["update:open", "selected", "authorized"],
478
- setup(f, { emit: P }) {
479
- const a = f, $ = P, u = c(), r = N(() => oe(a.locale)), n = N(() => Ce(a.locale)), i = c(!1), o = c();
480
- let w = 0, d = !1;
478
+ setup(y, { emit: D }) {
479
+ const a = y, $ = D, u = p(), r = N(() => oe(a.locale)), n = N(() => Ce(a.locale)), i = p(!1), o = p();
480
+ let h = 0, v = !1;
481
481
  Se(() => a.open, () => {
482
- w++, u.value = void 0, o.value = void 0;
482
+ h++, u.value = void 0, o.value = void 0;
483
483
  }), se(() => {
484
- d = !0, w++;
484
+ v = !0, h++;
485
485
  });
486
- function k() {
486
+ function w() {
487
487
  i.value || (u.value = void 0, $("update:open", !1));
488
488
  }
489
- async function E() {
490
- const m = u.value, U = a.destination, S = w;
491
- if (!(!m || i.value || !a.open || d || U && a.mode !== "folder")) {
492
- if (!U) {
493
- $("selected", m), k();
489
+ async function U() {
490
+ const c = u.value, V = a.destination, S = h;
491
+ if (!(!c || i.value || !a.open || v || V && a.mode !== "folder")) {
492
+ if (!V) {
493
+ $("selected", c), w();
494
494
  return;
495
495
  }
496
496
  i.value = !0, o.value = void 0;
497
497
  try {
498
- const A = await U.selectDestination({ key: U.key, path: m });
499
- if (d || S !== w) return;
500
- if (!A || typeof A.id != "string" || !A.id || typeof A.username != "string" || !A.username || A.path !== m || A.key !== U.key || A.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
501
- $("authorized", A), i.value = !1, k();
502
- } catch (A) {
503
- !d && S === w && (o.value = A);
498
+ const E = await V.selectDestination({ key: V.key, path: c });
499
+ if (v || S !== h) return;
500
+ if (!E || typeof E.id != "string" || !E.id || typeof E.username != "string" || !E.username || E.path !== c || E.key !== V.key || E.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
501
+ $("authorized", E), i.value = !1, w();
502
+ } catch (E) {
503
+ !v && S === h && (o.value = E);
504
504
  } finally {
505
- d || (i.value = !1);
505
+ v || (i.value = !1);
506
506
  }
507
507
  }
508
508
  }
509
- return (m, U) => (t(), h(e(Ve), {
510
- open: f.open,
511
- title: f.title ?? (f.mode === "folder" ? r.value.choose : r.value.chooseFile),
512
- description: f.description ?? r.value.ownPermissions,
509
+ return (c, V) => (t(), g(e(Ve), {
510
+ open: y.open,
511
+ title: y.title ?? (y.mode === "folder" ? r.value.choose : r.value.chooseFile),
512
+ description: y.description ?? r.value.ownPermissions,
513
513
  "close-label": r.value.close,
514
514
  "show-close": !i.value,
515
515
  width: "800px",
516
- onEscapeKeyDown: U[1] || (U[1] = (S) => {
516
+ onEscapeKeyDown: V[1] || (V[1] = (S) => {
517
517
  i.value && S.preventDefault();
518
518
  }),
519
- onInteractOutside: U[2] || (U[2] = (S) => {
519
+ onInteractOutside: V[2] || (V[2] = (S) => {
520
520
  i.value && S.preventDefault();
521
521
  }),
522
- "onUpdate:open": U[3] || (U[3] = (S) => {
523
- S || k();
522
+ "onUpdate:open": V[3] || (V[3] = (S) => {
523
+ S || w();
524
524
  })
525
525
  }, {
526
526
  footer: s(() => [
527
527
  b(e(z), {
528
528
  variant: "secondary",
529
529
  disabled: i.value,
530
- onClick: k
530
+ onClick: w
531
531
  }, {
532
532
  default: s(() => [
533
- p(l(r.value.cancel), 1)
533
+ f(l(r.value.cancel), 1)
534
534
  ]),
535
535
  _: 1
536
536
  }, 8, ["disabled"]),
537
537
  b(e(z), {
538
538
  variant: "primary",
539
- disabled: !u.value || i.value || !!f.destination && f.mode !== "folder",
540
- onClick: E
539
+ disabled: !u.value || i.value || !!y.destination && y.mode !== "folder",
540
+ onClick: U
541
541
  }, {
542
542
  default: s(() => [
543
- p(l(r.value.confirm), 1)
543
+ f(l(r.value.confirm), 1)
544
544
  ]),
545
545
  _: 1
546
546
  }, 8, ["disabled"])
547
547
  ]),
548
548
  default: s(() => [
549
- f.destination ? (t(), C("p", $a, l(n.value.selection), 1)) : y("", !0),
550
- o.value ? (t(), h(e(Q), {
549
+ y.destination ? (t(), C("p", $a, l(n.value.selection), 1)) : m("", !0),
550
+ o.value ? (t(), g(e(Q), {
551
551
  key: 1,
552
552
  tone: "danger",
553
553
  role: "alert",
554
554
  class: "save-message"
555
555
  }, {
556
556
  default: s(() => [
557
- p(l(e(be)(o.value, n.value)), 1)
557
+ f(l(e(be)(o.value, n.value)), 1)
558
558
  ]),
559
559
  _: 1
560
- })) : y("", !0),
561
- g("div", {
560
+ })) : m("", !0),
561
+ _("div", {
562
562
  class: "nas-picker-content",
563
563
  "aria-busy": i.value,
564
564
  inert: i.value
565
565
  }, [
566
- f.open ? (t(), h(De, {
566
+ y.open ? (t(), g(De, {
567
567
  key: 0,
568
- provider: f.provider,
569
- locale: f.locale,
570
- mode: f.mode,
571
- onSelected: U[0] || (U[0] = (S) => u.value = S)
572
- }, null, 8, ["provider", "locale", "mode"])) : y("", !0)
568
+ provider: y.provider,
569
+ locale: y.locale,
570
+ mode: y.mode,
571
+ onSelected: V[0] || (V[0] = (S) => u.value = S)
572
+ }, null, 8, ["provider", "locale", "mode"])) : m("", !0)
573
573
  ], 8, xa)
574
574
  ]),
575
575
  _: 1
576
576
  }, 8, ["open", "title", "description", "close-label", "show-close"]));
577
577
  }
578
- }), ye = /* @__PURE__ */ ue(Sa, [["__scopeId", "data-v-535a0e54"]]), za = { role: "alert" }, Va = { class: "files-actions" }, Ua = {
578
+ }), ye = /* @__PURE__ */ ue(Sa, [["__scopeId", "data-v-535a0e54"]]), za = { role: "alert" }, Va = { class: "files-actions" }, Pa = {
579
579
  key: 0,
580
580
  class: "files-path",
581
581
  role: "status"
582
- }, Pa = /* @__PURE__ */ ae({
582
+ }, Ua = /* @__PURE__ */ ae({
583
583
  __name: "FilesPage",
584
584
  props: {
585
585
  ctx: {}
586
586
  },
587
- setup(f) {
588
- const P = f, a = c(), $ = c(!1), u = c("folder"), r = c(!1), n = c(""), i = c(0), o = $e(P.ctx);
589
- let w = !1, d;
590
- async function k() {
591
- if (!w) {
587
+ setup(y) {
588
+ const D = y, a = p(), $ = p(!1), u = p("folder"), r = p(!1), n = p(""), i = p(0), o = $e(D.ctx);
589
+ let h = !1, v;
590
+ async function w() {
591
+ if (!h) {
592
592
  a.value = void 0, $.value = !1, n.value = "", r.value = !1, i.value++;
593
593
  try {
594
- await P.ctx.call("nas.session.status"), w || ($.value = !0);
595
- } catch (E) {
596
- !w && E?.code !== "unknown_method" && (a.value = E);
594
+ await D.ctx.call("nas.session.status"), h || ($.value = !0);
595
+ } catch (U) {
596
+ !h && U?.code !== "unknown_method" && (a.value = U);
597
597
  }
598
598
  }
599
599
  }
600
600
  return ie(() => {
601
- d = P.ctx.reopen(() => {
602
- k();
603
- }), k();
601
+ v = D.ctx.reopen(() => {
602
+ w();
603
+ }), w();
604
604
  }), se(() => {
605
- w = !0, d?.(), o.dispose();
606
- }), (E, m) => (t(), C(j, null, [
607
- a.value ? (t(), h(e(Q), {
605
+ h = !0, v?.(), o.dispose();
606
+ }), (U, c) => (t(), C(j, null, [
607
+ a.value ? (t(), g(e(Q), {
608
608
  key: 0,
609
609
  tone: "danger"
610
610
  }, {
611
611
  default: s(() => [
612
- g("span", za, l(e(we)(a.value, e(oe)(f.ctx.locale))), 1),
612
+ _("span", za, l(e(we)(a.value, e(oe)(y.ctx.locale))), 1),
613
613
  b(e(z), {
614
614
  variant: "secondary",
615
- onClick: k
615
+ onClick: w
616
616
  }, {
617
617
  default: s(() => [
618
- p(l(e(oe)(f.ctx.locale).refresh), 1)
618
+ f(l(e(oe)(y.ctx.locale).refresh), 1)
619
619
  ]),
620
620
  _: 1
621
621
  })
622
622
  ]),
623
623
  _: 1
624
- })) : y("", !0),
625
- $.value ? (t(), h(e(de), {
624
+ })) : m("", !0),
625
+ $.value ? (t(), g(e(de), {
626
626
  key: 1,
627
- title: e(oe)(f.ctx.locale).title,
627
+ title: e(oe)(y.ctx.locale).title,
628
628
  collapsible: !1
629
629
  }, {
630
630
  default: s(() => [
631
- g("div", Va, [
631
+ _("div", Va, [
632
632
  b(e(z), {
633
633
  variant: "secondary",
634
- onClick: m[0] || (m[0] = (U) => {
634
+ onClick: c[0] || (c[0] = (V) => {
635
635
  u.value = "folder", r.value = !0;
636
636
  })
637
637
  }, {
638
638
  default: s(() => [
639
- p(l(e(oe)(f.ctx.locale).choose), 1)
639
+ f(l(e(oe)(y.ctx.locale).choose), 1)
640
640
  ]),
641
641
  _: 1
642
642
  }),
643
643
  b(e(z), {
644
644
  variant: "secondary",
645
- onClick: m[1] || (m[1] = (U) => {
645
+ onClick: c[1] || (c[1] = (V) => {
646
646
  u.value = "file", r.value = !0;
647
647
  })
648
648
  }, {
649
649
  default: s(() => [
650
- p(l(e(oe)(f.ctx.locale).chooseFile), 1)
650
+ f(l(e(oe)(y.ctx.locale).chooseFile), 1)
651
651
  ]),
652
652
  _: 1
653
653
  })
654
654
  ]),
655
- n.value ? (t(), C("p", Ua, l(n.value), 1)) : y("", !0),
656
- (t(), h(De, {
655
+ n.value ? (t(), C("p", Pa, l(n.value), 1)) : m("", !0),
656
+ (t(), g(De, {
657
657
  key: i.value,
658
658
  provider: e(o),
659
- locale: f.ctx.locale,
659
+ locale: y.ctx.locale,
660
660
  transfers: ""
661
661
  }, null, 8, ["provider", "locale"])),
662
662
  b(ye, {
663
663
  provider: e(o),
664
- locale: f.ctx.locale,
664
+ locale: y.ctx.locale,
665
665
  mode: u.value,
666
666
  open: r.value,
667
- "onUpdate:open": m[2] || (m[2] = (U) => r.value = U),
668
- onSelected: m[3] || (m[3] = (U) => n.value = U)
667
+ "onUpdate:open": c[2] || (c[2] = (V) => r.value = V),
668
+ onSelected: c[3] || (c[3] = (V) => n.value = V)
669
669
  }, null, 8, ["provider", "locale", "mode", "open"])
670
670
  ]),
671
671
  _: 1
672
- }, 8, ["title"])) : y("", !0)
672
+ }, 8, ["title"])) : m("", !0)
673
673
  ], 64));
674
674
  }
675
- }), st = /* @__PURE__ */ ue(Pa, [["__scopeId", "data-v-97bc5d15"]]), Da = { key: 0 }, Aa = { key: 0 }, Ea = { key: 3 }, Ta = { role: "alert" }, ut = /* @__PURE__ */ ae({
675
+ }), ut = /* @__PURE__ */ ue(Ua, [["__scopeId", "data-v-97bc5d15"]]), Da = { key: 0 }, Aa = { key: 0 }, Ea = { key: 3 }, Ta = { role: "alert" }, Ia = 5e3, it = /* @__PURE__ */ ae({
676
676
  __name: "PortalSettings",
677
677
  props: {
678
678
  portal: {}
679
679
  },
680
- setup(f) {
681
- const P = f, a = P.portal.messages, $ = c(), u = c(""), r = c(!1), n = c("");
680
+ setup(y) {
681
+ const D = y, a = D.portal.messages, $ = p(), u = p(""), r = p(!1), n = p("");
682
682
  let i = !1;
683
- function o(d) {
684
- i || ($.value = d, u.value = d.alias || d.defaultAlias);
683
+ function o(w) {
684
+ i || ($.value = w, u.value = w.alias || w.defaultAlias);
685
685
  }
686
- async function w(d) {
687
- if (!r.value) {
688
- r.value = !0, n.value = "";
689
- try {
690
- o(await d());
691
- } catch (k) {
692
- i || (n.value = a[k?.code || ""] || a.portal_unavailable);
693
- } finally {
694
- i || (r.value = !1);
686
+ const h = /* @__PURE__ */ Symbol("late");
687
+ async function v(w) {
688
+ if (r.value) return;
689
+ r.value = !0, n.value = "";
690
+ const U = w();
691
+ try {
692
+ const c = await Promise.race([U, new Promise((V) => setTimeout(() => V(h), Ia))]);
693
+ if (c !== h) {
694
+ o(c);
695
+ return;
695
696
  }
697
+ U.then(o, () => {
698
+ }), o(await D.portal.status());
699
+ } catch (c) {
700
+ i || (n.value = a[c?.code || ""] || a.portal_unavailable);
701
+ } finally {
702
+ i || (r.value = !1);
696
703
  }
697
704
  }
698
705
  return ie(() => {
699
- P.portal.status().then(o);
706
+ D.portal.status().then(o);
700
707
  }), se(() => {
701
708
  i = !0;
702
- }), (d, k) => $.value ? (t(), h(e(de), {
709
+ }), (w, U) => $.value ? (t(), g(e(de), {
703
710
  key: 0,
704
711
  title: e(a).title,
705
712
  collapsible: !1,
@@ -707,21 +714,21 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
707
714
  }, {
708
715
  default: s(() => [
709
716
  $.value.state === "active" ? (t(), C("p", Da, [
710
- p(l(e(a).link) + " ", 1),
711
- b(e(Ue), {
717
+ f(l(e(a).link) + " ", 1),
718
+ b(e(Pe), {
712
719
  href: $.value.url,
713
720
  external: ""
714
721
  }, {
715
722
  default: s(() => [
716
- p(l($.value.url), 1)
723
+ f(l($.value.url), 1)
717
724
  ]),
718
725
  _: 1
719
726
  }, 8, ["href"])
720
- ])) : y("", !0),
727
+ ])) : m("", !0),
721
728
  $.value.canManage ? (t(), C(j, { key: 1 }, [
722
- $.value.state !== "active" ? (t(), C("p", Aa, l(e(a).inactive), 1)) : y("", !0),
729
+ $.value.state !== "active" ? (t(), C("p", Aa, l(e(a).inactive), 1)) : m("", !0),
723
730
  b(e(pe), {
724
- onSubmit: k[2] || (k[2] = ce((E) => w(() => f.portal.apply(u.value)), ["prevent"]))
731
+ onSubmit: U[2] || (U[2] = ce((c) => v(() => y.portal.apply(u.value)), ["prevent"]))
725
732
  }, {
726
733
  default: s(() => [
727
734
  b(e(ne), {
@@ -732,7 +739,7 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
732
739
  b(e(re), {
733
740
  id: "portal-alias",
734
741
  modelValue: u.value,
735
- "onUpdate:modelValue": k[0] || (k[0] = (E) => u.value = E),
742
+ "onUpdate:modelValue": U[0] || (U[0] = (c) => u.value = c),
736
743
  maxlength: "64",
737
744
  autocomplete: "off",
738
745
  disabled: r.value
@@ -748,21 +755,21 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
748
755
  disabled: r.value
749
756
  }, {
750
757
  default: s(() => [
751
- p(l(e(a).apply), 1)
758
+ f(l(e(a).apply), 1)
752
759
  ]),
753
760
  _: 1
754
761
  }, 8, ["disabled"]),
755
- $.value.state === "active" ? (t(), h(e(z), {
762
+ $.value.state === "active" ? (t(), g(e(z), {
756
763
  key: 0,
757
764
  variant: "secondary",
758
765
  disabled: r.value,
759
- onClick: k[1] || (k[1] = (E) => w(() => f.portal.disable()))
766
+ onClick: U[1] || (U[1] = (c) => v(() => y.portal.disable()))
760
767
  }, {
761
768
  default: s(() => [
762
- p(l(e(a).disable), 1)
769
+ f(l(e(a).disable), 1)
763
770
  ]),
764
771
  _: 1
765
- }, 8, ["disabled"])) : y("", !0)
772
+ }, 8, ["disabled"])) : m("", !0)
766
773
  ]),
767
774
  _: 1
768
775
  })
@@ -771,74 +778,74 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
771
778
  }),
772
779
  b(e(z), {
773
780
  variant: "secondary",
774
- onClick: k[3] || (k[3] = (E) => f.portal.openControlPanel())
781
+ onClick: U[3] || (U[3] = (c) => y.portal.openControlPanel())
775
782
  }, {
776
783
  default: s(() => [
777
- p(l(e(a).advanced), 1)
784
+ f(l(e(a).advanced), 1)
778
785
  ]),
779
786
  _: 1
780
787
  })
781
- ], 64)) : $.value.controlPanel ? (t(), h(e(z), {
788
+ ], 64)) : $.value.controlPanel ? (t(), g(e(z), {
782
789
  key: 2,
783
790
  variant: "secondary",
784
- onClick: k[4] || (k[4] = (E) => f.portal.openControlPanel())
791
+ onClick: U[4] || (U[4] = (c) => y.portal.openControlPanel())
785
792
  }, {
786
793
  default: s(() => [
787
- p(l(e(a).controlPanel), 1)
794
+ f(l(e(a).controlPanel), 1)
788
795
  ]),
789
796
  _: 1
790
- })) : $.value.state !== "active" ? (t(), C("p", Ea, l(e(a).askAdmin), 1)) : y("", !0),
791
- n.value ? (t(), h(e(Q), {
797
+ })) : $.value.state !== "active" ? (t(), C("p", Ea, l(e(a).askAdmin), 1)) : m("", !0),
798
+ n.value ? (t(), g(e(Q), {
792
799
  key: 4,
793
800
  tone: "danger"
794
801
  }, {
795
802
  default: s(() => [
796
- g("span", Ta, l(n.value), 1)
803
+ _("span", Ta, l(n.value), 1)
797
804
  ]),
798
805
  _: 1
799
- })) : y("", !0)
806
+ })) : m("", !0)
800
807
  ]),
801
808
  _: 1
802
- }, 8, ["title", "aria-busy"])) : y("", !0);
809
+ }, 8, ["title", "aria-busy"])) : m("", !0);
803
810
  }
804
- }), Ia = ["aria-busy"], Oa = {
811
+ }), Oa = ["aria-busy"], Ra = {
805
812
  key: 1,
806
813
  role: "status"
807
- }, qa = { role: "alert" }, Ra = { role: "status" }, La = /* @__PURE__ */ ae({
814
+ }, qa = { role: "alert" }, La = { role: "status" }, Ba = /* @__PURE__ */ ae({
808
815
  __name: "LoginPage",
809
816
  props: {
810
817
  session: {},
811
818
  locale: {}
812
819
  },
813
- setup(f) {
814
- const P = f, a = N(() => qe(P.locale)), $ = c(""), u = c(""), r = c(""), n = c(!1), i = c(!1), o = c(""), w = c(), d = N(() => window.location.protocol === "https:");
815
- let k = !1;
816
- function E(A) {
817
- const H = A?.code;
820
+ setup(y) {
821
+ const D = y, a = N(() => Re(D.locale)), $ = p(""), u = p(""), r = p(""), n = p(!1), i = p(!1), o = p(""), h = p(), v = N(() => window.location.protocol === "https:");
822
+ let w = !1;
823
+ function U(E) {
824
+ const H = E?.code;
818
825
  return a.value.errors[H || ""] || a.value.errors.failed;
819
826
  }
820
- async function m() {
821
- if (!(i.value || !d.value || !$.value || !u.value || n.value && !r.value)) {
827
+ async function c() {
828
+ if (!(i.value || !v.value || !$.value || !u.value || n.value && !r.value)) {
822
829
  i.value = !0, o.value = "";
823
830
  try {
824
- await P.session.login($.value, u.value, r.value), u.value = "", r.value = "";
825
- } catch (A) {
826
- if (k) return;
827
- r.value = "", A?.code === "otp_required" ? n.value = !0 : (o.value = E(A), u.value = "", n.value = !1);
831
+ await D.session.login($.value, u.value, r.value), u.value = "", r.value = "";
832
+ } catch (E) {
833
+ if (w) return;
834
+ r.value = "", E?.code === "otp_required" ? n.value = !0 : (o.value = U(E), u.value = "", n.value = !1);
828
835
  } finally {
829
- k || (i.value = !1, n.value && (await Ke(), k || w.value?.querySelector("input")?.focus()));
836
+ w || (i.value = !1, n.value && (await Ke(), w || h.value?.querySelector("input")?.focus()));
830
837
  }
831
838
  }
832
839
  }
833
- async function U() {
840
+ async function V() {
834
841
  if (!i.value) {
835
842
  i.value = !0, o.value = "";
836
843
  try {
837
- await P.session.bootstrap();
838
- } catch (A) {
839
- k || (o.value = E(A));
844
+ await D.session.bootstrap();
845
+ } catch (E) {
846
+ w || (o.value = U(E));
840
847
  } finally {
841
- k || (i.value = !1);
848
+ w || (i.value = !1);
842
849
  }
843
850
  }
844
851
  }
@@ -846,8 +853,8 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
846
853
  u.value = "", r.value = "", n.value = !1, o.value = "";
847
854
  }
848
855
  return ze(() => {
849
- k = !0, u.value = "", r.value = "";
850
- }), (A, H) => (t(), C("main", {
856
+ w = !0, u.value = "", r.value = "";
857
+ }), (E, H) => (t(), C("main", {
851
858
  class: "identity-login",
852
859
  "aria-busy": i.value
853
860
  }, [
@@ -856,30 +863,30 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
856
863
  collapsible: !1
857
864
  }, {
858
865
  default: s(() => [
859
- g("p", null, l(a.value.intro), 1),
860
- d.value ? y("", !0) : (t(), h(e(Q), {
866
+ _("p", null, l(a.value.intro), 1),
867
+ v.value ? m("", !0) : (t(), g(e(Q), {
861
868
  key: 0,
862
869
  tone: "warning",
863
870
  title: a.value.httpsTitle
864
871
  }, {
865
872
  default: s(() => [
866
- p(l(a.value.errors.https_required), 1)
873
+ f(l(a.value.errors.https_required), 1)
867
874
  ]),
868
875
  _: 1
869
876
  }, 8, ["title"])),
870
- f.session.notice.value ? (t(), C("p", Oa, l(a.value.notices[f.session.notice.value]), 1)) : y("", !0),
871
- o.value ? (t(), h(e(Q), {
877
+ y.session.notice.value ? (t(), C("p", Ra, l(a.value.notices[y.session.notice.value]), 1)) : m("", !0),
878
+ o.value ? (t(), g(e(Q), {
872
879
  key: 2,
873
880
  tone: "danger",
874
881
  title: a.value.failedTitle
875
882
  }, {
876
883
  default: s(() => [
877
- g("span", qa, l(o.value), 1)
884
+ _("span", qa, l(o.value), 1)
878
885
  ]),
879
886
  _: 1
880
- }, 8, ["title"])) : y("", !0),
887
+ }, 8, ["title"])) : m("", !0),
881
888
  b(e(pe), {
882
- onSubmit: ce(m, ["prevent"])
889
+ onSubmit: ce(c, ["prevent"])
883
890
  }, {
884
891
  default: s(() => [
885
892
  b(e(ne), {
@@ -888,18 +895,18 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
888
895
  default: s(() => [
889
896
  b(e(re), {
890
897
  modelValue: $.value,
891
- "onUpdate:modelValue": H[0] || (H[0] = (V) => $.value = V),
898
+ "onUpdate:modelValue": H[0] || (H[0] = (P) => $.value = P),
892
899
  autocomplete: "username",
893
- disabled: i.value || n.value || !d.value
900
+ disabled: i.value || n.value || !v.value
894
901
  }, null, 8, ["modelValue", "disabled"])
895
902
  ]),
896
903
  _: 1
897
904
  }, 8, ["label"]),
898
905
  n.value ? (t(), C(j, { key: 1 }, [
899
- g("p", Ra, l(a.value.otpPrompt), 1),
900
- g("div", {
906
+ _("p", La, l(a.value.otpPrompt), 1),
907
+ _("div", {
901
908
  ref_key: "otpField",
902
- ref: w
909
+ ref: h
903
910
  }, [
904
911
  b(e(ne), {
905
912
  label: a.value.otp
@@ -907,7 +914,7 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
907
914
  default: s(() => [
908
915
  b(e(re), {
909
916
  modelValue: r.value,
910
- "onUpdate:modelValue": H[2] || (H[2] = (V) => r.value = V),
917
+ "onUpdate:modelValue": H[2] || (H[2] = (P) => r.value = P),
911
918
  inputmode: "numeric",
912
919
  autocomplete: "one-time-code",
913
920
  disabled: i.value
@@ -916,17 +923,17 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
916
923
  _: 1
917
924
  }, 8, ["label"])
918
925
  ], 512)
919
- ], 64)) : (t(), h(e(ne), {
926
+ ], 64)) : (t(), g(e(ne), {
920
927
  key: 0,
921
928
  label: a.value.password
922
929
  }, {
923
930
  default: s(() => [
924
931
  b(e(re), {
925
932
  modelValue: u.value,
926
- "onUpdate:modelValue": H[1] || (H[1] = (V) => u.value = V),
933
+ "onUpdate:modelValue": H[1] || (H[1] = (P) => u.value = P),
927
934
  type: "password",
928
935
  autocomplete: "current-password",
929
- disabled: i.value || !d.value
936
+ disabled: i.value || !v.value
930
937
  }, null, 8, ["modelValue", "disabled"])
931
938
  ]),
932
939
  _: 1
@@ -936,31 +943,31 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
936
943
  b(e(z), {
937
944
  type: "submit",
938
945
  variant: "primary",
939
- disabled: i.value || !d.value || !$.value || !u.value || n.value && !r.value
946
+ disabled: i.value || !v.value || !$.value || !u.value || n.value && !r.value
940
947
  }, {
941
948
  default: s(() => [
942
- p(l(i.value ? a.value.signingIn : n.value ? a.value.verify : a.value.signIn), 1)
949
+ f(l(i.value ? a.value.signingIn : n.value ? a.value.verify : a.value.signIn), 1)
943
950
  ]),
944
951
  _: 1
945
952
  }, 8, ["disabled"]),
946
- n.value ? (t(), h(e(z), {
953
+ n.value ? (t(), g(e(z), {
947
954
  key: 0,
948
955
  variant: "secondary",
949
956
  disabled: i.value,
950
957
  onClick: S
951
958
  }, {
952
959
  default: s(() => [
953
- p(l(a.value.otherAccount), 1)
960
+ f(l(a.value.otherAccount), 1)
954
961
  ]),
955
962
  _: 1
956
- }, 8, ["disabled"])) : (t(), h(e(z), {
963
+ }, 8, ["disabled"])) : (t(), g(e(z), {
957
964
  key: 1,
958
965
  variant: "secondary",
959
- disabled: i.value || !d.value,
960
- onClick: U
966
+ disabled: i.value || !v.value,
967
+ onClick: V
961
968
  }, {
962
969
  default: s(() => [
963
- p(l(a.value.continueDSM), 1)
970
+ f(l(a.value.continueDSM), 1)
964
971
  ]),
965
972
  _: 1
966
973
  }, 8, ["disabled"]))
@@ -973,51 +980,51 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
973
980
  ]),
974
981
  _: 1
975
982
  }, 8, ["title"])
976
- ], 8, Ia));
983
+ ], 8, Oa));
977
984
  }
978
- }), it = /* @__PURE__ */ ue(La, [["__scopeId", "data-v-f7afcf5e"]]), Ba = { class: "integration-help" }, Fa = { role: "status" }, Na = { class: "integration-help" }, Ma = { class: "integration-help" }, Ha = { class: "integration-help" }, Ka = { class: "integration-actions" }, Ja = { class: "integration-actions" }, Xa = {
985
+ }), ot = /* @__PURE__ */ ue(Ba, [["__scopeId", "data-v-f7afcf5e"]]), Fa = { class: "integration-help" }, Na = { role: "status" }, Ma = { class: "integration-help" }, Ha = { class: "integration-help" }, Ka = { class: "integration-help" }, Ja = { class: "integration-actions" }, Xa = { class: "integration-actions" }, Ga = {
979
986
  key: 0,
980
987
  role: "status",
981
988
  "data-bg-picked": ""
982
- }, Ga = { class: "integration-actions" }, Qa = { key: 1 }, Wa = {
989
+ }, Qa = { class: "integration-actions" }, Ya = { key: 1 }, Wa = {
983
990
  key: 2,
984
991
  class: "integration-jobs"
985
- }, Ya = ["data-job-state", "data-job-id"], Za = { class: "nas-folder-name" }, ja = {
992
+ }, Za = ["data-job-state", "data-job-id"], ja = { class: "nas-folder-name" }, el = {
986
993
  key: 0,
987
994
  class: "integration-help"
988
- }, el = {
995
+ }, al = {
989
996
  key: 4,
990
997
  class: "integration-help"
991
- }, al = ["aria-label"], ll = { class: "integration-help" }, tl = { key: 1 }, nl = {
998
+ }, ll = ["aria-label"], tl = { class: "integration-help" }, nl = { key: 1 }, sl = {
992
999
  key: 2,
993
1000
  class: "integration-jobs"
994
- }, sl = ["data-schedule-id"], ul = { class: "nas-folder-name" }, il = {
1001
+ }, ul = ["data-schedule-id"], il = { class: "nas-folder-name" }, ol = {
995
1002
  key: 0,
996
1003
  class: "integration-help"
997
- }, ol = {
1004
+ }, rl = {
998
1005
  key: 1,
999
1006
  class: "integration-help"
1000
- }, rl = { class: "integration-help" }, dl = { class: "integration-actions" }, vl = { class: "integration-actions" }, cl = { class: "integration-actions" }, pl = /* @__PURE__ */ ae({
1007
+ }, dl = { class: "integration-help" }, vl = { class: "integration-actions" }, cl = { class: "integration-actions" }, pl = { class: "integration-actions" }, fl = /* @__PURE__ */ ae({
1001
1008
  __name: "BackgroundPanel",
1002
1009
  props: {
1003
1010
  ctx: {}
1004
1011
  },
1005
- setup(f) {
1006
- const P = f, a = N(() => Re(P.ctx.locale)), $ = (I, B) => I.replace(/\{(\w+)\}/g, (D, le) => String(B[le] ?? "")), u = c(), r = c([]), n = c(), i = c(!1), o = c(!1), w = c([]), d = c(), k = c(!1), E = c("3600"), m = c(), U = c(), S = c(), A = c(!1), H = c(!1), V = c(), R = c(""), W = c(""), X = Le(P.ctx);
1012
+ setup(y) {
1013
+ const D = y, a = N(() => qe(D.ctx.locale)), $ = (I, B) => I.replace(/\{(\w+)\}/g, (A, le) => String(B[le] ?? "")), u = p(), r = p([]), n = p(), i = p(!1), o = p(!1), h = p([]), v = p(), w = p(!1), U = p("3600"), c = p(), V = p(), S = p(), E = p(!1), H = p(!1), P = p(), q = p(""), Y = p(""), X = Le(D.ctx);
1007
1014
  let F, L = !1;
1008
1015
  const J = (I) => !["queued", "running"].includes(I.state);
1009
1016
  async function K(I, B) {
1010
1017
  try {
1011
- return await P.ctx.call(I, B);
1012
- } catch (D) {
1018
+ return await D.ctx.call(I, B);
1019
+ } catch (A) {
1013
1020
  if (L) return;
1014
- D?.code === "unsupported" ? (i.value = !0, r.value = [], w.value = [], d.value = void 0, m.value = void 0, U.value = void 0, u.value = void 0, S.value = void 0, V.value = void 0, R.value && URL.revokeObjectURL(R.value), R.value = "") : L || (n.value = D);
1021
+ A?.code === "unsupported" ? (i.value = !0, r.value = [], h.value = [], v.value = void 0, c.value = void 0, V.value = void 0, u.value = void 0, S.value = void 0, P.value = void 0, q.value && URL.revokeObjectURL(q.value), q.value = "") : L || (n.value = A);
1015
1022
  return;
1016
1023
  }
1017
1024
  }
1018
- async function Y() {
1019
- if (!(L || A.value)) {
1020
- A.value = !0;
1025
+ async function W() {
1026
+ if (!(L || E.value)) {
1027
+ E.value = !0;
1021
1028
  try {
1022
1029
  const I = await K("bg.status");
1023
1030
  if (!I || L) return;
@@ -1028,23 +1035,23 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1028
1035
  i.value = !1, u.value = I;
1029
1036
  const B = await K("bg.jobs.list");
1030
1037
  B && !L && (r.value = B.jobs ?? []);
1031
- const D = await K("bg.schedules.list");
1032
- D && !L && (w.value = D.schedules ?? []), !L && r.value.every(J) && w.value.every((le) => !le.enabled) && F && (clearInterval(F), F = void 0);
1038
+ const A = await K("bg.schedules.list");
1039
+ A && !L && (h.value = A.schedules ?? []), !L && r.value.every(J) && h.value.every((le) => !le.enabled) && F && (clearInterval(F), F = void 0);
1033
1040
  } finally {
1034
- A.value = !1;
1041
+ E.value = !1;
1035
1042
  }
1036
1043
  }
1037
1044
  }
1038
- function q() {
1045
+ function R() {
1039
1046
  F || (F = setInterval(() => {
1040
- Y();
1047
+ W();
1041
1048
  }, 3e3));
1042
1049
  }
1043
1050
  async function O(I) {
1044
1051
  if (!o.value) {
1045
1052
  o.value = !0, n.value = void 0;
1046
1053
  try {
1047
- await I(), await Y(), (w.value.some((B) => B.enabled) || r.value.some((B) => !J(B))) && q();
1054
+ await I(), await W(), (h.value.some((B) => B.enabled) || r.value.some((B) => !J(B))) && R();
1048
1055
  } finally {
1049
1056
  L || (o.value = !1);
1050
1057
  }
@@ -1053,109 +1060,109 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1053
1060
  const T = () => O(async () => {
1054
1061
  if (!S.value) return;
1055
1062
  await K("bg.jobs.purge", { owner: S.value }) && (S.value = void 0);
1056
- }), M = N(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), v = (I) => {
1057
- d.value = I, k.value = !1, E.value = "3600";
1058
- }, _ = () => O(async () => {
1059
- if (!d.value || !k.value) return;
1060
- await K("bg.schedules.create", { key: _e(), jobId: d.value.id, intervalSeconds: Number(E.value), consent: !0 }) && (d.value = void 0);
1063
+ }), M = N(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), d = (I) => {
1064
+ v.value = I, w.value = !1, U.value = "3600";
1065
+ }, k = () => O(async () => {
1066
+ if (!v.value || !w.value) return;
1067
+ await K("bg.schedules.create", { key: _e(), jobId: v.value.id, intervalSeconds: Number(U.value), consent: !0 }) && (v.value = void 0);
1061
1068
  }), x = (I) => O(() => K("bg.schedules.disable", { id: I })), G = () => O(async () => {
1062
- if (!m.value) return;
1063
- await K("bg.schedules.delete", { id: m.value.id }) && (m.value = void 0);
1069
+ if (!c.value) return;
1070
+ await K("bg.schedules.delete", { id: c.value.id }) && (c.value = void 0);
1064
1071
  }), Z = () => O(async () => {
1065
- if (!U.value) return;
1066
- await K("bg.schedules.enable", { id: U.value.id, consent: !0 }) && (U.value = void 0);
1072
+ if (!V.value) return;
1073
+ await K("bg.schedules.enable", { id: V.value.id, consent: !0 }) && (V.value = void 0);
1067
1074
  }), ee = (I) => {
1068
1075
  const B = new Date(I);
1069
1076
  return Number.isFinite(B.getTime()) ? B.toLocaleString() : a.value.unknownTime;
1070
1077
  }, me = (I) => I.copyRetained && I.state === "succeeded" && !I.scheduleId && I.submitter?.user === u.value?.owner?.user && I.submitter?.uid === u.value?.owner?.uid, Ae = (I) => O(() => K("bg.jobs.cancel", { id: I })), Ee = (I) => {
1071
1078
  const B = I.lastIndexOf("/");
1072
- V.value = { folder: I.slice(0, B), relative: I.slice(B + 1) };
1079
+ P.value = { folder: I.slice(0, B), relative: I.slice(B + 1) };
1073
1080
  }, Te = () => O(async () => {
1074
- if (!V.value) return;
1075
- await K("bg.jobs.submit", { key: _e(), ...V.value }) && (V.value = void 0);
1081
+ if (!P.value) return;
1082
+ await K("bg.jobs.submit", { key: _e(), ...P.value }) && (P.value = void 0);
1076
1083
  });
1077
1084
  async function Ie(I) {
1078
1085
  const B = await K("bg.jobs.result", { id: I.id });
1079
- !B || L || (R.value && URL.revokeObjectURL(R.value), R.value = URL.createObjectURL(new Blob([JSON.stringify(B.result, null, 2)], { type: "application/json" })), W.value = `${I.name || I.id}.sha256.json`);
1086
+ !B || L || (q.value && URL.revokeObjectURL(q.value), q.value = URL.createObjectURL(new Blob([JSON.stringify(B.result, null, 2)], { type: "application/json" })), Y.value = `${I.name || I.id}.sha256.json`);
1080
1087
  }
1081
1088
  return ie(() => {
1082
- Y().then(() => {
1083
- (w.value.some((I) => I.enabled) || r.value.some((I) => !J(I))) && q();
1089
+ W().then(() => {
1090
+ (h.value.some((I) => I.enabled) || r.value.some((I) => !J(I))) && R();
1084
1091
  });
1085
1092
  }), se(() => {
1086
- L = !0, X.dispose(), F && clearInterval(F), R.value && URL.revokeObjectURL(R.value);
1087
- }), (I, B) => (t(), h(e(de), {
1088
- "aria-busy": o.value || A.value,
1093
+ L = !0, X.dispose(), F && clearInterval(F), q.value && URL.revokeObjectURL(q.value);
1094
+ }), (I, B) => (t(), g(e(de), {
1095
+ "aria-busy": o.value || E.value,
1089
1096
  title: a.value.title,
1090
1097
  collapsible: !1,
1091
1098
  "data-background-panel": ""
1092
1099
  }, {
1093
1100
  default: s(() => [
1094
- i.value ? (t(), h(e(Q), {
1101
+ i.value ? (t(), g(e(Q), {
1095
1102
  key: 0,
1096
1103
  tone: "warning"
1097
1104
  }, {
1098
1105
  default: s(() => [
1099
- p(l(a.value.unsupported), 1)
1106
+ f(l(a.value.unsupported), 1)
1100
1107
  ]),
1101
1108
  _: 1
1102
1109
  })) : (t(), C(j, { key: 1 }, [
1103
- g("p", Ba, l(a.value.help), 1),
1104
- n.value ? (t(), h(e(Q), {
1110
+ _("p", Fa, l(a.value.help), 1),
1111
+ n.value ? (t(), g(e(Q), {
1105
1112
  key: 0,
1106
1113
  tone: "danger",
1107
1114
  role: "alert"
1108
1115
  }, {
1109
1116
  default: s(() => [
1110
- p(l(e(Be)(n.value, a.value)), 1)
1117
+ f(l(e(Be)(n.value, a.value)), 1)
1111
1118
  ]),
1112
1119
  _: 1
1113
- })) : y("", !0),
1120
+ })) : m("", !0),
1114
1121
  u.value ? (t(), C(j, { key: 1 }, [
1115
- g("p", Fa, l(u.value.worker?.alive ? $(a.value.workerRunning, { user: u.value.worker.username }) : a.value.workerStopped), 1),
1116
- g("p", Na, l($(a.value.limits, { size: u.value.limits.maxInputBytes / 1024, queue: u.value.limits.maxQueued, seconds: u.value.limits.jobTimeoutSeconds })), 1),
1117
- g("p", Ma, l(u.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1118
- g("p", Ha, l($(a.value.ownerLimits, { jobs: u.value.limits.maxOwnerPending, size: u.value.limits.maxOwnerBytes / 1024 })), 1),
1119
- g("div", Ka, [
1122
+ _("p", Na, l(u.value.worker?.alive ? $(a.value.workerRunning, { user: u.value.worker.username }) : a.value.workerStopped), 1),
1123
+ _("p", Ma, l($(a.value.limits, { size: u.value.limits.maxInputBytes / 1024, queue: u.value.limits.maxQueued, seconds: u.value.limits.jobTimeoutSeconds })), 1),
1124
+ _("p", Ha, l(u.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1125
+ _("p", Ka, l($(a.value.ownerLimits, { jobs: u.value.limits.maxOwnerPending, size: u.value.limits.maxOwnerBytes / 1024 })), 1),
1126
+ _("div", Ja, [
1120
1127
  b(e(z), {
1121
1128
  variant: "secondary",
1122
1129
  disabled: o.value,
1123
- onClick: Y
1130
+ onClick: W
1124
1131
  }, {
1125
1132
  default: s(() => [
1126
- p(l(a.value.refresh), 1)
1133
+ f(l(a.value.refresh), 1)
1127
1134
  ]),
1128
1135
  _: 1
1129
1136
  }, 8, ["disabled"])
1130
1137
  ]),
1131
- g("template", null, [
1132
- g("div", Ja, [
1138
+ _("template", null, [
1139
+ _("div", Xa, [
1133
1140
  b(e(z), {
1134
1141
  variant: "secondary",
1135
1142
  disabled: o.value,
1136
- onClick: B[0] || (B[0] = (D) => H.value = !0)
1143
+ onClick: B[0] || (B[0] = (A) => H.value = !0)
1137
1144
  }, {
1138
1145
  default: s(() => [
1139
- p(l(a.value.chooseFile), 1)
1146
+ f(l(a.value.chooseFile), 1)
1140
1147
  ]),
1141
1148
  _: 1
1142
1149
  }, 8, ["disabled"]),
1143
1150
  b(e(z), {
1144
1151
  variant: "primary",
1145
- disabled: o.value || !V.value,
1152
+ disabled: o.value || !P.value,
1146
1153
  onClick: Te
1147
1154
  }, {
1148
1155
  default: s(() => [
1149
- p(l(a.value.submit), 1)
1156
+ f(l(a.value.submit), 1)
1150
1157
  ]),
1151
1158
  _: 1
1152
1159
  }, 8, ["disabled"])
1153
1160
  ]),
1154
- V.value ? (t(), C("p", Xa, l($(a.value.chosen, { path: `${V.value.folder}/${V.value.relative}` })), 1)) : y("", !0),
1161
+ P.value ? (t(), C("p", Ga, l($(a.value.chosen, { path: `${P.value.folder}/${P.value.relative}` })), 1)) : m("", !0),
1155
1162
  b(ye, {
1156
1163
  open: H.value,
1157
- "onUpdate:open": B[1] || (B[1] = (D) => H.value = D),
1158
- locale: f.ctx.locale,
1164
+ "onUpdate:open": B[1] || (B[1] = (A) => H.value = A),
1165
+ locale: y.ctx.locale,
1159
1166
  provider: e(X),
1160
1167
  mode: "file",
1161
1168
  title: a.value.pickerTitle,
@@ -1163,113 +1170,113 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1163
1170
  onSelected: Ee
1164
1171
  }, null, 8, ["open", "locale", "provider", "title", "description"])
1165
1172
  ]),
1166
- S.value && u.value.admin ? (t(), h(e(Q), {
1173
+ S.value && u.value.admin ? (t(), g(e(Q), {
1167
1174
  key: 0,
1168
1175
  tone: "warning"
1169
1176
  }, {
1170
1177
  default: s(() => [
1171
- g("p", null, l($(a.value.purgeConfirm, { user: S.value.user, uid: S.value.uid })), 1),
1172
- g("div", Ga, [
1178
+ _("p", null, l($(a.value.purgeConfirm, { user: S.value.user, uid: S.value.uid })), 1),
1179
+ _("div", Qa, [
1173
1180
  b(e(z), {
1174
1181
  variant: "secondary",
1175
1182
  disabled: o.value,
1176
1183
  onClick: T
1177
1184
  }, {
1178
1185
  default: s(() => [
1179
- p(l(a.value.confirmPurge), 1)
1186
+ f(l(a.value.confirmPurge), 1)
1180
1187
  ]),
1181
1188
  _: 1
1182
1189
  }, 8, ["disabled"]),
1183
1190
  b(e(z), {
1184
1191
  variant: "secondary",
1185
1192
  disabled: o.value,
1186
- onClick: B[2] || (B[2] = (D) => S.value = void 0)
1193
+ onClick: B[2] || (B[2] = (A) => S.value = void 0)
1187
1194
  }, {
1188
1195
  default: s(() => [
1189
- p(l(a.value.keepJobs), 1)
1196
+ f(l(a.value.keepJobs), 1)
1190
1197
  ]),
1191
1198
  _: 1
1192
1199
  }, 8, ["disabled"])
1193
1200
  ])
1194
1201
  ]),
1195
1202
  _: 1
1196
- })) : y("", !0),
1203
+ })) : m("", !0),
1197
1204
  r.value.length ? (t(), C("ul", Wa, [
1198
- (t(!0), C(j, null, te(r.value, (D) => (t(), C("li", {
1199
- key: D.id,
1200
- "data-job-state": D.state,
1201
- "data-job-id": D.id
1205
+ (t(!0), C(j, null, te(r.value, (A) => (t(), C("li", {
1206
+ key: A.id,
1207
+ "data-job-state": A.state,
1208
+ "data-job-id": A.id
1202
1209
  }, [
1203
- g("span", Za, l(D.name) + " — " + l(a.value[`state_${D.state}`]), 1),
1204
- u.value.admin && D.submitter ? (t(), C("span", ja, l($(a.value.owner, { user: D.submitter.user, uid: D.submitter.uid })), 1)) : y("", !0),
1205
- u.value.admin && D.submitter ? (t(), h(e(z), {
1210
+ _("span", ja, l(A.name) + " — " + l(a.value[`state_${A.state}`]), 1),
1211
+ u.value.admin && A.submitter ? (t(), C("span", el, l($(a.value.owner, { user: A.submitter.user, uid: A.submitter.uid })), 1)) : m("", !0),
1212
+ u.value.admin && A.submitter ? (t(), g(e(z), {
1206
1213
  key: 1,
1207
1214
  variant: "secondary",
1208
1215
  disabled: o.value,
1209
- onClick: (le) => S.value = D.submitter
1216
+ onClick: (le) => S.value = A.submitter
1210
1217
  }, {
1211
1218
  default: s(() => [
1212
- p(l(a.value.purgeOwner), 1)
1219
+ f(l(a.value.purgeOwner), 1)
1213
1220
  ]),
1214
1221
  _: 1
1215
- }, 8, ["disabled", "onClick"])) : y("", !0),
1216
- J(D) ? y("", !0) : (t(), h(e(z), {
1222
+ }, 8, ["disabled", "onClick"])) : m("", !0),
1223
+ J(A) ? m("", !0) : (t(), g(e(z), {
1217
1224
  key: 2,
1218
1225
  variant: "secondary",
1219
1226
  disabled: o.value,
1220
- onClick: (le) => Ae(D.id)
1227
+ onClick: (le) => Ae(A.id)
1221
1228
  }, {
1222
1229
  default: s(() => [
1223
- p(l(a.value.cancel), 1)
1230
+ f(l(a.value.cancel), 1)
1224
1231
  ]),
1225
1232
  _: 1
1226
1233
  }, 8, ["disabled", "onClick"])),
1227
- me(D) ? (t(), h(e(z), {
1234
+ me(A) ? (t(), g(e(z), {
1228
1235
  key: 3,
1229
1236
  variant: "secondary",
1230
1237
  disabled: o.value,
1231
- onClick: (le) => v(D)
1238
+ onClick: (le) => d(A)
1232
1239
  }, {
1233
1240
  default: s(() => [
1234
- p(l(a.value.scheduleCopy), 1)
1241
+ f(l(a.value.scheduleCopy), 1)
1235
1242
  ]),
1236
1243
  _: 1
1237
- }, 8, ["disabled", "onClick"])) : y("", !0),
1238
- D.scheduleId ? (t(), C("span", el, l(a.value.scheduledJob), 1)) : y("", !0),
1239
- D.state === "succeeded" ? (t(), h(e(z), {
1244
+ }, 8, ["disabled", "onClick"])) : m("", !0),
1245
+ A.scheduleId ? (t(), C("span", al, l(a.value.scheduledJob), 1)) : m("", !0),
1246
+ A.state === "succeeded" ? (t(), g(e(z), {
1240
1247
  key: 5,
1241
1248
  variant: "secondary",
1242
1249
  disabled: o.value,
1243
- onClick: (le) => Ie(D)
1250
+ onClick: (le) => Ie(A)
1244
1251
  }, {
1245
1252
  default: s(() => [
1246
- p(l(a.value.result), 1)
1253
+ f(l(a.value.result), 1)
1247
1254
  ]),
1248
1255
  _: 1
1249
- }, 8, ["disabled", "onClick"])) : y("", !0)
1250
- ], 8, Ya))), 128))
1251
- ])) : (t(), C("p", Qa, l(a.value.noJobs), 1)),
1252
- g("section", {
1256
+ }, 8, ["disabled", "onClick"])) : m("", !0)
1257
+ ], 8, Za))), 128))
1258
+ ])) : (t(), C("p", Ya, l(a.value.noJobs), 1)),
1259
+ _("section", {
1253
1260
  "data-bg-schedules": "",
1254
1261
  class: "bg-schedules",
1255
1262
  "aria-label": a.value.schedulesTitle
1256
1263
  }, [
1257
- g("h3", null, l(a.value.schedulesTitle), 1),
1258
- g("p", ll, l(a.value.scheduleHelp), 1),
1259
- d.value ? (t(), h(e(pe), {
1264
+ _("h3", null, l(a.value.schedulesTitle), 1),
1265
+ _("p", tl, l(a.value.scheduleHelp), 1),
1266
+ v.value ? (t(), g(e(pe), {
1260
1267
  key: 0,
1261
1268
  class: "bg-schedule-form",
1262
- onSubmit: ce(_, ["prevent"])
1269
+ onSubmit: ce(k, ["prevent"])
1263
1270
  }, {
1264
1271
  default: s(() => [
1265
- g("p", null, l($(a.value.scheduleSource, { name: d.value.name })), 1),
1272
+ _("p", null, l($(a.value.scheduleSource, { name: v.value.name })), 1),
1266
1273
  b(e(ne), {
1267
1274
  label: a.value.interval
1268
1275
  }, {
1269
1276
  default: s(() => [
1270
- b(e(Pe), {
1271
- modelValue: E.value,
1272
- "onUpdate:modelValue": B[3] || (B[3] = (D) => E.value = D),
1277
+ b(e(Ue), {
1278
+ modelValue: U.value,
1279
+ "onUpdate:modelValue": B[3] || (B[3] = (A) => U.value = A),
1273
1280
  "data-schedule-interval": "",
1274
1281
  options: M.value,
1275
1282
  disabled: o.value
@@ -1278,8 +1285,8 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1278
1285
  _: 1
1279
1286
  }, 8, ["label"]),
1280
1287
  b(e(ea), {
1281
- modelValue: k.value,
1282
- "onUpdate:modelValue": B[4] || (B[4] = (D) => k.value = D),
1288
+ modelValue: w.value,
1289
+ "onUpdate:modelValue": B[4] || (B[4] = (A) => w.value = A),
1283
1290
  "data-schedule-consent": "",
1284
1291
  disabled: o.value,
1285
1292
  label: a.value.scheduleConsent
@@ -1289,10 +1296,10 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1289
1296
  b(e(z), {
1290
1297
  type: "submit",
1291
1298
  variant: "primary",
1292
- disabled: o.value || !k.value
1299
+ disabled: o.value || !w.value
1293
1300
  }, {
1294
1301
  default: s(() => [
1295
- p(l(a.value.createSchedule), 1)
1302
+ f(l(a.value.createSchedule), 1)
1296
1303
  ]),
1297
1304
  _: 1
1298
1305
  }, 8, ["disabled"]),
@@ -1300,10 +1307,10 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1300
1307
  type: "button",
1301
1308
  variant: "secondary",
1302
1309
  disabled: o.value,
1303
- onClick: B[5] || (B[5] = (D) => d.value = void 0)
1310
+ onClick: B[5] || (B[5] = (A) => v.value = void 0)
1304
1311
  }, {
1305
1312
  default: s(() => [
1306
- p(l(a.value.cancel), 1)
1313
+ f(l(a.value.cancel), 1)
1307
1314
  ]),
1308
1315
  _: 1
1309
1316
  }, 8, ["disabled"])
@@ -1312,148 +1319,148 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1312
1319
  })
1313
1320
  ]),
1314
1321
  _: 1
1315
- })) : y("", !0),
1316
- w.value.length ? (t(), C("ul", nl, [
1317
- (t(!0), C(j, null, te(w.value, (D) => (t(), C("li", {
1318
- key: D.id,
1319
- "data-schedule-id": D.id
1322
+ })) : m("", !0),
1323
+ h.value.length ? (t(), C("ul", sl, [
1324
+ (t(!0), C(j, null, te(h.value, (A) => (t(), C("li", {
1325
+ key: A.id,
1326
+ "data-schedule-id": A.id
1320
1327
  }, [
1321
- g("span", ul, l(D.name) + " — " + l(D.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1),
1322
- u.value.admin ? (t(), C("span", il, l($(a.value.owner, { user: D.owner.user, uid: D.owner.uid })), 1)) : y("", !0),
1323
- D.enabled ? (t(), C("span", ol, l($(a.value.nextRun, { time: ee(D.nextAt) })), 1)) : y("", !0),
1324
- g("span", rl, l($(a.value.missedRuns, { count: D.missed })), 1),
1325
- D.reason === "worker-changed" ? (t(), h(e(Q), {
1328
+ _("span", il, l(A.name) + " — " + l(A.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1),
1329
+ u.value.admin ? (t(), C("span", ol, l($(a.value.owner, { user: A.owner.user, uid: A.owner.uid })), 1)) : m("", !0),
1330
+ A.enabled ? (t(), C("span", rl, l($(a.value.nextRun, { time: ee(A.nextAt) })), 1)) : m("", !0),
1331
+ _("span", dl, l($(a.value.missedRuns, { count: A.missed })), 1),
1332
+ A.reason === "worker-changed" ? (t(), g(e(Q), {
1326
1333
  key: 2,
1327
1334
  tone: "warning"
1328
1335
  }, {
1329
1336
  default: s(() => [
1330
- p(l(a.value.revisionChanged), 1)
1337
+ f(l(a.value.revisionChanged), 1)
1331
1338
  ]),
1332
1339
  _: 1
1333
- })) : D.reason === "input-unavailable" ? (t(), h(e(Q), {
1340
+ })) : A.reason === "input-unavailable" ? (t(), g(e(Q), {
1334
1341
  key: 3,
1335
1342
  tone: "warning"
1336
1343
  }, {
1337
1344
  default: s(() => [
1338
- p(l(a.value.errors["input-unavailable"]), 1)
1345
+ f(l(a.value.errors["input-unavailable"]), 1)
1339
1346
  ]),
1340
1347
  _: 1
1341
- })) : y("", !0),
1342
- g("div", dl, [
1343
- D.enabled ? (t(), h(e(z), {
1348
+ })) : m("", !0),
1349
+ _("div", vl, [
1350
+ A.enabled ? (t(), g(e(z), {
1344
1351
  key: 0,
1345
1352
  variant: "secondary",
1346
1353
  disabled: o.value,
1347
- onClick: (le) => x(D.id)
1354
+ onClick: (le) => x(A.id)
1348
1355
  }, {
1349
1356
  default: s(() => [
1350
- p(l(a.value.disableSchedule), 1)
1357
+ f(l(a.value.disableSchedule), 1)
1351
1358
  ]),
1352
1359
  _: 1
1353
- }, 8, ["disabled", "onClick"])) : u.value.admin ? (t(), h(e(z), {
1360
+ }, 8, ["disabled", "onClick"])) : u.value.admin ? (t(), g(e(z), {
1354
1361
  key: 1,
1355
1362
  variant: "secondary",
1356
1363
  disabled: o.value,
1357
- onClick: (le) => U.value = D
1364
+ onClick: (le) => V.value = A
1358
1365
  }, {
1359
1366
  default: s(() => [
1360
- p(l(a.value.enableSchedule), 1)
1367
+ f(l(a.value.enableSchedule), 1)
1361
1368
  ]),
1362
1369
  _: 1
1363
- }, 8, ["disabled", "onClick"])) : y("", !0),
1370
+ }, 8, ["disabled", "onClick"])) : m("", !0),
1364
1371
  b(e(z), {
1365
1372
  variant: "secondary",
1366
1373
  disabled: o.value,
1367
- onClick: (le) => m.value = D
1374
+ onClick: (le) => c.value = A
1368
1375
  }, {
1369
1376
  default: s(() => [
1370
- p(l(a.value.deleteSchedule), 1)
1377
+ f(l(a.value.deleteSchedule), 1)
1371
1378
  ]),
1372
1379
  _: 1
1373
1380
  }, 8, ["disabled", "onClick"])
1374
1381
  ])
1375
- ], 8, sl))), 128))
1376
- ])) : (t(), C("p", tl, l(a.value.noSchedules), 1)),
1377
- m.value ? (t(), h(e(Q), {
1382
+ ], 8, ul))), 128))
1383
+ ])) : (t(), C("p", nl, l(a.value.noSchedules), 1)),
1384
+ c.value ? (t(), g(e(Q), {
1378
1385
  key: 3,
1379
1386
  tone: "warning"
1380
1387
  }, {
1381
1388
  default: s(() => [
1382
- g("p", null, l($(a.value.deleteScheduleConsent, { name: m.value.name })), 1),
1383
- g("div", vl, [
1389
+ _("p", null, l($(a.value.deleteScheduleConsent, { name: c.value.name })), 1),
1390
+ _("div", cl, [
1384
1391
  b(e(z), {
1385
1392
  variant: "danger",
1386
1393
  disabled: o.value,
1387
1394
  onClick: G
1388
1395
  }, {
1389
1396
  default: s(() => [
1390
- p(l(a.value.confirmDeleteSchedule), 1)
1397
+ f(l(a.value.confirmDeleteSchedule), 1)
1391
1398
  ]),
1392
1399
  _: 1
1393
1400
  }, 8, ["disabled"]),
1394
1401
  b(e(z), {
1395
1402
  variant: "secondary",
1396
1403
  disabled: o.value,
1397
- onClick: B[6] || (B[6] = (D) => m.value = void 0)
1404
+ onClick: B[6] || (B[6] = (A) => c.value = void 0)
1398
1405
  }, {
1399
1406
  default: s(() => [
1400
- p(l(a.value.cancel), 1)
1407
+ f(l(a.value.cancel), 1)
1401
1408
  ]),
1402
1409
  _: 1
1403
1410
  }, 8, ["disabled"])
1404
1411
  ])
1405
1412
  ]),
1406
1413
  _: 1
1407
- })) : y("", !0),
1408
- U.value ? (t(), h(e(Q), {
1414
+ })) : m("", !0),
1415
+ V.value ? (t(), g(e(Q), {
1409
1416
  key: 4,
1410
1417
  tone: "warning"
1411
1418
  }, {
1412
1419
  default: s(() => [
1413
- g("p", null, l($(a.value.enableScheduleConsent, { name: U.value.name })), 1),
1414
- g("div", cl, [
1420
+ _("p", null, l($(a.value.enableScheduleConsent, { name: V.value.name })), 1),
1421
+ _("div", pl, [
1415
1422
  b(e(z), {
1416
1423
  variant: "primary",
1417
1424
  disabled: o.value,
1418
1425
  onClick: Z
1419
1426
  }, {
1420
1427
  default: s(() => [
1421
- p(l(a.value.confirmEnableSchedule), 1)
1428
+ f(l(a.value.confirmEnableSchedule), 1)
1422
1429
  ]),
1423
1430
  _: 1
1424
1431
  }, 8, ["disabled"]),
1425
1432
  b(e(z), {
1426
1433
  variant: "secondary",
1427
1434
  disabled: o.value,
1428
- onClick: B[7] || (B[7] = (D) => U.value = void 0)
1435
+ onClick: B[7] || (B[7] = (A) => V.value = void 0)
1429
1436
  }, {
1430
1437
  default: s(() => [
1431
- p(l(a.value.cancel), 1)
1438
+ f(l(a.value.cancel), 1)
1432
1439
  ]),
1433
1440
  _: 1
1434
1441
  }, 8, ["disabled"])
1435
1442
  ])
1436
1443
  ]),
1437
1444
  _: 1
1438
- })) : y("", !0)
1439
- ], 8, al),
1440
- R.value ? (t(), h(e(Ue), {
1445
+ })) : m("", !0)
1446
+ ], 8, ll),
1447
+ q.value ? (t(), g(e(Pe), {
1441
1448
  key: 3,
1442
- href: R.value,
1443
- download: W.value
1449
+ href: q.value,
1450
+ download: Y.value
1444
1451
  }, {
1445
1452
  default: s(() => [
1446
- p(l(a.value.download), 1)
1453
+ f(l(a.value.download), 1)
1447
1454
  ]),
1448
1455
  _: 1
1449
- }, 8, ["href", "download"])) : y("", !0)
1450
- ], 64)) : y("", !0)
1456
+ }, 8, ["href", "download"])) : m("", !0)
1457
+ ], 64)) : m("", !0)
1451
1458
  ], 64))
1452
1459
  ]),
1453
1460
  _: 1
1454
1461
  }, 8, ["aria-busy", "title"]));
1455
1462
  }
1456
- }), ot = /* @__PURE__ */ ue(pl, [["__scopeId", "data-v-7954713f"]]), fl = { role: "status" }, yl = { key: 1 }, ml = { key: 2 }, rt = /* @__PURE__ */ ae({
1463
+ }), rt = /* @__PURE__ */ ue(fl, [["__scopeId", "data-v-7954713f"]]), yl = { role: "status" }, ml = { key: 1 }, bl = { key: 2 }, dt = /* @__PURE__ */ ae({
1457
1464
  __name: "ExecutorSettings",
1458
1465
  props: {
1459
1466
  admin: { type: Boolean },
@@ -1461,112 +1468,112 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1461
1468
  ctx: {}
1462
1469
  },
1463
1470
  emits: ["confirmed"],
1464
- setup(f, { emit: P }) {
1465
- const a = f, $ = P, u = ia(), r = N(() => xe(a.locale)), n = c(), i = c(""), o = c(!1), w = c(!1), d = c(), k = c(""), E = c([]), m = N(() => d.value?.scope_mode === "install-selected"), U = N(() => [{ label: r.value.homeScope, value: "home" }, ...E.value]), S = N(() => !m.value || !!k.value && U.value.some((F) => F.value === k.value)), A = N(() => m.value && !d.value?.selection), H = N(() => k.value !== d.value?.selection?.scope);
1466
- let V = !1;
1467
- async function R(F) {
1471
+ setup(y, { emit: D }) {
1472
+ const a = y, $ = D, u = ia(), r = N(() => xe(a.locale)), n = p(), i = p(""), o = p(!1), h = p(!1), v = p(), w = p(""), U = p([]), c = N(() => v.value?.scope_mode === "install-selected"), V = N(() => [{ label: r.value.homeScope, value: "home" }, ...U.value]), S = N(() => !c.value || !!w.value && V.value.some((F) => F.value === w.value)), E = N(() => c.value && !v.value?.selection), H = N(() => w.value !== v.value?.selection?.scope);
1473
+ let P = !1;
1474
+ async function q(F) {
1468
1475
  const L = F ?? await u.status();
1469
- if (V || (n.value = L, !a.ctx)) return;
1476
+ if (P || (n.value = L, !a.ctx)) return;
1470
1477
  const J = await a.ctx.call("delegate.status");
1471
- if (V || (d.value = J, J.scope_mode !== "install-selected")) return;
1478
+ if (P || (v.value = J, J.scope_mode !== "install-selected")) return;
1472
1479
  const K = [];
1473
- let Y = 0;
1474
- for (let q = 0; q < 128; q++) {
1475
- const O = await a.ctx.call("bg.browse", { offset: Y });
1476
- if (V) return;
1477
- if (!Array.isArray(O.shares) || !Number.isSafeInteger(O.total) || O.total < 0 || !O.shares.length && Y < O.total) throw { code: "EXECUTOR_PROTOCOL" };
1480
+ let W = 0;
1481
+ for (let R = 0; R < 128; R++) {
1482
+ const O = await a.ctx.call("bg.browse", { offset: W });
1483
+ if (P) return;
1484
+ if (!Array.isArray(O.shares) || !Number.isSafeInteger(O.total) || O.total < 0 || !O.shares.length && W < O.total) throw { code: "EXECUTOR_PROTOCOL" };
1478
1485
  for (const T of O.shares)
1479
1486
  T.isdir && T.path === "/" + T.name && !["home", "homes"].includes(T.name.toLowerCase()) && K.push({ label: T.name, value: "shared:" + T.name });
1480
- if (Y += O.shares.length, Y >= O.total) break;
1481
- if (q === 127) throw { code: "EXECUTOR_PROTOCOL" };
1487
+ if (W += O.shares.length, W >= O.total) break;
1488
+ if (R === 127) throw { code: "EXECUTOR_PROTOCOL" };
1482
1489
  }
1483
- E.value = K, k.value = J.selection?.scope ?? J.preselection ?? "";
1490
+ U.value = K, w.value = J.selection?.scope ?? J.preselection ?? "";
1484
1491
  }
1485
- async function W() {
1492
+ async function Y() {
1486
1493
  if (!(!a.admin || o.value)) {
1487
- o.value = !0, w.value = !1;
1494
+ o.value = !0, h.value = !1;
1488
1495
  try {
1489
- await R();
1496
+ await q();
1490
1497
  } catch {
1491
- V || (w.value = !0);
1498
+ P || (h.value = !0);
1492
1499
  } finally {
1493
- V || (o.value = !1);
1500
+ P || (o.value = !1);
1494
1501
  }
1495
1502
  }
1496
1503
  }
1497
1504
  async function X() {
1498
- if (!a.admin || o.value || !i.value || !S.value || w.value) return;
1499
- o.value = !0, w.value = !1;
1505
+ if (!a.admin || o.value || !i.value || !S.value || h.value) return;
1506
+ o.value = !0, h.value = !1;
1500
1507
  const F = i.value;
1501
1508
  i.value = "";
1502
1509
  try {
1503
- const L = m.value ? await u.authorize(F, k.value) : await u.authorize(F);
1504
- await R(L), V || $("confirmed");
1510
+ const L = c.value ? await u.authorize(F, w.value) : await u.authorize(F);
1511
+ await q(L), P || $("confirmed");
1505
1512
  } catch {
1506
- V || (w.value = !0);
1513
+ P || (h.value = !0);
1507
1514
  } finally {
1508
- V || (o.value = !1);
1515
+ P || (o.value = !1);
1509
1516
  }
1510
1517
  }
1511
1518
  return ie(() => {
1512
1519
  u.subscribe?.((F) => {
1513
- V || (n.value = F);
1514
- }), W();
1520
+ P || (n.value = F);
1521
+ }), Y();
1515
1522
  }), se(() => {
1516
- V = !0, i.value = "";
1517
- }), (F, L) => f.admin ? (t(), h(e(de), {
1523
+ P = !0, i.value = "";
1524
+ }), (F, L) => y.admin ? (t(), g(e(de), {
1518
1525
  key: 0,
1519
1526
  title: r.value.setupTitle,
1520
1527
  collapsible: !1,
1521
1528
  "aria-busy": o.value
1522
1529
  }, {
1523
1530
  default: s(() => [
1524
- g("p", null, l(r.value.setupHelp), 1),
1525
- w.value ? (t(), h(e(Q), {
1531
+ _("p", null, l(r.value.setupHelp), 1),
1532
+ h.value ? (t(), g(e(Q), {
1526
1533
  key: 0,
1527
1534
  tone: "danger",
1528
1535
  role: "alert"
1529
1536
  }, {
1530
1537
  default: s(() => [
1531
- p(l(r.value.setupError), 1)
1538
+ f(l(r.value.setupError), 1)
1532
1539
  ]),
1533
1540
  _: 1
1534
- })) : y("", !0),
1535
- g("p", fl, l(n.value?.state === "ready" ? A.value ? r.value.scopeNeeds : r.value.ready : n.value?.state === "needs-admin-approval" ? r.value.needs : r.value.blocked), 1),
1536
- n.value?.reason && (n.value.state === "blocked" || n.value.state === "unsupported") ? (t(), C("p", yl, l(r.value.details) + ": " + l(n.value.reason), 1)) : y("", !0),
1537
- d.value?.selection ? (t(), C("p", ml, l(r.value.protectedScope) + ": " + l(d.value.selection.root), 1)) : y("", !0),
1538
- d.value?.mismatch ? (t(), h(e(Q), {
1541
+ })) : m("", !0),
1542
+ _("p", yl, l(n.value ? n.value.state === "ready" ? E.value ? r.value.scopeNeeds : r.value.ready : n.value.state === "needs-admin-approval" ? r.value.needs : r.value.blocked : r.value.loading), 1),
1543
+ n.value?.reason && (n.value.state === "blocked" || n.value.state === "unsupported") ? (t(), C("p", ml, l(r.value.details) + ": " + l(n.value.reason), 1)) : m("", !0),
1544
+ v.value?.selection ? (t(), C("p", bl, l(r.value.protectedScope) + ": " + l(v.value.selection.root), 1)) : m("", !0),
1545
+ v.value?.mismatch ? (t(), g(e(Q), {
1539
1546
  key: 3,
1540
1547
  tone: "warning"
1541
1548
  }, {
1542
1549
  default: s(() => [
1543
- p(l(r.value.scopeMismatch) + " " + l(r.value.preselection) + ": " + l(d.value.preselection) + " · " + l(r.value.protectedScope) + ": " + l(d.value.selection?.root), 1)
1550
+ f(l(r.value.scopeMismatch) + " " + l(r.value.preselection) + ": " + l(v.value.preselection) + " · " + l(r.value.protectedScope) + ": " + l(v.value.selection?.root), 1)
1544
1551
  ]),
1545
1552
  _: 1
1546
- })) : y("", !0),
1547
- n.value?.state === "needs-admin-approval" || n.value?.retry || m.value && n.value?.state === "ready" ? (t(), h(e(pe), {
1553
+ })) : m("", !0),
1554
+ n.value?.state === "needs-admin-approval" || n.value?.retry || c.value && n.value?.state === "ready" ? (t(), g(e(pe), {
1548
1555
  key: 4,
1549
1556
  onSubmit: ce(X, ["prevent"])
1550
1557
  }, {
1551
1558
  default: s(() => [
1552
- m.value ? (t(), C(j, { key: 0 }, [
1553
- g("p", null, l(d.value?.selection ? r.value.scopeChangeHelp : r.value.preselectionHelp), 1),
1559
+ c.value ? (t(), C(j, { key: 0 }, [
1560
+ _("p", null, l(v.value?.selection ? r.value.scopeChangeHelp : r.value.preselectionHelp), 1),
1554
1561
  b(e(ne), {
1555
1562
  label: r.value.scopeLabel,
1556
1563
  "label-for": "delegate-scope"
1557
1564
  }, {
1558
1565
  default: s(() => [
1559
- b(e(Pe), {
1566
+ b(e(Ue), {
1560
1567
  id: "delegate-scope",
1561
- modelValue: k.value,
1562
- "onUpdate:modelValue": L[0] || (L[0] = (J) => k.value = J),
1563
- options: U.value,
1564
- disabled: o.value || w.value
1568
+ modelValue: w.value,
1569
+ "onUpdate:modelValue": L[0] || (L[0] = (J) => w.value = J),
1570
+ options: V.value,
1571
+ disabled: o.value || h.value
1565
1572
  }, null, 8, ["modelValue", "options", "disabled"])
1566
1573
  ]),
1567
1574
  _: 1
1568
1575
  }, 8, ["label"])
1569
- ], 64)) : y("", !0),
1576
+ ], 64)) : m("", !0),
1570
1577
  b(e(ne), {
1571
1578
  label: r.value.password,
1572
1579
  "label-for": "delegate-password"
@@ -1578,7 +1585,7 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1578
1585
  "onUpdate:modelValue": L[1] || (L[1] = (J) => i.value = J),
1579
1586
  type: "password",
1580
1587
  autocomplete: "current-password",
1581
- disabled: o.value || w.value
1588
+ disabled: o.value || h.value
1582
1589
  }, null, 8, ["modelValue", "disabled"])
1583
1590
  ]),
1584
1591
  _: 1
@@ -1588,10 +1595,10 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1588
1595
  b(e(z), {
1589
1596
  type: "submit",
1590
1597
  variant: "primary",
1591
- disabled: o.value || w.value || !i.value || !S.value || m.value && !!d.value?.selection && !H.value
1598
+ disabled: o.value || h.value || !i.value || !S.value || c.value && !!v.value?.selection && !H.value
1592
1599
  }, {
1593
1600
  default: s(() => [
1594
- p(l(m.value ? d.value?.selection ? r.value.confirmScope : r.value.confirmShare : r.value.authorize), 1)
1601
+ f(l(c.value ? v.value?.selection ? r.value.confirmScope : r.value.confirmShare : r.value.authorize), 1)
1595
1602
  ]),
1596
1603
  _: 1
1597
1604
  }, 8, ["disabled"])
@@ -1600,106 +1607,106 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1600
1607
  })
1601
1608
  ]),
1602
1609
  _: 1
1603
- })) : y("", !0),
1610
+ })) : m("", !0),
1604
1611
  b(e(z), {
1605
1612
  variant: "secondary",
1606
1613
  disabled: o.value,
1607
- onClick: W
1614
+ onClick: Y
1608
1615
  }, {
1609
1616
  default: s(() => [
1610
- p(l(r.value.refresh), 1)
1617
+ f(l(r.value.refresh), 1)
1611
1618
  ]),
1612
1619
  _: 1
1613
1620
  }, 8, ["disabled"])
1614
1621
  ]),
1615
1622
  _: 1
1616
- }, 8, ["title", "aria-busy"])) : y("", !0);
1623
+ }, 8, ["title", "aria-busy"])) : m("", !0);
1617
1624
  }
1618
- }), bl = {
1625
+ }), kl = {
1619
1626
  key: 1,
1620
1627
  role: "status"
1621
- }, kl = {
1628
+ }, _l = {
1622
1629
  key: 2,
1623
1630
  role: "status"
1624
- }, _l = {
1631
+ }, gl = {
1625
1632
  key: 0,
1626
1633
  role: "status",
1627
1634
  class: "destination"
1628
- }, gl = { class: "section-heading" }, hl = { key: 3 }, wl = {
1635
+ }, hl = { class: "section-heading" }, wl = { key: 3 }, Cl = {
1629
1636
  key: 4,
1630
1637
  class: "records"
1631
- }, Cl = ["data-job-state"], $l = ["role"], xl = { key: 5 }, Sl = {
1638
+ }, $l = ["data-job-state"], xl = ["role"], Sl = { key: 5 }, zl = {
1632
1639
  key: 6,
1633
1640
  class: "records"
1634
- }, zl = /* @__PURE__ */ ae({
1641
+ }, Vl = /* @__PURE__ */ ae({
1635
1642
  __name: "DelegatePanel",
1636
1643
  props: {
1637
1644
  ctx: {}
1638
1645
  },
1639
- setup(f) {
1640
- const P = f, a = N(() => xe(P.ctx.locale)), $ = $e(P.ctx), u = c(), r = c([]), n = c([]), i = c(!1), o = c(), w = c(""), d = c(!1), k = c(""), E = c(""), m = c("");
1641
- let U = !1, S, A;
1642
- Se([E, k, m], () => {
1643
- A = void 0;
1646
+ setup(y) {
1647
+ const D = y, a = N(() => xe(D.ctx.locale)), $ = $e(D.ctx), u = p(), r = p([]), n = p([]), i = p(!1), o = p(), h = p(""), v = p(!1), w = p(""), U = p(""), c = p("");
1648
+ let V = !1, S, E;
1649
+ Se([U, w, c], () => {
1650
+ E = void 0;
1644
1651
  }, { flush: "sync" });
1645
- const H = (M) => ["queued", "running", "waiting_executor"].includes(M.state), V = N(() => n.value.some((M) => M.state === "waiting_executor")), R = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], W = N(() => V.value && R.includes(o.value?.code ?? "")), X = N(() => u.value && u.value.state !== "ready" && !(V.value && u.value.state === "needs-admin-approval" && R.includes(u.value.reason ?? "")));
1652
+ const H = (M) => ["queued", "running", "waiting_executor"].includes(M.state), P = N(() => n.value.some((M) => M.state === "waiting_executor")), q = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], Y = N(() => P.value && q.includes(o.value?.code ?? "")), X = N(() => u.value && u.value.state !== "ready" && !(P.value && u.value.state === "needs-admin-approval" && q.includes(u.value.reason ?? "")));
1646
1653
  async function F() {
1647
- if (U) return;
1648
- const [M, v, _] = await Promise.allSettled([P.ctx.call("delegate.status"), P.ctx.call("delegate.list"), P.ctx.call("delegate.jobs.list")]);
1649
- if (!U) {
1650
- M.status === "fulfilled" && (u.value = M.value), v.status === "fulfilled" && (r.value = (v.value.delegations ?? []).filter((x) => !x.revoked)), _.status === "fulfilled" && (n.value = _.value.jobs ?? []);
1651
- for (const x of [M, v, _]) if (x.status === "rejected") throw x.reason;
1654
+ if (V) return;
1655
+ const [M, d, k] = await Promise.allSettled([D.ctx.call("delegate.status"), D.ctx.call("delegate.list"), D.ctx.call("delegate.jobs.list")]);
1656
+ if (!V) {
1657
+ M.status === "fulfilled" && (u.value = M.value), d.status === "fulfilled" && (r.value = (d.value.delegations ?? []).filter((x) => !x.revoked)), k.status === "fulfilled" && (n.value = k.value.jobs ?? []);
1658
+ for (const x of [M, d, k]) if (x.status === "rejected") throw x.reason;
1652
1659
  }
1653
1660
  }
1654
1661
  async function L(M) {
1655
- if (!(i.value || U)) {
1662
+ if (!(i.value || V)) {
1656
1663
  i.value = !0, o.value = void 0;
1657
1664
  try {
1658
1665
  await M();
1659
- } catch (v) {
1660
- U || (o.value = v);
1666
+ } catch (d) {
1667
+ V || (o.value = d);
1661
1668
  } finally {
1662
- U || (i.value = !1);
1669
+ V || (i.value = !1);
1663
1670
  }
1664
1671
  }
1665
1672
  }
1666
1673
  const J = () => L(F), K = (M) => L(async () => {
1667
- await P.ctx.call("delegate.revoke", { delegation_id: M }), await F();
1668
- }), Y = (M) => L(async () => {
1669
- const v = await P.ctx.call("delegate.jobs.cancel", { id: M });
1670
- U || (w.value = v.revocation_pending ? a.value.pending : ""), await F();
1671
- }), q = N(() => u.value?.state === "ready" && !!k.value && !!E.value && !!m.value), O = () => L(async () => {
1672
- q.value && (await P.ctx.call("delegate.jobs.submit", { key: A ?? (A = crypto.randomUUID()), url: E.value, dest: k.value, name: m.value }), U || (E.value = "", m.value = "", k.value = ""), await F());
1674
+ await D.ctx.call("delegate.revoke", { delegation_id: M }), await F();
1675
+ }), W = (M) => L(async () => {
1676
+ const d = await D.ctx.call("delegate.jobs.cancel", { id: M });
1677
+ V || (h.value = d.revocation_pending ? a.value.pending : ""), await F();
1678
+ }), R = N(() => u.value?.state === "ready" && !!w.value && !!U.value && !!c.value), O = () => L(async () => {
1679
+ R.value && (await D.ctx.call("delegate.jobs.submit", { key: E ?? (E = crypto.randomUUID()), url: U.value, dest: w.value, name: c.value }), V || (U.value = "", c.value = "", w.value = ""), await F());
1673
1680
  }), T = (M) => {
1674
- const v = new Date(M);
1675
- return Number.isNaN(v.getTime()) ? "—" : v.toLocaleString(P.ctx.locale);
1681
+ const d = new Date(M);
1682
+ return Number.isNaN(d.getTime()) ? "—" : d.toLocaleString(D.ctx.locale);
1676
1683
  };
1677
1684
  return ie(() => {
1678
1685
  J(), S = setInterval(() => {
1679
1686
  n.value.some(H) && J();
1680
1687
  }, 3e3);
1681
1688
  }), se(() => {
1682
- U = !0, S && clearInterval(S), $.dispose();
1683
- }), (M, v) => (t(), h(e(de), {
1689
+ V = !0, S && clearInterval(S), $.dispose();
1690
+ }), (M, d) => (t(), g(e(de), {
1684
1691
  title: a.value.title,
1685
1692
  collapsible: !1,
1686
1693
  "aria-busy": i.value,
1687
1694
  class: "delegate-panel"
1688
1695
  }, {
1689
1696
  default: s(() => [
1690
- g("p", null, l(a.value.help), 1),
1691
- o.value && !W.value ? (t(), h(e(Q), {
1697
+ _("p", null, l(a.value.help), 1),
1698
+ o.value && !Y.value ? (t(), g(e(Q), {
1692
1699
  key: 0,
1693
1700
  tone: "danger",
1694
1701
  role: "alert"
1695
1702
  }, {
1696
1703
  default: s(() => [
1697
- p(l(e(Fe)(o.value, a.value)), 1)
1704
+ f(l(e(Fe)(o.value, a.value)), 1)
1698
1705
  ]),
1699
1706
  _: 1
1700
- })) : y("", !0),
1701
- w.value ? (t(), C("p", bl, l(w.value), 1)) : y("", !0),
1702
- X.value ? (t(), C("p", kl, l(u.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : y("", !0),
1707
+ })) : m("", !0),
1708
+ h.value ? (t(), C("p", kl, l(h.value), 1)) : m("", !0),
1709
+ X.value ? (t(), C("p", _l, l(u.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : m("", !0),
1703
1710
  b(e(pe), {
1704
1711
  onSubmit: ce(O, ["prevent"])
1705
1712
  }, {
@@ -1711,8 +1718,8 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1711
1718
  default: s(() => [
1712
1719
  b(e(re), {
1713
1720
  id: "delegate-url",
1714
- modelValue: E.value,
1715
- "onUpdate:modelValue": v[0] || (v[0] = (_) => E.value = _),
1721
+ modelValue: U.value,
1722
+ "onUpdate:modelValue": d[0] || (d[0] = (k) => U.value = k),
1716
1723
  type: "url",
1717
1724
  disabled: i.value || u.value?.state !== "ready"
1718
1725
  }, null, 8, ["modelValue", "disabled"])
@@ -1726,36 +1733,36 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1726
1733
  default: s(() => [
1727
1734
  b(e(re), {
1728
1735
  id: "delegate-name",
1729
- modelValue: m.value,
1730
- "onUpdate:modelValue": v[1] || (v[1] = (_) => m.value = _),
1736
+ modelValue: c.value,
1737
+ "onUpdate:modelValue": d[1] || (d[1] = (k) => c.value = k),
1731
1738
  "data-file-name": "",
1732
1739
  disabled: i.value || u.value?.state !== "ready"
1733
1740
  }, null, 8, ["modelValue", "disabled"])
1734
1741
  ]),
1735
1742
  _: 1
1736
1743
  }, 8, ["label"]),
1737
- g("p", null, l(a.value.size), 1),
1738
- k.value ? (t(), C("p", _l, l(a.value.destination) + ": " + l(k.value), 1)) : y("", !0),
1744
+ _("p", null, l(a.value.size), 1),
1745
+ w.value ? (t(), C("p", gl, l(a.value.destination) + ": " + l(w.value), 1)) : m("", !0),
1739
1746
  b(e(fe), null, {
1740
1747
  default: s(() => [
1741
1748
  b(e(z), {
1742
1749
  type: "button",
1743
1750
  variant: "secondary",
1744
1751
  disabled: i.value || u.value?.state !== "ready",
1745
- onClick: v[2] || (v[2] = (_) => d.value = !0)
1752
+ onClick: d[2] || (d[2] = (k) => v.value = !0)
1746
1753
  }, {
1747
1754
  default: s(() => [
1748
- p(l(a.value.choose), 1)
1755
+ f(l(a.value.choose), 1)
1749
1756
  ]),
1750
1757
  _: 1
1751
1758
  }, 8, ["disabled"]),
1752
1759
  b(e(z), {
1753
1760
  type: "submit",
1754
1761
  variant: "primary",
1755
- disabled: i.value || !q.value
1762
+ disabled: i.value || !R.value
1756
1763
  }, {
1757
1764
  default: s(() => [
1758
- p(l(a.value.submit), 1)
1765
+ f(l(a.value.submit), 1)
1759
1766
  ]),
1760
1767
  _: 1
1761
1768
  }, 8, ["disabled"])
@@ -1766,63 +1773,63 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1766
1773
  _: 1
1767
1774
  }),
1768
1775
  b(ye, {
1769
- open: d.value,
1770
- "onUpdate:open": v[3] || (v[3] = (_) => d.value = _),
1771
- locale: f.ctx.locale,
1776
+ open: v.value,
1777
+ "onUpdate:open": d[3] || (d[3] = (k) => v.value = k),
1778
+ locale: y.ctx.locale,
1772
1779
  provider: e($),
1773
1780
  mode: "folder",
1774
- onSelected: v[4] || (v[4] = (_) => k.value = _)
1781
+ onSelected: d[4] || (d[4] = (k) => w.value = k)
1775
1782
  }, null, 8, ["open", "locale", "provider"]),
1776
- g("div", gl, [
1777
- g("h3", null, l(a.value.downloads), 1),
1783
+ _("div", hl, [
1784
+ _("h3", null, l(a.value.downloads), 1),
1778
1785
  b(e(z), {
1779
1786
  variant: "secondary",
1780
1787
  disabled: i.value,
1781
1788
  onClick: J
1782
1789
  }, {
1783
1790
  default: s(() => [
1784
- p(l(a.value.refresh), 1)
1791
+ f(l(a.value.refresh), 1)
1785
1792
  ]),
1786
1793
  _: 1
1787
1794
  }, 8, ["disabled"])
1788
1795
  ]),
1789
- !n.value.length && !o.value ? (t(), C("p", hl, l(a.value.noJobs), 1)) : (t(), C("ul", wl, [
1790
- (t(!0), C(j, null, te(n.value, (_) => (t(), C("li", {
1791
- key: _.id,
1792
- "data-job-state": _.state
1796
+ !n.value.length && !o.value ? (t(), C("p", wl, l(a.value.noJobs), 1)) : (t(), C("ul", Cl, [
1797
+ (t(!0), C(j, null, te(n.value, (k) => (t(), C("li", {
1798
+ key: k.id,
1799
+ "data-job-state": k.state
1793
1800
  }, [
1794
- g("span", {
1795
- role: _.state === "waiting_executor" ? "status" : void 0
1796
- }, l(_.name) + " · " + l(a.value[_.state]), 9, $l),
1797
- H(_) ? (t(), h(e(z), {
1801
+ _("span", {
1802
+ role: k.state === "waiting_executor" ? "status" : void 0
1803
+ }, l(k.name) + " · " + l(a.value[k.state]), 9, xl),
1804
+ H(k) ? (t(), g(e(z), {
1798
1805
  key: 0,
1799
1806
  variant: "secondary",
1800
1807
  disabled: i.value,
1801
- onClick: (x) => Y(_.id)
1808
+ onClick: (x) => W(k.id)
1802
1809
  }, {
1803
1810
  default: s(() => [
1804
- p(l(a.value.cancel), 1)
1811
+ f(l(a.value.cancel), 1)
1805
1812
  ]),
1806
1813
  _: 1
1807
- }, 8, ["disabled", "onClick"])) : y("", !0)
1808
- ], 8, Cl))), 128))
1814
+ }, 8, ["disabled", "onClick"])) : m("", !0)
1815
+ ], 8, $l))), 128))
1809
1816
  ])),
1810
- g("h3", null, l(a.value.delegations), 1),
1811
- !r.value.length && !o.value ? (t(), C("p", xl, l(a.value.noDelegations), 1)) : (t(), C("ul", Sl, [
1812
- (t(!0), C(j, null, te(r.value, (_) => (t(), C("li", {
1813
- key: _.delegation_id
1817
+ _("h3", null, l(a.value.delegations), 1),
1818
+ !r.value.length && !o.value ? (t(), C("p", Sl, l(a.value.noDelegations), 1)) : (t(), C("ul", zl, [
1819
+ (t(!0), C(j, null, te(r.value, (k) => (t(), C("li", {
1820
+ key: k.delegation_id
1814
1821
  }, [
1815
- g("div", null, [
1816
- g("strong", null, l(_.path), 1),
1817
- g("p", null, l(a.value.expires) + ": " + l(T(_.expires_at)), 1)
1822
+ _("div", null, [
1823
+ _("strong", null, l(k.path), 1),
1824
+ _("p", null, l(a.value.expires) + ": " + l(T(k.expires_at)), 1)
1818
1825
  ]),
1819
1826
  b(e(z), {
1820
1827
  variant: "secondary",
1821
1828
  disabled: i.value,
1822
- onClick: (x) => K(_.delegation_id)
1829
+ onClick: (x) => K(k.delegation_id)
1823
1830
  }, {
1824
1831
  default: s(() => [
1825
- p(l(a.value.revoke), 1)
1832
+ f(l(a.value.revoke), 1)
1826
1833
  ]),
1827
1834
  _: 1
1828
1835
  }, 8, ["disabled", "onClick"])
@@ -1832,19 +1839,19 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1832
1839
  _: 1
1833
1840
  }, 8, ["title", "aria-busy"]));
1834
1841
  }
1835
- }), dt = /* @__PURE__ */ ue(zl, [["__scopeId", "data-v-d79ee942"]]), Vl = {
1842
+ }), vt = /* @__PURE__ */ ue(Vl, [["__scopeId", "data-v-d79ee942"]]), Pl = {
1836
1843
  key: 1,
1837
1844
  role: "status"
1838
1845
  }, Ul = {
1839
1846
  key: 2,
1840
1847
  role: "status"
1841
- }, Pl = { key: 3 }, Dl = {
1848
+ }, Dl = { key: 3 }, Al = {
1842
1849
  key: 7,
1843
1850
  role: "status"
1844
- }, Al = { class: "save-actions" }, El = { key: 8 }, Tl = {
1851
+ }, El = { class: "save-actions" }, Tl = { key: 8 }, Il = {
1845
1852
  key: 10,
1846
1853
  class: "save-actions"
1847
- }, Il = { key: 12 }, Ol = { class: "save-records" }, ql = { class: "save-actions" }, Rl = { key: 14 }, Ll = { class: "save-records" }, Bl = ["data-job-id", "data-save-state"], Fl = { key: 0 }, Nl = { key: 3 }, Ml = /* @__PURE__ */ ae({
1854
+ }, Ol = { key: 12 }, Rl = { class: "save-records" }, ql = { class: "save-actions" }, Ll = { key: 14 }, Bl = { class: "save-records" }, Fl = ["data-job-id", "data-save-state"], Nl = { key: 0 }, Ml = { key: 3 }, Hl = /* @__PURE__ */ ae({
1848
1855
  __name: "BackgroundSavePanel",
1849
1856
  props: {
1850
1857
  sdk: {},
@@ -1853,29 +1860,29 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1853
1860
  picker: {}
1854
1861
  },
1855
1862
  emits: ["authorized"],
1856
- setup(f, { emit: P }) {
1857
- const a = f, $ = P, u = c(!1), r = c(""), n = N(() => Ce(a.locale)), i = c(), o = c([]), w = c([]), d = c(!1), k = c(), E = c(""), m = c([]), U = N(() => a.picker && (i.value?.selection ? Ne(a.picker.provider, i.value.selection.root) : i.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
1858
- let S = !1, A;
1859
- const H = (T) => T.state === "copying" && T.code === "CANCEL_REQUESTED", V = (T) => H(T) ? "canceling" : T.state === "committed" && !T.receipt?.path ? "uncertain" : T.state, R = (T) => ["queued", "copying"].includes(T.state) && !H(T);
1860
- function W() {
1861
- i.value = void 0, o.value = [], w.value = [], m.value = [], u.value = !1;
1863
+ setup(y, { emit: D }) {
1864
+ const a = y, $ = D, u = p(!1), r = p(""), n = N(() => Ce(a.locale)), i = p(), o = p([]), h = p([]), v = p(!1), w = p(), U = p(""), c = p([]), V = N(() => a.picker && (i.value?.selection ? Ne(a.picker.provider, i.value.selection.root) : i.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
1865
+ let S = !1, E;
1866
+ const H = (T) => T.state === "copying" && T.code === "CANCEL_REQUESTED", P = (T) => H(T) ? "canceling" : T.state === "committed" && !T.receipt?.path ? "uncertain" : T.state, q = (T) => ["queued", "copying"].includes(T.state) && !H(T);
1867
+ function Y() {
1868
+ i.value = void 0, o.value = [], h.value = [], c.value = [], u.value = !1;
1862
1869
  }
1863
1870
  async function X() {
1864
- const [T, M, v, _] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((x) => a.sdk.destination(x)))]);
1871
+ const [T, M, d, k] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((x) => a.sdk.destination(x)))]);
1865
1872
  if (!S) {
1866
- if (!T || typeof T.disabled != "boolean" || !Array.isArray(M) || !Array.isArray(v)) throw { code: "unavailable" };
1867
- (i.value?.selection?.generation !== T.selection?.generation || i.value?.selection?.scope !== T.selection?.scope) && (u.value = !1), i.value = T, o.value = _.length ? M.filter((x) => _.some((G) => G.status === "active" && G.destination?.id === x.id)) : M, w.value = v, m.value = _;
1873
+ if (!T || typeof T.disabled != "boolean" || !Array.isArray(M) || !Array.isArray(d)) throw { code: "unavailable" };
1874
+ (i.value?.selection?.generation !== T.selection?.generation || i.value?.selection?.scope !== T.selection?.scope) && (u.value = !1), i.value = T, o.value = k.length ? M.filter((x) => k.some((G) => G.status === "active" && G.destination?.id === x.id)) : M, h.value = d, c.value = k;
1868
1875
  }
1869
1876
  }
1870
1877
  async function F(T) {
1871
- if (!(S || d.value)) {
1872
- d.value = !0, k.value = void 0, E.value = "";
1878
+ if (!(S || v.value)) {
1879
+ v.value = !0, w.value = void 0, U.value = "";
1873
1880
  try {
1874
1881
  await T();
1875
1882
  } catch (M) {
1876
- S || (W(), k.value = M);
1883
+ S || (Y(), w.value = M);
1877
1884
  } finally {
1878
- S || (d.value = !1);
1885
+ S || (v.value = !1);
1879
1886
  }
1880
1887
  }
1881
1888
  }
@@ -1885,289 +1892,289 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
1885
1892
  }
1886
1893
  const K = (T) => F(async () => {
1887
1894
  if ((await a.sdk.revoke({ delegation_id: T }))?.revoked !== !0) throw { code: "commit-uncertain" };
1888
- await X(), S || (E.value = n.value.revoked);
1889
- }), Y = (T) => F(async () => {
1895
+ await X(), S || (U.value = n.value.revoked);
1896
+ }), W = (T) => F(async () => {
1890
1897
  await a.sdk.cancel({ delegation_id: T.delegation_id, job_id: T.job_id }), await X();
1891
- }), q = () => F(async () => {
1898
+ }), R = () => F(async () => {
1892
1899
  if (!a.admin || !i.value) return;
1893
1900
  const T = i.value.disabled;
1894
1901
  if ((T ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !T) throw { code: "commit-uncertain" };
1895
1902
  await X();
1896
1903
  }), O = (T) => F(async () => {
1897
- const M = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (v) => v.toString(16).padStart(2, "0")).join("");
1904
+ const M = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (d) => d.toString(16).padStart(2, "0")).join("");
1898
1905
  await a.sdk.exportExample({ key: T, job_id: M }), await X();
1899
1906
  });
1900
1907
  return ie(() => {
1901
- L(), A = setInterval(() => {
1902
- w.value.some(R) && L();
1908
+ L(), E = setInterval(() => {
1909
+ h.value.some(q) && L();
1903
1910
  }, 3e3);
1904
1911
  }), se(() => {
1905
- S = !0, A && clearInterval(A);
1906
- }), (T, M) => (t(), h(e(de), {
1912
+ S = !0, E && clearInterval(E);
1913
+ }), (T, M) => (t(), g(e(de), {
1907
1914
  title: n.value.title,
1908
1915
  collapsible: !1,
1909
- "aria-busy": d.value,
1916
+ "aria-busy": v.value,
1910
1917
  class: "background-save-panel"
1911
1918
  }, {
1912
1919
  default: s(() => [
1913
- g("p", null, l(n.value.help), 1),
1914
- k.value ? (t(), h(e(Q), {
1920
+ _("p", null, l(n.value.help), 1),
1921
+ w.value ? (t(), g(e(Q), {
1915
1922
  key: 0,
1916
1923
  tone: "danger",
1917
1924
  role: "alert",
1918
1925
  class: "save-message"
1919
1926
  }, {
1920
1927
  default: s(() => [
1921
- p(l(e(be)(k.value, n.value)), 1)
1928
+ f(l(e(be)(w.value, n.value)), 1)
1922
1929
  ]),
1923
1930
  _: 1
1924
- })) : y("", !0),
1925
- d.value && !i.value ? (t(), C("p", Vl, l(n.value.loading), 1)) : y("", !0),
1926
- E.value ? (t(), C("p", Ul, l(E.value), 1)) : y("", !0),
1927
- i.value?.selection ? (t(), C("p", Pl, [
1928
- g("strong", null, l(n.value.scope), 1),
1929
- p(": " + l(i.value.selection.root), 1)
1930
- ])) : y("", !0),
1931
- i.value?.mismatch ? (t(), h(e(Q), {
1931
+ })) : m("", !0),
1932
+ v.value && !i.value ? (t(), C("p", Pl, l(n.value.loading), 1)) : m("", !0),
1933
+ U.value ? (t(), C("p", Ul, l(U.value), 1)) : m("", !0),
1934
+ i.value?.selection ? (t(), C("p", Dl, [
1935
+ _("strong", null, l(n.value.scope), 1),
1936
+ f(": " + l(i.value.selection.root), 1)
1937
+ ])) : m("", !0),
1938
+ i.value?.mismatch ? (t(), g(e(Q), {
1932
1939
  key: 4,
1933
1940
  tone: "warning"
1934
1941
  }, {
1935
1942
  default: s(() => [
1936
- p(l(n.value.scopeMismatch) + " " + l(i.value.preselection) + " → " + l(i.value.selection?.root), 1)
1943
+ f(l(n.value.scopeMismatch) + " " + l(i.value.preselection) + " → " + l(i.value.selection?.root), 1)
1937
1944
  ]),
1938
1945
  _: 1
1939
- })) : y("", !0),
1940
- i.value?.scopeMode === "install-selected" && !i.value.selection ? (t(), h(e(Q), {
1946
+ })) : m("", !0),
1947
+ i.value?.scopeMode === "install-selected" && !i.value.selection ? (t(), g(e(Q), {
1941
1948
  key: 5,
1942
1949
  tone: "warning"
1943
1950
  }, {
1944
1951
  default: s(() => [
1945
- p(l(n.value.scopeNeeds), 1)
1952
+ f(l(n.value.scopeNeeds), 1)
1946
1953
  ]),
1947
1954
  _: 1
1948
- })) : y("", !0),
1949
- i.value?.disabled ? (t(), h(e(Q), {
1955
+ })) : m("", !0),
1956
+ i.value?.disabled ? (t(), g(e(Q), {
1950
1957
  key: 6,
1951
1958
  tone: "warning",
1952
1959
  role: "status",
1953
1960
  class: "save-message"
1954
1961
  }, {
1955
1962
  default: s(() => [
1956
- p(l(n.value.disabled), 1)
1963
+ f(l(n.value.disabled), 1)
1957
1964
  ]),
1958
1965
  _: 1
1959
- })) : i.value ? (t(), C("p", Dl, l(n.value.enabled), 1)) : y("", !0),
1960
- g("div", Al, [
1966
+ })) : i.value ? (t(), C("p", Al, l(n.value.enabled), 1)) : m("", !0),
1967
+ _("div", El, [
1961
1968
  b(e(z), {
1962
1969
  variant: "secondary",
1963
- disabled: d.value,
1970
+ disabled: v.value,
1964
1971
  onClick: L
1965
1972
  }, {
1966
1973
  default: s(() => [
1967
- p(l(n.value.refresh), 1)
1974
+ f(l(n.value.refresh), 1)
1968
1975
  ]),
1969
1976
  _: 1
1970
1977
  }, 8, ["disabled"]),
1971
- f.admin && i.value ? (t(), h(e(z), {
1978
+ y.admin && i.value ? (t(), g(e(z), {
1972
1979
  key: 0,
1973
1980
  variant: i.value.disabled ? "secondary" : "danger",
1974
- disabled: d.value,
1975
- onClick: q
1981
+ disabled: v.value,
1982
+ onClick: R
1976
1983
  }, {
1977
1984
  default: s(() => [
1978
- p(l(i.value.disabled ? n.value.enable : n.value.disable), 1)
1985
+ f(l(i.value.disabled ? n.value.enable : n.value.disable), 1)
1979
1986
  ]),
1980
1987
  _: 1
1981
- }, 8, ["variant", "disabled"])) : y("", !0)
1988
+ }, 8, ["variant", "disabled"])) : m("", !0)
1982
1989
  ]),
1983
- f.admin && i.value ? (t(), C("p", El, l(n.value.disableHelp), 1)) : y("", !0),
1984
- g("h3", null, l(n.value.delegations), 1),
1985
- m.value.some((v) => v.status === "reselection-required") ? (t(), h(e(Q), {
1990
+ y.admin && i.value ? (t(), C("p", Tl, l(n.value.disableHelp), 1)) : m("", !0),
1991
+ _("h3", null, l(n.value.delegations), 1),
1992
+ c.value.some((d) => d.status === "reselection-required") ? (t(), g(e(Q), {
1986
1993
  key: 9,
1987
1994
  tone: "warning"
1988
1995
  }, {
1989
1996
  default: s(() => [
1990
- p(l(n.value.reselect), 1)
1997
+ f(l(n.value.reselect), 1)
1991
1998
  ]),
1992
1999
  _: 1
1993
- })) : y("", !0),
1994
- f.picker ? (t(), C("div", Tl, [
1995
- (t(!0), C(j, null, te(f.picker.keys, (v) => (t(), h(e(z), {
1996
- key: v,
2000
+ })) : m("", !0),
2001
+ y.picker ? (t(), C("div", Il, [
2002
+ (t(!0), C(j, null, te(y.picker.keys, (d) => (t(), g(e(z), {
2003
+ key: d,
1997
2004
  variant: "secondary",
1998
- disabled: d.value || !i.value || i.value.disabled || !U.value,
1999
- onClick: (_) => {
2000
- r.value = v, u.value = !0;
2005
+ disabled: v.value || !i.value || i.value.disabled || !V.value,
2006
+ onClick: (k) => {
2007
+ r.value = d, u.value = !0;
2001
2008
  }
2002
2009
  }, {
2003
2010
  default: s(() => [
2004
- p(l(n.value.choose) + " (" + l(v) + ")", 1)
2011
+ f(l(n.value.choose) + " (" + l(d) + ")", 1)
2005
2012
  ]),
2006
2013
  _: 2
2007
2014
  }, 1032, ["disabled", "onClick"]))), 128))
2008
- ])) : y("", !0),
2009
- U.value ? (t(), h(ye, {
2015
+ ])) : m("", !0),
2016
+ V.value ? (t(), g(ye, {
2010
2017
  key: i.value?.selection?.scope,
2011
2018
  open: u.value,
2012
- "onUpdate:open": M[0] || (M[0] = (v) => u.value = v),
2013
- provider: U.value,
2014
- locale: f.locale,
2019
+ "onUpdate:open": M[0] || (M[0] = (d) => u.value = d),
2020
+ provider: V.value,
2021
+ locale: y.locale,
2015
2022
  mode: "folder",
2016
- destination: { key: r.value, selectDestination: f.sdk.selectDestination },
2023
+ destination: { key: r.value, selectDestination: y.sdk.selectDestination },
2017
2024
  onAuthorized: J
2018
- }, null, 8, ["open", "provider", "locale", "destination"])) : y("", !0),
2019
- i.value && !o.value.length ? (t(), C("p", Il, l(n.value.empty), 1)) : y("", !0),
2020
- g("ul", Ol, [
2021
- (t(!0), C(j, null, te(o.value, (v) => (t(), C("li", {
2022
- key: v.id
2025
+ }, null, 8, ["open", "provider", "locale", "destination"])) : m("", !0),
2026
+ i.value && !o.value.length ? (t(), C("p", Ol, l(n.value.empty), 1)) : m("", !0),
2027
+ _("ul", Rl, [
2028
+ (t(!0), C(j, null, te(o.value, (d) => (t(), C("li", {
2029
+ key: d.id
2023
2030
  }, [
2024
- g("div", null, [
2025
- g("strong", null, l(v.path), 1),
2026
- g("p", null, l(n.value.untilRevoked), 1)
2031
+ _("div", null, [
2032
+ _("strong", null, l(d.path), 1),
2033
+ _("p", null, l(n.value.untilRevoked), 1)
2027
2034
  ]),
2028
2035
  b(e(z), {
2029
2036
  variant: "secondary",
2030
- disabled: d.value,
2031
- onClick: (_) => K(v.id)
2037
+ disabled: v.value,
2038
+ onClick: (k) => K(d.id)
2032
2039
  }, {
2033
2040
  default: s(() => [
2034
- p(l(n.value.revoke), 1)
2041
+ f(l(n.value.revoke), 1)
2035
2042
  ]),
2036
2043
  _: 1
2037
2044
  }, 8, ["disabled", "onClick"])
2038
2045
  ]))), 128))
2039
2046
  ]),
2040
- m.value.some((v) => v.status === "active") ? (t(), C(j, { key: 13 }, [
2041
- g("p", null, l(n.value.exampleHelp), 1),
2042
- g("div", ql, [
2043
- (t(!0), C(j, null, te(m.value.filter((v) => v.status === "active"), (v) => (t(), h(e(z), {
2044
- key: v.key,
2047
+ c.value.some((d) => d.status === "active") ? (t(), C(j, { key: 13 }, [
2048
+ _("p", null, l(n.value.exampleHelp), 1),
2049
+ _("div", ql, [
2050
+ (t(!0), C(j, null, te(c.value.filter((d) => d.status === "active"), (d) => (t(), g(e(z), {
2051
+ key: d.key,
2045
2052
  variant: "secondary",
2046
- disabled: d.value || i.value?.disabled,
2047
- onClick: (_) => O(v.key)
2053
+ disabled: v.value || i.value?.disabled,
2054
+ onClick: (k) => O(d.key)
2048
2055
  }, {
2049
2056
  default: s(() => [
2050
- p(l(n.value.example) + " (" + l(v.key) + ")", 1)
2057
+ f(l(n.value.example) + " (" + l(d.key) + ")", 1)
2051
2058
  ]),
2052
2059
  _: 2
2053
2060
  }, 1032, ["disabled", "onClick"]))), 128))
2054
2061
  ])
2055
- ], 64)) : y("", !0),
2056
- g("h3", null, l(n.value.operations), 1),
2057
- i.value && !w.value.length ? (t(), C("p", Rl, l(n.value.noOperations), 1)) : y("", !0),
2058
- g("ul", Ll, [
2059
- (t(!0), C(j, null, te(w.value, (v) => (t(), C("li", {
2060
- key: v.job_id,
2061
- "data-job-id": v.job_id,
2062
- "data-save-state": V(v)
2062
+ ], 64)) : m("", !0),
2063
+ _("h3", null, l(n.value.operations), 1),
2064
+ i.value && !h.value.length ? (t(), C("p", Ll, l(n.value.noOperations), 1)) : m("", !0),
2065
+ _("ul", Bl, [
2066
+ (t(!0), C(j, null, te(h.value, (d) => (t(), C("li", {
2067
+ key: d.job_id,
2068
+ "data-job-id": d.job_id,
2069
+ "data-save-state": P(d)
2063
2070
  }, [
2064
- g("div", null, [
2065
- g("strong", null, l(v.name), 1),
2066
- g("p", null, l(n.value[V(v)]) + " · " + l(v.job_id), 1),
2067
- V(v) === "committed" ? (t(), C("p", Fl, l(v.receipt?.path), 1)) : y("", !0),
2068
- V(v) === "uncertain" ? (t(), h(e(Q), {
2071
+ _("div", null, [
2072
+ _("strong", null, l(d.name), 1),
2073
+ _("p", null, l(n.value[P(d)]) + " · " + l(d.job_id), 1),
2074
+ P(d) === "committed" ? (t(), C("p", Nl, l(d.receipt?.path), 1)) : m("", !0),
2075
+ P(d) === "uncertain" ? (t(), g(e(Q), {
2069
2076
  key: 1,
2070
2077
  tone: "warning",
2071
2078
  class: "save-message"
2072
2079
  }, {
2073
2080
  default: s(() => [
2074
- p(l(n.value.uncertainHelp), 1)
2081
+ f(l(n.value.uncertainHelp), 1)
2075
2082
  ]),
2076
2083
  _: 1
2077
- })) : V(v) === "interrupted" ? (t(), h(e(Q), {
2084
+ })) : P(d) === "interrupted" ? (t(), g(e(Q), {
2078
2085
  key: 2,
2079
2086
  tone: "warning",
2080
2087
  class: "save-message"
2081
2088
  }, {
2082
2089
  default: s(() => [
2083
- p(l(n.value.interruptedHelp), 1)
2090
+ f(l(n.value.interruptedHelp), 1)
2084
2091
  ]),
2085
2092
  _: 1
2086
- })) : y("", !0),
2087
- v.code && !H(v) ? (t(), C("p", Nl, l(e(be)({ code: v.code }, n.value)), 1)) : y("", !0)
2093
+ })) : m("", !0),
2094
+ d.code && !H(d) ? (t(), C("p", Ml, l(e(be)({ code: d.code }, n.value)), 1)) : m("", !0)
2088
2095
  ]),
2089
- R(v) ? (t(), h(e(z), {
2096
+ q(d) ? (t(), g(e(z), {
2090
2097
  key: 0,
2091
2098
  variant: "secondary",
2092
- disabled: d.value,
2093
- onClick: (_) => Y(v)
2099
+ disabled: v.value,
2100
+ onClick: (k) => W(d)
2094
2101
  }, {
2095
2102
  default: s(() => [
2096
- p(l(n.value.cancel), 1)
2103
+ f(l(n.value.cancel), 1)
2097
2104
  ]),
2098
2105
  _: 1
2099
- }, 8, ["disabled", "onClick"])) : y("", !0)
2100
- ], 8, Bl))), 128))
2106
+ }, 8, ["disabled", "onClick"])) : m("", !0)
2107
+ ], 8, Fl))), 128))
2101
2108
  ])
2102
2109
  ]),
2103
2110
  _: 1
2104
2111
  }, 8, ["title", "aria-busy"]));
2105
2112
  }
2106
- }), vt = /* @__PURE__ */ ue(Ml, [["__scopeId", "data-v-c4022c90"]]), Hl = {
2113
+ }), ct = /* @__PURE__ */ ue(Hl, [["__scopeId", "data-v-c4022c90"]]), Kl = {
2107
2114
  class: "authorization-announcement",
2108
2115
  role: "status",
2109
2116
  "aria-live": "polite",
2110
2117
  "aria-atomic": "true"
2111
- }, Kl = ["aria-busy", "data-authorization-state"], Jl = {
2118
+ }, Jl = ["aria-busy", "data-authorization-state"], Xl = {
2112
2119
  class: "authorization-icon",
2113
2120
  "aria-hidden": "true"
2114
- }, Xl = { class: "authorization-title" }, Gl = { class: "authorization-body" }, Ql = { class: "authorization-actions" }, Wl = {
2121
+ }, Gl = { class: "authorization-title" }, Ql = { class: "authorization-body" }, Yl = { class: "authorization-actions" }, Wl = {
2115
2122
  key: 1,
2116
2123
  class: "authorization-authorized"
2117
- }, Yl = { class: "authorization-ready" }, Zl = /* @__PURE__ */ ae({
2124
+ }, Zl = { class: "authorization-ready" }, jl = /* @__PURE__ */ ae({
2118
2125
  __name: "AuthorizationGate",
2119
2126
  props: {
2120
2127
  ctx: {},
2121
2128
  name: {}
2122
2129
  },
2123
2130
  emits: ["ready"],
2124
- setup(f, { emit: P }) {
2125
- const a = f, $ = P, u = c(), r = c(), n = c(!1), i = c(!1), o = c(!1);
2126
- let w = !1, d = 0, k = !1, E;
2127
- const m = N(() => Me(a.ctx.locale, a.name ?? a.ctx.displayName ?? "")), U = N(() => u.value?.state === "ready"), S = N(() => u.value || r.value), A = N(() => S.value?.state === "authorization_required"), H = N(() => ["helper_untrusted", "cli_untrusted"].includes(S.value?.reason || "")), V = N(() => A.value && !H.value), R = N(() => S.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), W = N(() => S.value ? A.value ? m.value("title") : S.value.state === "ready" ? m.value("ready") : S.value.state === "not_admin" ? m.value("not_admin.title") : S.value.state === "session_expired" ? m.value("session_expired.title") : m.value(R.value + ".title") : m.value("checking")), X = N(() => A.value ? m.value("purpose") : S.value?.state === "not_admin" ? m.value("not_admin.body") : S.value?.state === "session_expired" ? m.value("session_expired.body") : S.value?.state === "unavailable" ? m.value(R.value + ".body") : m.value("purpose")), F = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], L = N(() => F.includes(S.value?.reason || "") ? S.value.reason : "unknown"), J = N(() => H.value ? "next.reinstall" : L.value === "grant_missing" ? "next.install" : L.value === "upgrade_reapproval" || L.value === "grant_incompatible" ? "next.update" : "next.repair");
2128
- async function K(Y) {
2129
- if (n.value || w) return;
2130
- const q = ++d;
2131
- r.value = Y === "request" && u.value?.state === "authorization_required" ? u.value : void 0, n.value = !0, i.value = !1, u.value = void 0;
2131
+ setup(y, { emit: D }) {
2132
+ const a = y, $ = D, u = p(), r = p(), n = p(!1), i = p(!1), o = p(!1);
2133
+ let h = !1, v = 0, w = !1, U;
2134
+ const c = N(() => Me(a.ctx.locale, a.name ?? a.ctx.displayName ?? "")), V = N(() => u.value?.state === "ready"), S = N(() => u.value || r.value), E = N(() => S.value?.state === "authorization_required"), H = N(() => ["helper_untrusted", "cli_untrusted"].includes(S.value?.reason || "")), P = N(() => E.value && !H.value), q = N(() => S.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), Y = N(() => S.value ? E.value ? c.value("title") : S.value.state === "ready" ? c.value("ready") : S.value.state === "not_admin" ? c.value("not_admin.title") : S.value.state === "session_expired" ? c.value("session_expired.title") : c.value(q.value + ".title") : c.value("checking")), X = N(() => E.value ? c.value("purpose") : S.value?.state === "not_admin" ? c.value("not_admin.body") : S.value?.state === "session_expired" ? c.value("session_expired.body") : S.value?.state === "unavailable" ? c.value(q.value + ".body") : c.value("purpose")), F = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], L = N(() => F.includes(S.value?.reason || "") ? S.value.reason : "unknown"), J = N(() => H.value ? "next.reinstall" : L.value === "grant_missing" ? "next.install" : L.value === "upgrade_reapproval" || L.value === "grant_incompatible" ? "next.update" : "next.repair");
2135
+ async function K(W) {
2136
+ if (n.value || h) return;
2137
+ const R = ++v;
2138
+ r.value = W === "request" && u.value?.state === "authorization_required" ? u.value : void 0, n.value = !0, i.value = !1, u.value = void 0;
2132
2139
  try {
2133
- const O = await a.ctx.authorization?.[Y]();
2134
- if (w || q !== d) return;
2140
+ const O = await a.ctx.authorization?.[W]();
2141
+ if (h || R !== v) return;
2135
2142
  if (!O || O.command !== "authorization" || O.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(O.state) || O.reason === "upgrade_reapproval" && O.state !== "authorization_required") throw Error("invalid status");
2136
2143
  u.value = O, O.state === "ready" && $("ready");
2137
2144
  } catch (O) {
2138
- !w && q === d && (u.value = O.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : r.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, i.value = !0);
2145
+ !h && R === v && (u.value = O.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : r.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, i.value = !0);
2139
2146
  } finally {
2140
- !w && q === d && (n.value = !1, r.value = void 0, k && (k = !1, K("status")));
2147
+ !h && R === v && (n.value = !1, r.value = void 0, w && (w = !1, K("status")));
2141
2148
  }
2142
2149
  }
2143
2150
  return ie(() => {
2144
- E = a.ctx.reopen(() => {
2145
- n.value ? k = !0 : K("status");
2151
+ U = a.ctx.reopen(() => {
2152
+ n.value ? w = !0 : K("status");
2146
2153
  }), K("status");
2147
2154
  }), ze(() => {
2148
- w = !0, d++, typeof E == "function" && E();
2149
- }), (Y, q) => (t(), C(j, null, [
2150
- g("p", Hl, l(n.value ? m.value("authorizing") : W.value), 1),
2151
- U.value ? (t(), C("div", Wl, [
2152
- g("div", Yl, [
2155
+ h = !0, v++, typeof U == "function" && U();
2156
+ }), (W, R) => (t(), C(j, null, [
2157
+ _("p", Kl, l(n.value ? c.value("authorizing") : Y.value), 1),
2158
+ V.value ? (t(), C("div", Wl, [
2159
+ _("div", Zl, [
2153
2160
  b(e(he), {
2154
2161
  size: 16,
2155
2162
  "aria-hidden": "true"
2156
2163
  }),
2157
- g("span", null, l(m.value("ready")), 1),
2158
- f.ctx.authorization?.canManage?.() ? (t(), h(e(z), {
2164
+ _("span", null, l(c.value("ready")), 1),
2165
+ y.ctx.authorization?.canManage?.() ? (t(), g(e(z), {
2159
2166
  key: 0,
2160
2167
  variant: "secondary",
2161
2168
  disabled: n.value,
2162
- onClick: q[2] || (q[2] = (O) => o.value = !0)
2169
+ onClick: R[2] || (R[2] = (O) => o.value = !0)
2163
2170
  }, {
2164
2171
  default: s(() => [
2165
- p(l(m.value("revoke")), 1)
2172
+ f(l(c.value("revoke")), 1)
2166
2173
  ]),
2167
2174
  _: 1
2168
- }, 8, ["disabled"])) : y("", !0)
2175
+ }, 8, ["disabled"])) : m("", !0)
2169
2176
  ]),
2170
- ke(Y.$slots, "default", {}, void 0, !0)
2177
+ ke(W.$slots, "default", {}, void 0, !0)
2171
2178
  ])) : (t(), C("div", {
2172
2179
  key: 0,
2173
2180
  class: "authorization-view",
@@ -2178,56 +2185,56 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
2178
2185
  class: "authorization-card",
2179
2186
  padding: "lg",
2180
2187
  raised: "",
2181
- "aria-label": W.value
2188
+ "aria-label": Y.value
2182
2189
  }, {
2183
2190
  default: s(() => [
2184
- g("span", Jl, [
2185
- (t(), h(Je(S.value?.state === "unavailable" || S.value?.state === "session_expired" ? e(sa) : e(he)), { class: "authorization-icon-glyph" }))
2191
+ _("span", Xl, [
2192
+ (t(), g(Je(S.value?.state === "unavailable" || S.value?.state === "session_expired" ? e(sa) : e(he)), { class: "authorization-icon-glyph" }))
2186
2193
  ]),
2187
- g("h1", Xl, l(W.value), 1),
2188
- g("p", Gl, l(X.value), 1),
2189
- A.value ? (t(), h(e(Q), {
2194
+ _("h1", Gl, l(Y.value), 1),
2195
+ _("p", Ql, l(X.value), 1),
2196
+ E.value ? (t(), g(e(Q), {
2190
2197
  key: 0,
2191
2198
  class: "authorization-status",
2192
2199
  tone: ["grant_missing", "upgrade_reapproval"].includes(L.value) ? "info" : "warning",
2193
- title: m.value("reason." + L.value)
2200
+ title: c.value("reason." + L.value)
2194
2201
  }, {
2195
2202
  default: s(() => [
2196
- p(l(m.value(J.value)), 1)
2203
+ f(l(c.value(J.value)), 1)
2197
2204
  ]),
2198
2205
  _: 1
2199
- }, 8, ["tone", "title"])) : y("", !0),
2200
- i.value ? (t(), h(e(Q), {
2206
+ }, 8, ["tone", "title"])) : m("", !0),
2207
+ i.value ? (t(), g(e(Q), {
2201
2208
  key: 1,
2202
2209
  class: "authorization-failed",
2203
2210
  tone: "warning"
2204
2211
  }, {
2205
2212
  default: s(() => [
2206
- p(l(m.value("failed")), 1)
2213
+ f(l(c.value("failed")), 1)
2207
2214
  ]),
2208
2215
  _: 1
2209
- })) : y("", !0),
2210
- g("div", Ql, [
2211
- V.value ? (t(), h(e(z), {
2216
+ })) : m("", !0),
2217
+ _("div", Yl, [
2218
+ P.value ? (t(), g(e(z), {
2212
2219
  key: 0,
2213
2220
  variant: "primary",
2214
2221
  loading: n.value,
2215
2222
  disabled: n.value,
2216
- onClick: q[0] || (q[0] = (O) => K("request"))
2223
+ onClick: R[0] || (R[0] = (O) => K("request"))
2217
2224
  }, {
2218
2225
  default: s(() => [
2219
- p(l(n.value ? m.value("authorizing") : m.value("authorize")), 1)
2226
+ f(l(n.value ? c.value("authorizing") : c.value("authorize")), 1)
2220
2227
  ]),
2221
2228
  _: 1
2222
- }, 8, ["loading", "disabled"])) : (t(), h(e(z), {
2229
+ }, 8, ["loading", "disabled"])) : (t(), g(e(z), {
2223
2230
  key: 1,
2224
2231
  variant: "primary",
2225
2232
  loading: n.value,
2226
2233
  disabled: n.value,
2227
- onClick: q[1] || (q[1] = (O) => K("status"))
2234
+ onClick: R[1] || (R[1] = (O) => K("status"))
2228
2235
  }, {
2229
2236
  default: s(() => [
2230
- p(l(n.value ? m.value("checking") : m.value("retry")), 1)
2237
+ f(l(n.value ? c.value("checking") : c.value("retry")), 1)
2231
2238
  ]),
2232
2239
  _: 1
2233
2240
  }, 8, ["loading", "disabled"]))
@@ -2235,32 +2242,32 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
2235
2242
  ]),
2236
2243
  _: 1
2237
2244
  }, 8, ["aria-label"])
2238
- ], 8, Kl)),
2245
+ ], 8, Jl)),
2239
2246
  b(e(Ve), {
2240
2247
  open: o.value,
2241
- "onUpdate:open": q[5] || (q[5] = (O) => o.value = O),
2242
- title: m.value("revoke.title"),
2243
- description: m.value("revoke.body")
2248
+ "onUpdate:open": R[5] || (R[5] = (O) => o.value = O),
2249
+ title: c.value("revoke.title"),
2250
+ description: c.value("revoke.body")
2244
2251
  }, {
2245
2252
  footer: s(() => [
2246
2253
  b(e(z), {
2247
2254
  variant: "secondary",
2248
- onClick: q[3] || (q[3] = (O) => o.value = !1)
2255
+ onClick: R[3] || (R[3] = (O) => o.value = !1)
2249
2256
  }, {
2250
2257
  default: s(() => [
2251
- p(l(m.value("cancel")), 1)
2258
+ f(l(c.value("cancel")), 1)
2252
2259
  ]),
2253
2260
  _: 1
2254
2261
  }),
2255
2262
  b(e(z), {
2256
2263
  variant: "danger",
2257
2264
  disabled: n.value,
2258
- onClick: q[4] || (q[4] = (O) => {
2265
+ onClick: R[4] || (R[4] = (O) => {
2259
2266
  o.value = !1, K("revoke");
2260
2267
  })
2261
2268
  }, {
2262
2269
  default: s(() => [
2263
- p(l(m.value("revoke")), 1)
2270
+ f(l(c.value("revoke")), 1)
2264
2271
  ]),
2265
2272
  _: 1
2266
2273
  }, 8, ["disabled"])
@@ -2269,56 +2276,56 @@ const ra = { class: "app-page-content" }, da = /* @__PURE__ */ ae({
2269
2276
  }, 8, ["open", "title", "description"])
2270
2277
  ], 64));
2271
2278
  }
2272
- }), ct = /* @__PURE__ */ ue(Zl, [["__scopeId", "data-v-c8a34087"]]);
2279
+ }), pt = /* @__PURE__ */ ue(jl, [["__scopeId", "data-v-c8a34087"]]);
2273
2280
  export {
2274
- nt as AppShell,
2275
- ct as AuthorizationGate,
2276
- ot as BackgroundPanel,
2277
- vt as BackgroundSavePanel,
2278
- dt as DelegatePanel,
2279
- rt as ExecutorSettings,
2281
+ st as AppShell,
2282
+ pt as AuthorizationGate,
2283
+ rt as BackgroundPanel,
2284
+ ct as BackgroundSavePanel,
2285
+ vt as DelegatePanel,
2286
+ dt as ExecutorSettings,
2280
2287
  ua as ExecutorSetupKey,
2281
2288
  De as FileBrowser,
2282
- st as FilesPage,
2283
- it as LoginPage,
2289
+ ut as FilesPage,
2290
+ ot as LoginPage,
2284
2291
  ye as NasPicker,
2285
- ut as PortalSettings,
2286
- yt as activePage,
2287
- mt as authorizationCatalogs,
2292
+ it as PortalSettings,
2293
+ mt as activePage,
2294
+ bt as authorizationCatalogs,
2288
2295
  Me as authorizationCopy,
2289
- bt as backgroundCatalogs,
2290
- Re as backgroundCopy,
2296
+ kt as backgroundCatalogs,
2297
+ qe as backgroundCopy,
2291
2298
  Be as backgroundErrorCopy,
2292
- kt as catalogs,
2299
+ _t as catalogs,
2293
2300
  Le as createBackgroundPickerProvider,
2294
- _t as createBackgroundSaveFacade,
2295
- gt as createFileTransfers,
2301
+ gt as createBackgroundSaveFacade,
2302
+ ht as createFileTransfers,
2296
2303
  $e as createNasProvider,
2297
- tt as createSession,
2298
- ht as decodeResponse,
2299
- wt as delegateCatalogs,
2304
+ nt as createSession,
2305
+ wt as decodeResponse,
2306
+ Ct as delegateCatalogs,
2300
2307
  xe as delegateCopy,
2301
- Ct as encodeRequest,
2308
+ $t as encodeRequest,
2302
2309
  Fe as errorCopy,
2303
2310
  ve as format,
2304
- $t as identityCatalogs,
2305
- qe as identityCopy,
2306
- xt as nasCatalogs,
2311
+ xt as identityCatalogs,
2312
+ Re as identityCopy,
2313
+ St as nasCatalogs,
2307
2314
  oe as nasCopy,
2308
2315
  we as nasErrorCopy,
2309
- St as protocolCodes,
2310
- zt as protocolOps,
2311
- Vt as protocolSchemas,
2316
+ zt as protocolCodes,
2317
+ Vt as protocolOps,
2318
+ Pt as protocolSchemas,
2312
2319
  _e as requestKey,
2313
2320
  Ut as saveCatalogs,
2314
2321
  Ce as saveCopy,
2315
2322
  be as saveError,
2316
2323
  Ne as scopedPicker,
2317
- Pt as shellCatalogs,
2324
+ Dt as shellCatalogs,
2318
2325
  Oe as shellCopy,
2319
- Dt as shellPages,
2320
- At as uiLocale,
2321
- Et as uiLocales,
2326
+ At as shellPages,
2327
+ Et as uiLocale,
2328
+ Tt as uiLocales,
2322
2329
  ia as useExecutorSetup,
2323
2330
  oa as useNasRequest
2324
2331
  };