@synopackageland/sdk 0.9.5 → 0.9.6

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