@synopackageland/sdk 0.9.9 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +164 -1
  2. package/dist/i18n/bridge/de.json +6 -0
  3. package/dist/i18n/bridge/en.json +6 -0
  4. package/dist/i18n/bridge/es.json +6 -0
  5. package/dist/i18n/bridge/fr.json +6 -0
  6. package/dist/i18n/bridge/it.json +6 -0
  7. package/dist/i18n/bridge/ja.json +6 -0
  8. package/dist/i18n/bridge/ko.json +6 -0
  9. package/dist/i18n/bridge/zh-CN.json +6 -0
  10. package/dist/i18n/bridge/zh-TW.json +6 -0
  11. package/dist/i18n/delegate/de.json +9 -2
  12. package/dist/i18n/delegate/en.json +9 -2
  13. package/dist/i18n/delegate/es.json +9 -2
  14. package/dist/i18n/delegate/fr.json +9 -2
  15. package/dist/i18n/delegate/it.json +9 -2
  16. package/dist/i18n/delegate/ja.json +9 -2
  17. package/dist/i18n/delegate/ko.json +9 -2
  18. package/dist/i18n/delegate/zh-CN.json +9 -2
  19. package/dist/i18n/delegate/zh-TW.json +9 -2
  20. package/dist/i18n/shell/de.json +5 -1
  21. package/dist/i18n/shell/en.json +5 -1
  22. package/dist/i18n/shell/es.json +5 -1
  23. package/dist/i18n/shell/fr.json +5 -1
  24. package/dist/i18n/shell/it.json +5 -1
  25. package/dist/i18n/shell/ja.json +5 -1
  26. package/dist/i18n/shell/ko.json +5 -1
  27. package/dist/i18n/shell/zh-CN.json +5 -1
  28. package/dist/i18n/shell/zh-TW.json +5 -1
  29. package/dist/index.js +2553 -2336
  30. package/dist/src/bridge/i18n.d.ts +5 -0
  31. package/dist/src/context.d.ts +23 -2
  32. package/dist/src/delegate/ExecutorApproval.vue.d.ts +19 -0
  33. package/dist/src/delegate/ExecutorNotice.vue.d.ts +8 -0
  34. package/dist/src/delegate/copy.d.ts +14 -0
  35. package/dist/src/delegate/root.d.ts +40 -0
  36. package/dist/src/index.d.ts +5 -2
  37. package/dist/src/protocol/v1.d.ts +49 -4
  38. package/dist/src/shell/AppShell.vue.d.ts +31 -10
  39. package/dist/src/shell/app-pages.d.ts +37 -0
  40. package/dist/src/shell/i18n.d.ts +4 -0
  41. package/dist/src/shell/pages.d.ts +7 -2
  42. package/dist/src/shell/slot-content.d.ts +2 -0
  43. package/dist/src/standalone.d.ts +5 -0
  44. package/dist/src/vue.d.ts +3 -0
  45. package/dist/style.css +1 -1
  46. package/dist/vue.js +1945 -1686
  47. package/package.json +4 -4
  48. package/spec/protocol/v1/README.md +154 -3
  49. package/spec/protocol/v1/errors.json +36 -4
  50. package/spec/protocol/v1/schema/root.jobs.get.json +19 -0
  51. package/spec/protocol/v1/schema/root.jobs.list.json +11 -0
  52. package/spec/protocol/v1/schema/root.jobs.stop.json +19 -0
  53. package/spec/protocol/v1/schema/root.run.json +6 -2
  54. package/spec/protocol/v1/schema/root.start.json +23 -0
  55. package/spec/protocol/v1/vectors/files.jsonl +11 -0
package/dist/vue.js CHANGED
@@ -1,11 +1,11 @@
1
- import { shellCopy as aa, nasCopy as be, nasErrorCopy as Le, format as Ae, uiLocale as ta, saveCopy as Ne, saveError as Ie, createNasProvider as Me, identityCopy as la, backgroundCopy as sa, createBackgroundPickerProvider as na, backgroundErrorCopy as ia, requestKey as Be, delegateCopy as Ke, labelSeparator as He, errorCopy as oa, scopedPicker as ua, openFolderInFileStation as ra, authorizationCopy as da } from "./index.js";
2
- import { DEFAULT_REQUEST_TIMEOUT as ts, FILE_STATION_APP as ls, activePage as ss, authorizationCatalogs as ns, backgroundCatalogs as is, catalogs as os, clientTimeout as us, createBackgroundSaveFacade as rs, createFileTransfers as ds, createPortalAccess as vs, decodeResponse as cs, delegateCatalogs as ps, encodeRequest as fs, fileStationPath as ys, identityCatalogs as ms, mergeCatalogs as bs, nasCatalogs as gs, openFileInFileStation as hs, portalCatalogs as ks, portalMessages as _s, protocolCodes as ws, protocolOps as xs, protocolSchemas as Cs, saveCatalogs as $s, shellCatalogs as Ss, shellPages as zs, uiLocales as Ps } from "./index.js";
3
- import { inject as Ge, ref as b, onBeforeUnmount as ye, defineComponent as oe, computed as L, openBlock as s, createBlock as x, unref as e, withCtx as l, createVNode as d, renderSlot as De, createElementVNode as $, markRaw as va, h as ca, onMounted as ge, createElementBlock as V, createTextVNode as g, toDisplayString as t, createCommentVNode as h, watch as Je, Fragment as ne, createSlots as Xe, withModifiers as Se, onUnmounted as Qe, nextTick as pa, renderList as ke, provide as fa } from "vue";
4
- import { AppLayout as ya, PageContent as ma, PageHeader as ba, AppSidebar as ga, FileTypeIcon as Ee, IconButton as Ue, Breadcrumb as ha, FilePicker as ka, Button as U, Callout as X, TreeView as _a, DataGrid as wa, Dialog as qe, SettingsSection as he, PathDisplay as pe, Link as Ye, Form as ze, FormItem as fe, Input as _e, FormActions as Pe, Card as Fe, Badge as $e, Select as Ze, Checkbox as xa, KeyValueRow as Ce, DataTable as Ca, formatFileSize as $a, Pagination as Sa, SettingsRow as za } from "@synopackageland/ui";
5
- import { Timer as Pa, Info as Va, ChevronLeft as Ia, ChevronRight as Ta, RotateCw as Ea, FolderOpen as Ua, ShieldCheck as Aa } from "@lucide/vue";
6
- const Da = /* @__PURE__ */ Symbol("executor-setup");
7
- function We() {
8
- return Ge(Da, {
1
+ import { delegateCopy as Te, shellCopy as pa, isFullPage as fa, uiLocale as je, nasCopy as be, nasErrorCopy as ea, format as qe, saveCopy as aa, saveError as Ie, createNasProvider as ta, identityCopy as ya, backgroundCopy as ma, createBackgroundPickerProvider as ba, backgroundErrorCopy as ga, requestKey as He, labelSeparator as la, errorCopy as ha, scopedPicker as ka, openFolderInFileStation as _a, authorizationCopy as wa } from "./index.js";
2
+ import { DEFAULT_REQUEST_TIMEOUT as Sn, FILE_STATION_APP as zn, activePage as Pn, authorizationCatalogs as Vn, backgroundCatalogs as An, bridgeCatalogs as In, bridgeErrorCopy as En, catalogs as Tn, clientTimeout as Un, createBackgroundSaveFacade as Rn, createFileTransfers as Dn, createPortalAccess as Bn, createStandaloneContext as Fn, createStandaloneHost as qn, decodeResponse as On, delegateCatalogs as Ln, encodeRequest as Nn, fileStationPath as Mn, identityCatalogs as Kn, mergeCatalogs as Hn, nasCatalogs as Gn, openFileInFileStation as Jn, portalCatalogs as Wn, portalMessages as Xn, protocolCodes as Qn, protocolOps as Yn, protocolSchemas as Zn, saveCatalogs as jn, shellCatalogs as es, shellPages as as, uiLocales as ts } from "./index.js";
3
+ import { inject as Le, ref as y, onBeforeUnmount as ce, Comment as xa, Text as Ca, Fragment as oe, defineComponent as ie, computed as U, onMounted as ve, openBlock as n, createBlock as g, unref as e, withCtx as t, createElementVNode as P, createTextVNode as k, toDisplayString as l, createVNode as f, createCommentVNode as b, createElementBlock as R, withModifiers as ze, provide as na, useTemplateRef as $a, watch as Ne, useSlots as Sa, watchEffect as za, resolveDynamicComponent as De, normalizeProps as Ge, guardReactiveProps as Je, renderSlot as ge, normalizeClass as We, createSlots as Me, markRaw as Pa, h as Va, onUnmounted as sa, nextTick as Aa, renderList as _e } from "vue";
4
+ import { SettingsSection as ke, Callout as W, Button as F, KeyValueRow as $e, Badge as Se, PathDisplay as ye, Form as Pe, FormItem as he, Select as oa, Input as we, FormActions as Ve, Dialog as Ue, ensureDeviceViewport as Ia, AppRoot as Ea, ConfigProvider as Ta, PageContent as Xe, PageHeader as Qe, AppLayout as Ua, AppSidebar as Ra, AppSidebarUser as Da, FileTypeIcon as Be, IconButton as Fe, Breadcrumb as Ba, FilePicker as Fa, TreeView as qa, DataGrid as Oa, SettingsRow as Ee, Link as ia, Card as Ye, Checkbox as La, LoadingArea as Na, DataTable as Ma, formatFileSize as Ka, Pagination as Ha } from "@synopackageland/ui";
5
+ import { Timer as Ga, Info as Ja, ChevronLeft as Wa, ChevronRight as Xa, RotateCw as Qa, FolderOpen as Ya, ShieldCheck as Za } from "@lucide/vue";
6
+ const Ke = /* @__PURE__ */ Symbol("executor-setup");
7
+ function ua() {
8
+ return Le(Ke, {
9
9
  async status() {
10
10
  return { state: "blocked", reason: "setup-unavailable" };
11
11
  },
@@ -17,174 +17,598 @@ function We() {
17
17
  }
18
18
  });
19
19
  }
20
- function Ml(y) {
21
- const q = b(!1), f = b(!1), a = b(), o = b("");
22
- let m = !1, i = 0, n, u;
23
- function r() {
24
- clearTimeout(n), clearTimeout(u);
20
+ function pn(r) {
21
+ const x = y(!1), i = y(!1), a = y(), u = y("");
22
+ let v = !1, o = 0, s, d;
23
+ function c() {
24
+ clearTimeout(s), clearTimeout(d);
25
25
  }
26
- function v(N = "") {
27
- i++, r(), a.value = void 0, o.value = N;
26
+ function p(z = "") {
27
+ o++, c(), a.value = void 0, u.value = z;
28
28
  }
29
- function k(N) {
30
- if (m) return;
31
- const K = Date.parse(N.expiresAt) - Date.now();
32
- if (!Number.isFinite(K) || K <= 0) {
33
- v("expired");
29
+ function h(z) {
30
+ if (v) return;
31
+ const I = Date.parse(z.expiresAt) - Date.now();
32
+ if (!Number.isFinite(I) || I <= 0) {
33
+ p("expired");
34
34
  return;
35
35
  }
36
- r(), a.value = N, o.value = "", n = setTimeout(() => v("expired"), K);
37
- const O = i;
38
- u = setTimeout(async () => {
36
+ c(), a.value = z, u.value = "", s = setTimeout(() => p("expired"), I);
37
+ const K = o;
38
+ d = setTimeout(async () => {
39
39
  try {
40
- const Z = await y.call("identity.session");
41
- !m && i === O && k(Z);
40
+ const H = await r.call("identity.session");
41
+ !v && o === K && h(H);
42
42
  } catch {
43
- !m && i === O && v("expired");
43
+ !v && o === K && p("expired");
44
44
  }
45
- }, Math.min(6e4, K));
45
+ }, Math.min(6e4, I));
46
46
  }
47
- async function D() {
47
+ async function A() {
48
48
  try {
49
- const N = await y.call("identity.status");
50
- if (m) return;
51
- if (q.value = N.enabled === !0, q.value)
49
+ const z = await r.call("identity.status");
50
+ if (v) return;
51
+ if (x.value = z.enabled === !0, x.value)
52
52
  try {
53
- k(await y.call("identity.session", { bootstrap: !0 }));
53
+ h(await r.call("identity.session", { bootstrap: !0 }));
54
54
  } catch {
55
- m || v();
55
+ v || p();
56
56
  }
57
- } catch (N) {
58
- const K = N?.code;
59
- q.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(K || ""), q.value && (o.value = "unavailable");
57
+ } catch (z) {
58
+ const I = z?.code;
59
+ x.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(I || ""), x.value && (u.value = "unavailable");
60
60
  } finally {
61
- m || (f.value = !0);
61
+ v || (i.value = !0);
62
62
  }
63
63
  }
64
- async function S(N, K) {
65
- const O = i;
64
+ async function $(z, I) {
65
+ const K = o;
66
66
  try {
67
- const Z = await y.call(N, K);
68
- if (m || q.value && O !== i) throw { code: "session_required" };
69
- return Z;
70
- } catch (Z) {
71
- const ae = Z?.code;
72
- throw !m && O === i && q.value && ["session_required", "session_revalidation_required"].includes(ae || "") && v(ae === "session_revalidation_required" ? "revalidate" : "expired"), Z;
67
+ const H = await r.call(z, I);
68
+ if (v || x.value && K !== o) throw { code: "session_required" };
69
+ return H;
70
+ } catch (H) {
71
+ const le = H?.code;
72
+ throw !v && K === o && x.value && ["session_required", "session_revalidation_required"].includes(le || "") && p(le === "session_revalidation_required" ? "revalidate" : "expired"), H;
73
73
  }
74
74
  }
75
- async function c(N, K, O) {
76
- const Z = await y.call("identity.login", { account: N, password: K, otp: O });
77
- m || (i++, k(Z));
75
+ async function _(z, I, K) {
76
+ const H = await r.call("identity.login", { account: z, password: I, otp: K });
77
+ v || (o++, h(H));
78
78
  }
79
- async function w() {
80
- const N = await y.call("identity.session", { bootstrap: !0 });
81
- m || (i++, k(N));
79
+ async function S() {
80
+ const z = await r.call("identity.session", { bootstrap: !0 });
81
+ v || (o++, h(z));
82
82
  }
83
- async function z() {
84
- await y.call("identity.logout"), m || v();
83
+ async function V() {
84
+ await r.call("identity.logout"), v || p();
85
85
  }
86
- function M() {
87
- m = !0, v();
86
+ function E() {
87
+ v = !0, p();
88
88
  }
89
- return { enabled: q, ready: f, subject: a, notice: o, start: D, call: S, login: c, bootstrap: w, logout: z, dispose: M };
89
+ return { enabled: x, ready: i, subject: a, notice: u, start: A, call: $, login: _, bootstrap: S, logout: V, dispose: E };
90
90
  }
91
- function Ra() {
92
- const y = b(!1), q = b();
93
- let f = !1, a = 0, o;
94
- function m() {
95
- a++, o?.abort(), o = void 0, y.value = !1, q.value = void 0;
91
+ function ja() {
92
+ const r = y(!1), x = y();
93
+ let i = !1, a = 0, u;
94
+ function v() {
95
+ a++, u?.abort(), u = void 0, r.value = !1, x.value = void 0;
96
96
  }
97
- async function i(n) {
98
- if (f || y.value) return;
99
- const u = ++a, r = new AbortController();
100
- o = r, y.value = !0, q.value = void 0;
97
+ async function o(s) {
98
+ if (i || r.value) return;
99
+ const d = ++a, c = new AbortController();
100
+ u = c, r.value = !0, x.value = void 0;
101
101
  try {
102
- const v = await n(r.signal);
103
- return !f && u === a ? v : void 0;
104
- } catch (v) {
105
- !f && u === a && (q.value = v);
102
+ const p = await s(c.signal);
103
+ return !i && d === a ? p : void 0;
104
+ } catch (p) {
105
+ !i && d === a && (x.value = p);
106
106
  return;
107
107
  } finally {
108
- !f && u === a && (y.value = !1, o = void 0);
108
+ !i && d === a && (r.value = !1, u = void 0);
109
109
  }
110
110
  }
111
- return ye(() => {
112
- f = !0, m();
113
- }), { busy: y, error: q, run: i, cancel: m };
111
+ return ce(() => {
112
+ i = !0, v();
113
+ }), { busy: r, error: x, run: o, cancel: v };
114
114
  }
115
- const qa = { class: "app-page-content" }, Ba = /* @__PURE__ */ oe({
115
+ function ra(r) {
116
+ return Array.isArray(r) && r.some((x) => {
117
+ const i = x;
118
+ return i.type === xa ? !1 : i.type === Ca ? String(i.children).trim() !== "" : i.type === oe ? ra(i.children) : !0;
119
+ });
120
+ }
121
+ const et = { status: Ja, background: Ga };
122
+ function at(r, x) {
123
+ return r.map((i) => typeof i == "string" ? { id: i, title: x[i], icon: et[i] } : i);
124
+ }
125
+ function tt(r) {
126
+ const x = /* @__PURE__ */ new Map();
127
+ for (const i of r) {
128
+ if (i.hidden) continue;
129
+ let a = x.get(i.group);
130
+ a || x.set(i.group, a = i.group === void 0 ? { items: [] } : { label: i.group, items: [] }), a.items.push({ key: i.id, label: i.title, icon: i.icon, badge: i.badge });
131
+ }
132
+ return [...x.values()];
133
+ }
134
+ const lt = { class: "executor-alert" }, nt = {
135
+ key: 1,
136
+ class: "executor-summary"
137
+ }, st = ["data-executor-status"], ot = { class: "executor-help" }, it = {
138
+ key: 0,
139
+ class: "executor-hint"
140
+ }, ut = /* @__PURE__ */ ie({
141
+ __name: "ExecutorSettings",
142
+ props: {
143
+ admin: { type: Boolean },
144
+ locale: {},
145
+ ctx: {}
146
+ },
147
+ emits: ["confirmed"],
148
+ setup(r, { expose: x, emit: i }) {
149
+ const a = r, u = i, v = ua(), o = U(() => Te(a.locale)), s = y(), d = y(""), c = y(!1), p = y(!1), h = y(!1), A = y(), $ = y(""), _ = y([]), S = U(() => A.value?.scope_mode === "install-selected"), V = U(() => !!A.value?.scope_mode), E = U(() => [{ label: o.value.homeScope, value: "home" }, ..._.value]), z = U(() => !S.value || !!$.value && E.value.some((Z) => Z.value === $.value)), I = U(() => S.value && !A.value?.selection), K = U(() => $.value !== A.value?.selection?.scope);
150
+ let H = !1;
151
+ async function le(Z) {
152
+ const G = Z ?? await v.status();
153
+ if (H || (s.value = G, !a.ctx)) return;
154
+ const j = await a.ctx.call("delegate.status");
155
+ if (H || (A.value = j, j.scope_mode !== "install-selected")) return;
156
+ const N = [];
157
+ let D = 0;
158
+ for (let O = 0; O < 128; O++) {
159
+ const J = await a.ctx.call("bg.browse", { offset: D });
160
+ if (H) return;
161
+ if (!Array.isArray(J.shares) || !Number.isSafeInteger(J.total) || J.total < 0 || !J.shares.length && D < J.total) throw { code: "EXECUTOR_PROTOCOL" };
162
+ for (const ae of J.shares)
163
+ ae.isdir && ae.path === "/" + ae.name && !["home", "homes"].includes(ae.name.toLowerCase()) && N.push({ label: ae.name, value: "shared:" + ae.name });
164
+ if (D += J.shares.length, D >= J.total) break;
165
+ if (O === 127) throw { code: "EXECUTOR_PROTOCOL" };
166
+ }
167
+ _.value = N, $.value = j.selection?.scope ?? j.preselection ?? "";
168
+ }
169
+ async function X() {
170
+ if (!(!a.admin || c.value)) {
171
+ c.value = !0, h.value = !1;
172
+ try {
173
+ await le();
174
+ } catch {
175
+ H || (h.value = !0);
176
+ } finally {
177
+ H || (c.value = !1);
178
+ }
179
+ }
180
+ }
181
+ async function Q() {
182
+ if (!a.admin || c.value || !d.value || !z.value || h.value) return;
183
+ c.value = !0, h.value = !1;
184
+ const Z = d.value;
185
+ d.value = "", p.value = !0;
186
+ try {
187
+ let G = S.value ? await v.authorize(Z, $.value) : await v.authorize(Z);
188
+ await le(G), !H && S.value && G.state === "ready" && I.value && (G = await v.authorize(Z, $.value), await le(G)), H || u("confirmed");
189
+ } catch {
190
+ H || (h.value = !0);
191
+ } finally {
192
+ H || (c.value = !1, p.value = !1);
193
+ }
194
+ }
195
+ const Y = U(() => p.value ? "confirming" : s.value ? s.value.state === "ready" ? I.value ? "scope" : "ready" : s.value.state === "needs-admin-approval" ? "needs" : "blocked" : void 0), ne = U(() => ({ ready: { tone: "success", text: o.value.statusReady }, scope: { tone: "warning", text: o.value.statusScope }, needs: { tone: "warning", text: o.value.statusNeeds }, blocked: { tone: "danger", text: o.value.statusBlocked }, confirming: { tone: "info", text: o.value.statusConfirming } })[Y.value ?? "confirming"]), se = U(() => S.value && !!A.value?.selection && !K.value), ee = U(() => p.value ? o.value.confirmingHelp : c.value || h.value ? "" : se.value ? o.value.hintUnchanged : d.value ? "" : o.value.hintPassword);
196
+ return x({ refresh: X }), ve(() => {
197
+ v.subscribe?.((Z) => {
198
+ H || (s.value = Z);
199
+ }), X();
200
+ }), ce(() => {
201
+ H = !0, d.value = "";
202
+ }), (Z, G) => r.admin ? (n(), g(e(ke), {
203
+ key: 0,
204
+ title: o.value.setupTitle,
205
+ description: V.value ? o.value.setupHelpFiles : o.value.setupHelp,
206
+ loading: !s.value && !p.value && !h.value,
207
+ collapsible: !1,
208
+ "aria-busy": c.value
209
+ }, {
210
+ default: t(() => [
211
+ h.value ? (n(), g(e(W), {
212
+ key: 0,
213
+ tone: "danger",
214
+ role: "alert"
215
+ }, {
216
+ default: t(() => [
217
+ P("span", lt, [
218
+ k(l(o.value.setupError), 1),
219
+ f(e(F), {
220
+ variant: "secondary",
221
+ size: "sm",
222
+ disabled: c.value,
223
+ onClick: X
224
+ }, {
225
+ default: t(() => [
226
+ k(l(o.value.retry), 1)
227
+ ]),
228
+ _: 1
229
+ }, 8, ["disabled"])
230
+ ])
231
+ ]),
232
+ _: 1
233
+ })) : b("", !0),
234
+ s.value || p.value ? (n(), R("div", nt, [
235
+ f(e($e), {
236
+ label: o.value.status,
237
+ "label-width": "10rem"
238
+ }, {
239
+ default: t(() => [
240
+ P("span", {
241
+ role: "status",
242
+ "data-executor-status": Y.value
243
+ }, [
244
+ f(e(Se), {
245
+ tone: ne.value.tone
246
+ }, {
247
+ default: t(() => [
248
+ k(l(ne.value.text), 1)
249
+ ]),
250
+ _: 1
251
+ }, 8, ["tone"])
252
+ ], 8, st)
253
+ ]),
254
+ _: 1
255
+ }, 8, ["label"]),
256
+ s.value?.reason && (s.value.state === "blocked" || s.value.state === "unsupported") ? (n(), g(e($e), {
257
+ key: 0,
258
+ label: o.value.details,
259
+ "label-width": "10rem"
260
+ }, {
261
+ default: t(() => [
262
+ k(l(s.value.reason), 1)
263
+ ]),
264
+ _: 1
265
+ }, 8, ["label"])) : b("", !0),
266
+ A.value?.selection ? (n(), g(e($e), {
267
+ key: 1,
268
+ label: o.value.protectedScope,
269
+ "label-width": "10rem"
270
+ }, {
271
+ default: t(() => [
272
+ f(e(ye), {
273
+ path: A.value.selection.root
274
+ }, null, 8, ["path"])
275
+ ]),
276
+ _: 1
277
+ }, 8, ["label"])) : b("", !0)
278
+ ])) : b("", !0),
279
+ Y.value === "needs" ? (n(), g(e(W), {
280
+ key: 2,
281
+ tone: "info"
282
+ }, {
283
+ default: t(() => [
284
+ k(l(V.value ? o.value.needs : o.value.executorNeeds), 1)
285
+ ]),
286
+ _: 1
287
+ })) : Y.value === "scope" ? (n(), g(e(W), {
288
+ key: 3,
289
+ tone: "warning"
290
+ }, {
291
+ default: t(() => [
292
+ k(l(o.value.scopeNeeds), 1)
293
+ ]),
294
+ _: 1
295
+ })) : Y.value === "blocked" ? (n(), g(e(W), {
296
+ key: 4,
297
+ tone: "warning"
298
+ }, {
299
+ default: t(() => [
300
+ k(l(V.value ? o.value.blocked : o.value.executorBlocked), 1)
301
+ ]),
302
+ _: 1
303
+ })) : b("", !0),
304
+ A.value?.mismatch ? (n(), g(e(W), {
305
+ key: 5,
306
+ tone: "warning"
307
+ }, {
308
+ default: t(() => [
309
+ k(l(o.value.scopeMismatch), 1)
310
+ ]),
311
+ _: 1
312
+ })) : b("", !0),
313
+ s.value?.state === "needs-admin-approval" || s.value?.retry || S.value && s.value?.state === "ready" ? (n(), g(e(Pe), {
314
+ key: 6,
315
+ direction: "vertical",
316
+ class: "executor-form",
317
+ onSubmit: ze(Q, ["prevent"])
318
+ }, {
319
+ default: t(() => [
320
+ S.value ? (n(), R(oe, { key: 0 }, [
321
+ P("p", ot, l(A.value?.selection ? o.value.scopeChangeHelp : o.value.preselectionHelp), 1),
322
+ f(e(he), {
323
+ label: o.value.scopeLabel,
324
+ "label-for": "delegate-scope"
325
+ }, {
326
+ default: t(() => [
327
+ f(e(oa), {
328
+ id: "delegate-scope",
329
+ modelValue: $.value,
330
+ "onUpdate:modelValue": G[0] || (G[0] = (j) => $.value = j),
331
+ options: E.value,
332
+ disabled: c.value || h.value
333
+ }, null, 8, ["modelValue", "options", "disabled"])
334
+ ]),
335
+ _: 1
336
+ }, 8, ["label"])
337
+ ], 64)) : b("", !0),
338
+ f(e(he), {
339
+ label: o.value.password,
340
+ "label-for": "delegate-password"
341
+ }, {
342
+ default: t(() => [
343
+ f(e(we), {
344
+ id: "delegate-password",
345
+ modelValue: d.value,
346
+ "onUpdate:modelValue": G[1] || (G[1] = (j) => d.value = j),
347
+ type: "password",
348
+ autocomplete: "current-password",
349
+ disabled: c.value || h.value
350
+ }, null, 8, ["modelValue", "disabled"])
351
+ ]),
352
+ _: 1
353
+ }, 8, ["label"]),
354
+ f(e(Ve), null, {
355
+ default: t(() => [
356
+ f(e(F), {
357
+ type: "submit",
358
+ variant: "primary",
359
+ disabled: c.value || h.value || !d.value || !z.value || se.value
360
+ }, {
361
+ default: t(() => [
362
+ k(l(S.value ? A.value?.selection ? o.value.confirmScope : o.value.confirmShare : o.value.authorize), 1)
363
+ ]),
364
+ _: 1
365
+ }, 8, ["disabled"]),
366
+ ee.value ? (n(), R("span", it, l(ee.value), 1)) : b("", !0)
367
+ ]),
368
+ _: 1
369
+ })
370
+ ]),
371
+ _: 1
372
+ })) : b("", !0)
373
+ ]),
374
+ _: 1
375
+ }, 8, ["title", "description", "loading", "aria-busy"])) : b("", !0);
376
+ }
377
+ }), ue = (r, x) => {
378
+ const i = r.__vccOpts || r;
379
+ for (const [a, u] of x)
380
+ i[a] = u;
381
+ return i;
382
+ }, da = /* @__PURE__ */ ue(ut, [["__scopeId", "data-v-574273c9"]]), rt = {
383
+ key: 0,
384
+ class: "executor-notice"
385
+ }, dt = { class: "executor-notice-body" }, ct = /* @__PURE__ */ ie({
386
+ __name: "ExecutorNotice",
387
+ props: {
388
+ locale: {},
389
+ ctx: {}
390
+ },
391
+ setup(r) {
392
+ const x = r, i = U(() => Te(x.locale)), a = x.ctx.executor;
393
+ a && na(Ke, a);
394
+ const u = y("checking"), v = y(!1), o = U(() => x.ctx.user?.isAdmin === !0), s = U(() => u.value === "needs-admin-approval" || u.value === "blocked"), d = U(() => x.ctx.call ? x.ctx : void 0);
395
+ let c = !1, p;
396
+ async function h() {
397
+ if (a)
398
+ try {
399
+ const A = await a.status();
400
+ c || (u.value = A.state);
401
+ } catch {
402
+ c || (u.value = "blocked");
403
+ }
404
+ }
405
+ return ve(() => {
406
+ a && (a.subscribe?.((A) => {
407
+ c || (u.value = A.state);
408
+ }), p = x.ctx.reopen?.(() => {
409
+ h();
410
+ }), h());
411
+ }), ce(() => {
412
+ c = !0, p?.();
413
+ }), (A, $) => s.value ? (n(), R("div", rt, [
414
+ f(e(W), { tone: "warning" }, {
415
+ default: t(() => [
416
+ P("span", dt, [
417
+ k(l(o.value ? i.value.noticeAdmin : i.value.noticeUser), 1),
418
+ o.value ? (n(), g(e(F), {
419
+ key: 0,
420
+ variant: "secondary",
421
+ size: "sm",
422
+ onClick: $[0] || ($[0] = (_) => v.value = !0)
423
+ }, {
424
+ default: t(() => [
425
+ k(l(i.value.noticeApprove), 1)
426
+ ]),
427
+ _: 1
428
+ })) : b("", !0)
429
+ ])
430
+ ]),
431
+ _: 1
432
+ }),
433
+ o.value ? (n(), g(e(Ue), {
434
+ key: 0,
435
+ open: v.value && s.value,
436
+ title: i.value.authorize,
437
+ width: "560px",
438
+ "onUpdate:open": $[1] || ($[1] = (_) => v.value = _)
439
+ }, {
440
+ default: t(() => [
441
+ f(da, {
442
+ admin: !0,
443
+ locale: r.locale,
444
+ ctx: d.value,
445
+ onConfirmed: h
446
+ }, null, 8, ["locale", "ctx"])
447
+ ]),
448
+ _: 1
449
+ }, 8, ["open", "title"])) : b("", !0)
450
+ ])) : b("", !0);
451
+ }
452
+ }), vt = /* @__PURE__ */ ue(ct, [["__scopeId", "data-v-af58fd95"]]), pt = { role: "alert" }, ft = {
453
+ key: 2,
454
+ class: "app-notices"
455
+ }, yt = { class: "app-page-content" }, mt = /* @__PURE__ */ ie({
116
456
  __name: "AppShell",
117
457
  props: {
118
458
  locale: {},
119
459
  modelValue: {},
120
460
  pages: {},
121
- description: {}
461
+ description: {},
462
+ ctx: {},
463
+ wideLayout: {},
464
+ sidebarStorageKey: {},
465
+ brandName: {},
466
+ brandIcon: {},
467
+ keepScroll: { type: Boolean },
468
+ pageWidth: {},
469
+ denied: { type: [Boolean, Object] },
470
+ appRoot: { type: Boolean }
122
471
  },
123
472
  emits: ["update:modelValue"],
124
- setup(y, { emit: q }) {
125
- const f = y, a = q, o = L(() => aa(f.locale)), m = { status: Va, background: Pa }, i = L(() => [{
126
- items: f.pages.map((u) => ({ key: u, label: o.value[u], icon: m[u] }))
127
- }]), n = L(() => o.value[f.modelValue] ?? o.value.status);
128
- return (u, r) => (s(), x(e(ya), {
129
- class: "app-shell",
130
- "min-height": "0",
131
- "wide-layout": "window"
132
- }, {
133
- sidebar: l(() => [
134
- d(e(ga), {
135
- "model-value": y.modelValue,
136
- groups: i.value,
137
- "onUpdate:modelValue": r[0] || (r[0] = (v) => a("update:modelValue", v))
138
- }, null, 8, ["model-value", "groups"])
139
- ]),
140
- default: l(() => [
141
- d(e(ma), { class: "app-page" }, {
142
- default: l(() => [
143
- d(e(ba), {
144
- title: n.value,
145
- description: y.description
473
+ setup(r, { emit: x }) {
474
+ const i = r, a = x, u = U(() => pa(i.locale)), v = U(() => at(i.pages, u.value)), o = U(() => tt(v.value)), s = U(() => v.value.find((I) => I.id === i.modelValue)), d = U(() => s.value?.title ?? u.value[i.modelValue] ?? u.value.status), c = $a("scroller"), p = U(() => i.pages.some((I) => typeof I != "string"));
475
+ Ne(() => i.modelValue, () => {
476
+ p.value && !i.keepScroll && c.value && (c.value.$el.scrollTop = 0);
477
+ }, { flush: "post" });
478
+ const h = Sa(), A = U(() => i.denied === !0 ? {} : i.denied || void 0), $ = U(() => i.ctx !== void 0 && fa(i.ctx)), _ = U(() => $.value ? i.ctx : void 0), S = (I, { slots: K }) => K.default?.(), V = U(() => i.ctx !== void 0 && !$.value);
479
+ function E() {
480
+ i.ctx?.host?.activateWindow?.();
481
+ }
482
+ const z = U(() => _.value?.user?.name ? _.value.user : void 0);
483
+ return za((I) => {
484
+ $.value && I(Ia());
485
+ }), (I, K) => (n(), g(De(r.appRoot ? e(Ea) : S), Ge(Je(r.appRoot ? { modalScope: "app", dialogBounds: V.value ? "viewport" : "app", style: "height: 100%;", onActivate: E } : {})), {
486
+ default: t(() => [
487
+ (n(), g(De(r.appRoot ? e(Ta) : S), Ge(Je(r.appRoot ? { locale: e(je)(r.locale) } : {})), {
488
+ default: t(() => [
489
+ A.value ? (n(), g(e(Xe), {
490
+ key: 0,
491
+ class: "app-denied",
492
+ width: r.pageWidth
146
493
  }, {
147
- actions: l(() => [
148
- De(u.$slots, "actions", {}, void 0, !0)
494
+ default: t(() => [
495
+ A.value.header !== !1 ? (n(), g(e(Qe), {
496
+ key: 0,
497
+ title: A.value.title ?? u.value.deniedTitle
498
+ }, null, 8, ["title"])) : b("", !0),
499
+ ge(I.$slots, "denied", {}, () => [
500
+ f(e(W), { tone: "danger" }, {
501
+ default: t(() => [
502
+ P("span", pt, l(A.value.message ?? u.value.deniedMessage), 1)
503
+ ]),
504
+ _: 1
505
+ })
506
+ ], !0)
149
507
  ]),
150
508
  _: 3
151
- }, 8, ["title", "description"]),
152
- $("div", qa, [
153
- De(u.$slots, "default", {}, void 0, !0)
154
- ])
509
+ }, 8, ["width"])) : (n(), g(e(Ua), {
510
+ key: 1,
511
+ class: We(["app-shell", { "app-shell-fill": s.value?.fill }]),
512
+ "min-height": "0",
513
+ "wide-layout": r.wideLayout ?? ($.value ? "web" : "window"),
514
+ "sidebar-storage-key": r.sidebarStorageKey,
515
+ "brand-name": r.brandName ?? r.ctx?.displayName,
516
+ "brand-icon": r.brandIcon ?? r.ctx?.appIcon
517
+ }, Me({
518
+ sidebar: t(() => [
519
+ f(e(Ra), {
520
+ "model-value": r.modelValue,
521
+ groups: o.value,
522
+ "onUpdate:modelValue": K[0] || (K[0] = (H) => a("update:modelValue", H))
523
+ }, null, 8, ["model-value", "groups"])
524
+ ]),
525
+ default: t(() => [
526
+ f(e(Xe), {
527
+ ref_key: "scroller",
528
+ ref: c,
529
+ class: We(["app-page", { "app-page-fill": s.value?.fill }]),
530
+ width: r.pageWidth
531
+ }, {
532
+ default: t(() => [
533
+ s.value?.header !== !1 ? (n(), g(e(Qe), {
534
+ key: 0,
535
+ title: d.value,
536
+ description: s.value?.description ?? r.description
537
+ }, {
538
+ actions: t(() => [
539
+ ge(I.$slots, "actions", { page: r.modelValue }, void 0, !0)
540
+ ]),
541
+ _: 3
542
+ }, 8, ["title", "description"])) : b("", !0),
543
+ r.ctx?.executor ? (n(), g(vt, {
544
+ key: 1,
545
+ ctx: r.ctx,
546
+ locale: r.locale
547
+ }, null, 8, ["ctx", "locale"])) : b("", !0),
548
+ e(ra)(h.notices?.({ page: r.modelValue })) ? (n(), R("div", ft, [
549
+ ge(I.$slots, "notices", { page: r.modelValue }, void 0, !0)
550
+ ])) : b("", !0),
551
+ P("div", yt, [
552
+ s.value?.component ? (n(), g(De(s.value.component), {
553
+ key: s.value.id
554
+ })) : b("", !0),
555
+ ge(I.$slots, "default", { page: r.modelValue }, void 0, !0)
556
+ ])
557
+ ]),
558
+ _: 3
559
+ }, 8, ["class", "width"])
560
+ ]),
561
+ _: 2
562
+ }, [
563
+ h["sidebar-footer"] || z.value ? {
564
+ name: "sidebar-footer",
565
+ fn: t(() => [
566
+ ge(I.$slots, "sidebar-footer", {}, () => [
567
+ z.value ? (n(), g(e(Da), {
568
+ key: 0,
569
+ name: z.value.name,
570
+ detail: z.value.isAdmin ? u.value.administrator : u.value.dsmUser
571
+ }, null, 8, ["name", "detail"])) : b("", !0)
572
+ ], !0)
573
+ ]),
574
+ key: "0"
575
+ } : void 0,
576
+ h.toolbar ? {
577
+ name: "toolbar",
578
+ fn: t(() => [
579
+ ge(I.$slots, "toolbar", { page: r.modelValue }, void 0, !0)
580
+ ]),
581
+ key: "1"
582
+ } : void 0
583
+ ]), 1032, ["class", "wide-layout", "sidebar-storage-key", "brand-name", "brand-icon"]))
155
584
  ]),
156
585
  _: 3
157
- })
586
+ }, 16))
158
587
  ]),
159
588
  _: 3
160
- }));
589
+ }, 16));
161
590
  }
162
- }), ue = (y, q) => {
163
- const f = y.__vccOpts || y;
164
- for (const [a, o] of q)
165
- f[a] = o;
166
- return f;
167
- }, Kl = /* @__PURE__ */ ue(Ba, [["__scopeId", "data-v-05f63ca5"]]), Oe = ["B", "KB", "MB", "GB", "TB", "PB"];
168
- function Re(y, q) {
169
- let f = 0, a = y;
170
- for (; a >= 1024 && f < Oe.length - 1; )
171
- a /= 1024, f++;
172
- return `${new Intl.NumberFormat(q, { maximumFractionDigits: f ? 1 : 0 }).format(a)} ${Oe[f]}`;
591
+ }), fn = /* @__PURE__ */ ue(mt, [["__scopeId", "data-v-098c9e72"]]), Ze = ["B", "KB", "MB", "GB", "TB", "PB"];
592
+ function Oe(r, x) {
593
+ let i = 0, a = r;
594
+ for (; a >= 1024 && i < Ze.length - 1; )
595
+ a /= 1024, i++;
596
+ return `${new Intl.NumberFormat(x, { maximumFractionDigits: i ? 1 : 0 }).format(a)} ${Ze[i]}`;
173
597
  }
174
- const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-location" }, La = ["aria-label"], Na = {
598
+ const bt = ["aria-busy", "aria-label"], gt = { class: "file-toolbar file-location" }, ht = ["aria-label"], kt = {
175
599
  key: 0,
176
600
  class: "file-toolbar"
177
- }, Ma = {
601
+ }, _t = {
178
602
  key: 1,
179
603
  role: "status"
180
- }, Ka = { role: "alert" }, Ha = {
604
+ }, wt = { role: "alert" }, xt = {
181
605
  key: 4,
182
606
  role: "status"
183
- }, Ga = { class: "file-columns" }, Ja = ["aria-label"], Xa = { class: "file-content" }, Qa = { class: "file-name" }, Ya = { class: "file-empty" }, Za = { class: "file-bytes" }, Wa = {
607
+ }, Ct = { class: "file-columns" }, $t = ["aria-label"], St = { class: "file-content" }, zt = { class: "file-name" }, Pt = { class: "file-empty" }, Vt = { class: "file-bytes" }, At = {
184
608
  key: 5,
185
609
  class: "file-selection",
186
610
  role: "status"
187
- }, ja = /* @__PURE__ */ oe({
611
+ }, It = /* @__PURE__ */ ie({
188
612
  __name: "FileBrowser",
189
613
  props: {
190
614
  provider: {},
@@ -193,310 +617,310 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
193
617
  transfers: { type: Boolean, default: !1 }
194
618
  },
195
619
  emits: ["selected"],
196
- setup(y, { emit: q }) {
197
- const f = y, a = q, o = L(() => be(f.locale)), m = Ra(), { busy: i, error: n } = m, u = b([]), r = b([]), v = b([]), k = b(), D = b(), S = b(), c = b([]), w = b(), z = b({ key: "name", direction: "asc" }), M = b(0), N = b([]), K = b(!1);
198
- let O = new AbortController();
199
- async function Z() {
200
- const C = k.value;
201
- !C || C.isDir || !f.provider.download || await m.run(async (P) => (await f.provider.info(C.path, P), f.provider.download(C.path), !0));
620
+ setup(r, { emit: x }) {
621
+ const i = r, a = x, u = U(() => be(i.locale)), v = ja(), { busy: o, error: s } = v, d = y([]), c = y([]), p = y([]), h = y(), A = y(), $ = y(), _ = y([]), S = y(), V = y({ key: "name", direction: "asc" }), E = y(0), z = y([]), I = y(!1);
622
+ let K = new AbortController();
623
+ async function H() {
624
+ const C = h.value;
625
+ !C || C.isDir || !i.provider.download || await v.run(async (T) => (await i.provider.info(C.path, T), i.provider.download(C.path), !0));
202
626
  }
203
- async function ae() {
204
- const C = v.value.at(-1)?.path, P = N.value[0];
205
- if (!C || !P || !f.provider.upload) return;
206
- K.value = !1, await m.run(async (p) => (await f.provider.upload(C, P, p), !0)) && (N.value = [], await re(v.value), K.value = !0);
627
+ async function le() {
628
+ const C = p.value.at(-1)?.path, T = z.value[0];
629
+ if (!C || !T || !i.provider.upload) return;
630
+ I.value = !1, await v.run(async (m) => (await i.provider.upload(C, T, m), !0)) && (z.value = [], await ae(p.value), I.value = !0);
207
631
  }
208
- const W = L(() => [
209
- { key: "name", label: o.value.nameColumn, sortable: !0 },
210
- { key: "kind", label: o.value.kindColumn },
211
- { key: "bytes", label: o.value.sizeColumn, align: "right", sortable: !0 }
212
- ]), H = va((C, { attrs: P }) => ca(Ee, { ...P, kind: "folder" }));
213
- function j(C) {
214
- return { id: C.path, label: C.name, icon: H, data: C };
632
+ const X = U(() => [
633
+ { key: "name", label: u.value.nameColumn, sortable: !0 },
634
+ { key: "kind", label: u.value.kindColumn },
635
+ { key: "bytes", label: u.value.sizeColumn, align: "right", sortable: !0 }
636
+ ]), Q = Pa((C, { attrs: T }) => Va(Be, { ...T, kind: "folder" }));
637
+ function Y(C) {
638
+ return { id: C.path, label: C.name, icon: Q, data: C };
215
639
  }
216
- function te(C) {
217
- k.value = C, a("selected", C?.path);
640
+ function ne(C) {
641
+ h.value = C, a("selected", C?.path);
218
642
  }
219
643
  function se(C) {
220
- D.value = C.path, te(f.mode === "folder" ? C.isDir ? C : v.value.at(-1) : C.isDir ? void 0 : C);
644
+ A.value = C.path, ne(i.mode === "folder" ? C.isDir ? C : p.value.at(-1) : C.isDir ? void 0 : C);
221
645
  }
222
- function Q(C) {
223
- C.isDir ? ve(C) : se(C);
646
+ function ee(C) {
647
+ C.isDir ? pe(C) : se(C);
224
648
  }
225
- const Y = (C) => u.value.find((P) => P.path === C);
226
- function G(C, P, I = []) {
227
- for (const p of C) {
228
- const B = [...I, p.data];
229
- if (p.id === P) return B;
230
- const _ = G(p.children ?? [], P, B);
231
- if (_) return _;
649
+ const Z = (C) => d.value.find((T) => T.path === C);
650
+ function G(C, T, B = []) {
651
+ for (const m of C) {
652
+ const L = [...B, m.data];
653
+ if (m.id === T) return L;
654
+ const w = G(m.children ?? [], T, L);
655
+ if (w) return w;
232
656
  }
233
657
  }
234
- function le(C, P) {
235
- for (const I of C) {
236
- if (I.id === P) return I;
237
- const p = le(I.children ?? [], P);
238
- if (p) return p;
658
+ function j(C, T) {
659
+ for (const B of C) {
660
+ if (B.id === T) return B;
661
+ const m = j(B.children ?? [], T);
662
+ if (m) return m;
239
663
  }
240
664
  }
241
- function R(C, P, I) {
242
- return C.map((p) => p.id === P ? { ...p, children: I } : p.children ? { ...p, children: R(p.children, P, I) } : p);
665
+ function N(C, T, B) {
666
+ return C.map((m) => m.id === T ? { ...m, children: B } : m.children ? { ...m, children: N(m.children, T, B) } : m);
243
667
  }
244
- let T = 0;
245
- async function E(C) {
246
- const P = ++T;
247
- for (const I of C.slice(0, -1)) {
248
- const p = le(r.value, I.path);
249
- if (!p) break;
250
- if (p.children === void 0) {
251
- const B = await J(p);
252
- if (P !== T || !B) return;
253
- r.value = R(r.value, p.id, B);
668
+ let D = 0;
669
+ async function O(C) {
670
+ const T = ++D;
671
+ for (const B of C.slice(0, -1)) {
672
+ const m = j(c.value, B.path);
673
+ if (!m) break;
674
+ if (m.children === void 0) {
675
+ const L = await J(m);
676
+ if (T !== D || !L) return;
677
+ c.value = N(c.value, m.id, L);
254
678
  }
255
- c.value.includes(p.id) || (c.value = [...c.value, p.id]);
679
+ _.value.includes(m.id) || (_.value = [..._.value, m.id]);
256
680
  }
257
- w.value = C.at(-1)?.path;
681
+ S.value = C.at(-1)?.path;
258
682
  }
259
683
  async function J(C) {
260
- const P = M.value, I = O.signal;
684
+ const T = E.value, B = K.signal;
261
685
  try {
262
- const p = [];
263
- let B = 0;
264
- for (; B !== void 0; ) {
265
- const _ = await f.provider.list(C.id, { offset: B, sortBy: "name", sortDirection: "ASC" }, I);
266
- if (I.aborted || P !== M.value) return;
267
- p.push(..._.entries.filter((ie) => ie.isDir).map(j)), B = _.nextOffset;
686
+ const m = [];
687
+ let L = 0;
688
+ for (; L !== void 0; ) {
689
+ const w = await i.provider.list(C.id, { offset: L, sortBy: "name", sortDirection: "ASC" }, B);
690
+ if (B.aborted || T !== E.value) return;
691
+ m.push(...w.entries.filter((re) => re.isDir).map(Y)), L = w.nextOffset;
268
692
  }
269
- return p;
270
- } catch (p) {
271
- !I.aborted && P === M.value && (n.value = p, te());
693
+ return m;
694
+ } catch (m) {
695
+ !B.aborted && T === E.value && (s.value = m, ne());
272
696
  return;
273
697
  }
274
698
  }
275
- async function re(C, P = !1) {
276
- if (i.value) return;
277
- te(), D.value = void 0, u.value = P ? u.value : [], S.value = P ? S.value : void 0;
278
- const I = P ? S.value ?? 0 : 0, p = C.at(-1)?.path;
279
- v.value = C;
280
- const B = await m.run((_) => p ? f.provider.list(p, { offset: I, sortBy: z.value.key, sortDirection: z.value.direction === "asc" ? "ASC" : "DESC" }, _) : f.provider.shares(I, _));
281
- B && (u.value = P ? [...u.value, ...B.entries] : B.entries, S.value = B.nextOffset, p ? f.mode === "folder" && !P && te(C.at(-1)) : r.value = u.value.filter((_) => _.isDir).map(j), P || E(C));
699
+ async function ae(C, T = !1) {
700
+ if (o.value) return;
701
+ ne(), A.value = void 0, d.value = T ? d.value : [], $.value = T ? $.value : void 0;
702
+ const B = T ? $.value ?? 0 : 0, m = C.at(-1)?.path;
703
+ p.value = C;
704
+ const L = await v.run((w) => m ? i.provider.list(m, { offset: B, sortBy: V.value.key, sortDirection: V.value.direction === "asc" ? "ASC" : "DESC" }, w) : i.provider.shares(B, w));
705
+ L && (d.value = T ? [...d.value, ...L.entries] : L.entries, $.value = L.nextOffset, m ? i.mode === "folder" && !T && ne(C.at(-1)) : c.value = d.value.filter((w) => w.isDir).map(Y), T || O(C));
282
706
  }
283
- const we = L(() => [{ id: "", display: o.value.roots }, ...v.value.map((C) => ({ id: C.path, display: C.name }))]);
284
- function xe(C) {
285
- const P = we.value.findIndex((I) => I.id === C.id);
286
- P < v.value.length && me(v.value.slice(0, P));
707
+ const xe = U(() => [{ id: "", display: u.value.roots }, ...p.value.map((C) => ({ id: C.path, display: C.name }))]);
708
+ function Ce(C) {
709
+ const T = xe.value.findIndex((B) => B.id === C.id);
710
+ T < p.value.length && me(p.value.slice(0, T));
287
711
  }
288
- function ve(C) {
289
- me([...v.value, C]);
712
+ function pe(C) {
713
+ me([...p.value, C]);
290
714
  }
291
- const ce = b([[]]), de = b(0);
715
+ const fe = y([[]]), de = y(0);
292
716
  function me(C) {
293
- i.value || (C.at(-1)?.path !== v.value.at(-1)?.path && (ce.value = [...ce.value.slice(0, de.value + 1), C], de.value++), re(C));
717
+ o.value || (C.at(-1)?.path !== p.value.at(-1)?.path && (fe.value = [...fe.value.slice(0, de.value + 1), C], de.value++), ae(C));
294
718
  }
295
- function F(C) {
296
- i.value || (de.value += C, re(ce.value[de.value]));
719
+ function M(C) {
720
+ o.value || (de.value += C, ae(fe.value[de.value]));
297
721
  }
298
- function ee(C) {
299
- z.value = { key: C?.key === "bytes" ? "size" : "name", direction: C?.direction ?? "asc" }, re(v.value);
722
+ function te(C) {
723
+ V.value = { key: C?.key === "bytes" ? "size" : "name", direction: C?.direction ?? "asc" }, ae(p.value);
300
724
  }
301
- function A() {
302
- i.value || (M.value++, O.abort(), O = new AbortController(), r.value = [], c.value = [], w.value = void 0, ce.value = [[]], de.value = 0, re([]));
725
+ function q() {
726
+ o.value || (E.value++, K.abort(), K = new AbortController(), c.value = [], _.value = [], S.value = void 0, fe.value = [[]], de.value = 0, ae([]));
303
727
  }
304
- return ge(() => {
305
- re([]);
306
- }), ye(() => {
307
- M.value++, O.abort();
308
- }), (C, P) => (s(), V("section", {
728
+ return ve(() => {
729
+ ae([]);
730
+ }), ce(() => {
731
+ E.value++, K.abort();
732
+ }), (C, T) => (n(), R("section", {
309
733
  class: "file-browser",
310
- "aria-busy": e(i),
311
- "aria-label": o.value.title
734
+ "aria-busy": e(o),
735
+ "aria-label": u.value.title
312
736
  }, [
313
- $("div", Oa, [
314
- d(e(Ue), {
315
- label: o.value.back,
737
+ P("div", gt, [
738
+ f(e(Fe), {
739
+ label: u.value.back,
316
740
  size: "sm",
317
- disabled: e(i) || de.value === 0,
318
- onClick: P[0] || (P[0] = (I) => F(-1))
741
+ disabled: e(o) || de.value === 0,
742
+ onClick: T[0] || (T[0] = (B) => M(-1))
319
743
  }, {
320
- default: l(() => [
321
- d(e(Ia), {
744
+ default: t(() => [
745
+ f(e(Wa), {
322
746
  size: 16,
323
747
  "aria-hidden": "true"
324
748
  })
325
749
  ]),
326
750
  _: 1
327
751
  }, 8, ["label", "disabled"]),
328
- d(e(Ue), {
329
- label: o.value.forward,
752
+ f(e(Fe), {
753
+ label: u.value.forward,
330
754
  size: "sm",
331
- disabled: e(i) || de.value === ce.value.length - 1,
332
- onClick: P[1] || (P[1] = (I) => F(1))
755
+ disabled: e(o) || de.value === fe.value.length - 1,
756
+ onClick: T[1] || (T[1] = (B) => M(1))
333
757
  }, {
334
- default: l(() => [
335
- d(e(Ta), {
758
+ default: t(() => [
759
+ f(e(Xa), {
336
760
  size: 16,
337
761
  "aria-hidden": "true"
338
762
  })
339
763
  ]),
340
764
  _: 1
341
765
  }, 8, ["label", "disabled"]),
342
- d(e(Ue), {
343
- label: o.value.refresh,
766
+ f(e(Fe), {
767
+ label: u.value.refresh,
344
768
  size: "sm",
345
- disabled: e(i),
346
- onClick: A
769
+ disabled: e(o),
770
+ onClick: q
347
771
  }, {
348
- default: l(() => [
349
- d(e(Ea), {
772
+ default: t(() => [
773
+ f(e(Qa), {
350
774
  size: 14,
351
775
  "aria-hidden": "true"
352
776
  })
353
777
  ]),
354
778
  _: 1
355
779
  }, 8, ["label", "disabled"]),
356
- $("nav", {
780
+ P("nav", {
357
781
  class: "file-path",
358
- "aria-label": o.value.location
782
+ "aria-label": u.value.location
359
783
  }, [
360
- d(e(ha), {
361
- items: we.value,
362
- "collapsed-label": o.value.fullPath,
363
- onClickItem: xe
784
+ f(e(Ba), {
785
+ items: xe.value,
786
+ "collapsed-label": u.value.fullPath,
787
+ onClickItem: Ce
364
788
  }, null, 8, ["items", "collapsed-label"])
365
- ], 8, La)
789
+ ], 8, ht)
366
790
  ]),
367
- y.transfers && y.provider.upload && v.value.length ? (s(), V("div", Na, [
368
- d(e(ka), {
369
- modelValue: N.value,
370
- "onUpdate:modelValue": P[2] || (P[2] = (I) => N.value = I),
791
+ r.transfers && r.provider.upload && p.value.length ? (n(), R("div", kt, [
792
+ f(e(Fa), {
793
+ modelValue: z.value,
794
+ "onUpdate:modelValue": T[2] || (T[2] = (B) => z.value = B),
371
795
  variant: "compact",
372
- disabled: e(i),
796
+ disabled: e(o),
373
797
  "max-files": 1,
374
798
  "max-size": 16 * 1024 ** 3,
375
- title: o.value.upload,
376
- onRejected: P[3] || (P[3] = (I) => n.value = { code: "upload_size_required" })
799
+ title: u.value.upload,
800
+ onRejected: T[3] || (T[3] = (B) => s.value = { code: "upload_size_required" })
377
801
  }, null, 8, ["modelValue", "disabled", "title"]),
378
- d(e(U), {
802
+ f(e(F), {
379
803
  variant: "primary",
380
- disabled: e(i) || !N.value.length,
381
- onClick: ae
804
+ disabled: e(o) || !z.value.length,
805
+ onClick: le
382
806
  }, {
383
- default: l(() => [
384
- g(t(o.value.upload), 1)
807
+ default: t(() => [
808
+ k(l(u.value.upload), 1)
385
809
  ]),
386
810
  _: 1
387
811
  }, 8, ["disabled"])
388
- ])) : h("", !0),
389
- K.value ? (s(), V("p", Ma, t(o.value.uploaded), 1)) : h("", !0),
390
- y.transfers && y.provider.download && k.value && !k.value.isDir && !e(n) ? (s(), x(e(U), {
812
+ ])) : b("", !0),
813
+ I.value ? (n(), R("p", _t, l(u.value.uploaded), 1)) : b("", !0),
814
+ r.transfers && r.provider.download && h.value && !h.value.isDir && !e(s) ? (n(), g(e(F), {
391
815
  key: 2,
392
816
  variant: "secondary",
393
- disabled: e(i),
394
- onClick: Z
817
+ disabled: e(o),
818
+ onClick: H
395
819
  }, {
396
- default: l(() => [
397
- g(t(o.value.download), 1)
820
+ default: t(() => [
821
+ k(l(u.value.download), 1)
398
822
  ]),
399
823
  _: 1
400
- }, 8, ["disabled"])) : h("", !0),
401
- e(n) ? (s(), x(e(X), {
824
+ }, 8, ["disabled"])) : b("", !0),
825
+ e(s) ? (n(), g(e(W), {
402
826
  key: 3,
403
827
  tone: "danger"
404
828
  }, {
405
- default: l(() => [
406
- $("span", Ka, t(e(Le)(e(n), o.value)), 1)
829
+ default: t(() => [
830
+ P("span", wt, l(e(ea)(e(s), u.value)), 1)
407
831
  ]),
408
832
  _: 1
409
- })) : h("", !0),
410
- e(i) ? (s(), V("p", Ha, t(o.value.loading), 1)) : h("", !0),
411
- $("div", Ga, [
412
- $("aside", {
833
+ })) : b("", !0),
834
+ e(o) ? (n(), R("p", xt, l(u.value.loading), 1)) : b("", !0),
835
+ P("div", Ct, [
836
+ P("aside", {
413
837
  class: "file-tree",
414
- "aria-label": o.value.roots
838
+ "aria-label": u.value.roots
415
839
  }, [
416
- r.value.length ? (s(), x(e(_a), {
417
- key: M.value,
840
+ c.value.length ? (n(), g(e(qa), {
841
+ key: E.value,
418
842
  "selection-style": "background",
419
- modelValue: w.value,
420
- "onUpdate:modelValue": P[4] || (P[4] = (I) => w.value = I),
421
- nodes: r.value,
422
- "onUpdate:nodes": P[5] || (P[5] = (I) => r.value = I),
423
- expanded: c.value,
424
- "onUpdate:expanded": P[6] || (P[6] = (I) => c.value = I),
843
+ modelValue: S.value,
844
+ "onUpdate:modelValue": T[4] || (T[4] = (B) => S.value = B),
845
+ nodes: c.value,
846
+ "onUpdate:nodes": T[5] || (T[5] = (B) => c.value = B),
847
+ expanded: _.value,
848
+ "onUpdate:expanded": T[6] || (T[6] = (B) => _.value = B),
425
849
  "load-children": J,
426
- "expand-label": (I, p) => e(Ae)(p ? o.value.collapse : o.value.expand, { name: I.label }),
427
- onSelect: P[7] || (P[7] = (I) => me(G(r.value, I.id) ?? [I.data]))
428
- }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : h("", !0)
429
- ], 8, Ja),
430
- $("div", Xa, [
431
- e(n) ? h("", !0) : (s(), x(e(wa), {
850
+ "expand-label": (B, m) => e(qe)(m ? u.value.collapse : u.value.expand, { name: B.label }),
851
+ onSelect: T[7] || (T[7] = (B) => me(G(c.value, B.id) ?? [B.data]))
852
+ }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : b("", !0)
853
+ ], 8, $t),
854
+ P("div", St, [
855
+ e(s) ? b("", !0) : (n(), g(e(Oa), {
432
856
  key: 0,
433
- columns: W.value,
434
- rows: u.value.map((I) => ({ ...I, kind: I.isDir ? o.value.directoryKind : o.value.fileKind })),
857
+ columns: X.value,
858
+ rows: d.value.map((B) => ({ ...B, kind: B.isDir ? u.value.directoryKind : u.value.fileKind })),
435
859
  "row-key": "path",
436
860
  footer: !1,
437
861
  resizable: !1,
438
862
  "local-sort": !1,
439
863
  "local-pagination": !1,
440
- loading: e(i),
441
- "loading-text": o.value.loading,
442
- sort: { key: z.value.key === "size" ? "bytes" : z.value.key, direction: z.value.direction },
443
- labels: { empty: o.value.emptyFolder },
864
+ loading: e(o),
865
+ "loading-text": u.value.loading,
866
+ sort: { key: V.value.key === "size" ? "bytes" : V.value.key, direction: V.value.direction },
867
+ labels: { empty: u.value.emptyFolder },
444
868
  "single-select": "",
445
- "selected-keys": D.value ? [D.value] : [],
446
- "onUpdate:sort": ee,
447
- "onUpdate:selectedKeys": P[8] || (P[8] = (I) => {
448
- e(i) || se(Y(I[0]));
869
+ "selected-keys": A.value ? [A.value] : [],
870
+ "onUpdate:sort": te,
871
+ "onUpdate:selectedKeys": T[8] || (T[8] = (B) => {
872
+ e(o) || se(Z(B[0]));
449
873
  }),
450
- onRowActivate: P[9] || (P[9] = (I) => {
451
- e(i) || Q(Y(I.path));
874
+ onRowActivate: T[9] || (T[9] = (B) => {
875
+ e(o) || ee(Z(B.path));
452
876
  }),
453
- onRowDblclick: P[10] || (P[10] = (I) => {
454
- e(i) || Q(Y(I.path));
877
+ onRowDblclick: T[10] || (T[10] = (B) => {
878
+ e(o) || ee(Z(B.path));
455
879
  })
456
880
  }, {
457
- "cell-name": l(({ row: I }) => [
458
- $("span", Qa, [
459
- d(e(Ee), {
460
- kind: I.isDir ? "folder" : "file",
461
- name: I.name
881
+ "cell-name": t(({ row: B }) => [
882
+ P("span", zt, [
883
+ f(e(Be), {
884
+ kind: B.isDir ? "folder" : "file",
885
+ name: B.name
462
886
  }, null, 8, ["kind", "name"]),
463
- g(t(I.name), 1)
887
+ k(l(B.name), 1)
464
888
  ])
465
889
  ]),
466
- empty: l(() => [
467
- $("div", Ya, [
468
- d(e(Ee), {
890
+ empty: t(() => [
891
+ P("div", Pt, [
892
+ f(e(Be), {
469
893
  kind: "folder",
470
894
  size: [40, 40]
471
895
  }),
472
- $("span", null, t(o.value.emptyFolder), 1)
896
+ P("span", null, l(u.value.emptyFolder), 1)
473
897
  ])
474
898
  ]),
475
- "cell-bytes": l(({ row: I }) => [
476
- $("span", Za, t(I.isDir || I.bytes === void 0 ? "—" : e(Re)(I.bytes, e(ta)(y.locale))), 1)
899
+ "cell-bytes": t(({ row: B }) => [
900
+ P("span", Vt, l(B.isDir || B.bytes === void 0 ? "—" : e(Oe)(B.bytes, e(je)(r.locale))), 1)
477
901
  ]),
478
902
  _: 1
479
903
  }, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels", "selected-keys"])),
480
- S.value !== void 0 && !e(n) ? (s(), x(e(U), {
904
+ $.value !== void 0 && !e(s) ? (n(), g(e(F), {
481
905
  key: 1,
482
906
  variant: "secondary",
483
- disabled: e(i),
484
- onClick: P[11] || (P[11] = (I) => re(v.value, !0))
907
+ disabled: e(o),
908
+ onClick: T[11] || (T[11] = (B) => ae(p.value, !0))
485
909
  }, {
486
- default: l(() => [
487
- g(t(o.value.loadMore), 1)
910
+ default: t(() => [
911
+ k(l(u.value.loadMore), 1)
488
912
  ]),
489
913
  _: 1
490
- }, 8, ["disabled"])) : h("", !0)
914
+ }, 8, ["disabled"])) : b("", !0)
491
915
  ])
492
916
  ]),
493
- k.value && !e(n) ? (s(), V("p", Wa, t(e(Ae)(o.value.selected, { name: k.value.path })), 1)) : h("", !0)
494
- ], 8, Fa));
917
+ h.value && !e(s) ? (n(), R("p", At, l(e(qe)(u.value.selected, { name: h.value.path })), 1)) : b("", !0)
918
+ ], 8, bt));
495
919
  }
496
- }), je = /* @__PURE__ */ ue(ja, [["__scopeId", "data-v-c689761c"]]), et = {
920
+ }), ca = /* @__PURE__ */ ue(It, [["__scopeId", "data-v-c689761c"]]), Et = {
497
921
  key: 0,
498
922
  class: "save-consent"
499
- }, at = ["aria-busy", "inert"], tt = /* @__PURE__ */ oe({
923
+ }, Tt = ["aria-busy", "inert"], Ut = /* @__PURE__ */ ie({
500
924
  __name: "NasPicker",
501
925
  props: {
502
926
  open: { type: Boolean },
@@ -509,561 +933,583 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
509
933
  errorText: { type: Function }
510
934
  },
511
935
  emits: ["update:open", "selected", "authorized", "refused"],
512
- setup(y, { emit: q }) {
513
- const f = y, a = q, o = b(), m = L(() => be(f.locale)), i = L(() => Ne(f.locale)), n = b(!1), u = b();
514
- let r = 0, v = !1;
515
- Je(() => f.open, () => {
516
- r++, o.value = void 0, u.value = void 0;
517
- }), ye(() => {
518
- v = !0, r++;
936
+ setup(r, { emit: x }) {
937
+ const i = r, a = x, u = y(), v = U(() => be(i.locale)), o = U(() => aa(i.locale)), s = y(!1), d = y();
938
+ let c = 0, p = !1;
939
+ Ne(() => i.open, () => {
940
+ c++, u.value = void 0, d.value = void 0;
941
+ }), ce(() => {
942
+ p = !0, c++;
519
943
  });
520
- function k() {
521
- n.value || (o.value = void 0, a("update:open", !1));
944
+ function h() {
945
+ s.value || (u.value = void 0, a("update:open", !1));
522
946
  }
523
- async function D() {
524
- const S = o.value, c = f.destination, w = r;
525
- if (!(!S || n.value || !f.open || v || c && f.mode !== "folder")) {
526
- if (!c) {
527
- a("selected", S), k();
947
+ async function A() {
948
+ const $ = u.value, _ = i.destination, S = c;
949
+ if (!(!$ || s.value || !i.open || p || _ && i.mode !== "folder")) {
950
+ if (!_) {
951
+ a("selected", $), h();
528
952
  return;
529
953
  }
530
- n.value = !0, u.value = void 0;
954
+ s.value = !0, d.value = void 0;
531
955
  try {
532
- const z = await c.selectDestination({ key: c.key, path: S });
533
- if (v || w !== r) return;
534
- if (!z || typeof z.id != "string" || !z.id || typeof z.username != "string" || !z.username || z.path !== S || z.key !== c.key || z.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
535
- a("authorized", z), n.value = !1, k();
536
- } catch (z) {
537
- if (v || w !== r) return;
538
- if (z?.code === "APP_DENIED") {
539
- n.value = !1, a("refused", z), k();
956
+ const V = await _.selectDestination({ key: _.key, path: $ });
957
+ if (p || S !== c) return;
958
+ if (!V || typeof V.id != "string" || !V.id || typeof V.username != "string" || !V.username || V.path !== $ || V.key !== _.key || V.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
959
+ a("authorized", V), s.value = !1, h();
960
+ } catch (V) {
961
+ if (p || S !== c) return;
962
+ if (V?.code === "APP_DENIED") {
963
+ s.value = !1, a("refused", V), h();
540
964
  return;
541
965
  }
542
- u.value = z;
966
+ d.value = V;
543
967
  } finally {
544
- v || (n.value = !1);
968
+ p || (s.value = !1);
545
969
  }
546
970
  }
547
971
  }
548
- return (S, c) => (s(), x(e(qe), {
549
- open: y.open,
550
- title: y.title ?? (y.mode === "folder" ? m.value.choose : m.value.chooseFile),
551
- description: y.description ?? m.value.ownPermissions,
552
- "close-label": m.value.close,
553
- "show-close": !n.value,
972
+ return ($, _) => (n(), g(e(Ue), {
973
+ open: r.open,
974
+ title: r.title ?? (r.mode === "folder" ? v.value.choose : v.value.chooseFile),
975
+ description: r.description ?? v.value.ownPermissions,
976
+ "close-label": v.value.close,
977
+ "show-close": !s.value,
554
978
  width: "800px",
555
- onEscapeKeyDown: c[1] || (c[1] = (w) => {
556
- n.value && w.preventDefault();
979
+ onEscapeKeyDown: _[1] || (_[1] = (S) => {
980
+ s.value && S.preventDefault();
557
981
  }),
558
- onInteractOutside: c[2] || (c[2] = (w) => {
559
- n.value && w.preventDefault();
982
+ onInteractOutside: _[2] || (_[2] = (S) => {
983
+ s.value && S.preventDefault();
560
984
  }),
561
- "onUpdate:open": c[3] || (c[3] = (w) => {
562
- w || k();
985
+ "onUpdate:open": _[3] || (_[3] = (S) => {
986
+ S || h();
563
987
  })
564
988
  }, {
565
- footer: l(() => [
566
- d(e(U), {
989
+ footer: t(() => [
990
+ f(e(F), {
567
991
  variant: "secondary",
568
- disabled: n.value,
569
- onClick: k
992
+ disabled: s.value,
993
+ onClick: h
570
994
  }, {
571
- default: l(() => [
572
- g(t(m.value.cancel), 1)
995
+ default: t(() => [
996
+ k(l(v.value.cancel), 1)
573
997
  ]),
574
998
  _: 1
575
999
  }, 8, ["disabled"]),
576
- d(e(U), {
1000
+ f(e(F), {
577
1001
  variant: "primary",
578
- disabled: !o.value || n.value || !!y.destination && y.mode !== "folder",
579
- onClick: D
1002
+ disabled: !u.value || s.value || !!r.destination && r.mode !== "folder",
1003
+ onClick: A
580
1004
  }, {
581
- default: l(() => [
582
- g(t(m.value.confirm), 1)
1005
+ default: t(() => [
1006
+ k(l(v.value.confirm), 1)
583
1007
  ]),
584
1008
  _: 1
585
1009
  }, 8, ["disabled"])
586
1010
  ]),
587
- default: l(() => [
588
- y.destination ? (s(), V("p", et, t(i.value.selection), 1)) : h("", !0),
589
- u.value ? (s(), x(e(X), {
1011
+ default: t(() => [
1012
+ r.destination ? (n(), R("p", Et, l(o.value.selection), 1)) : b("", !0),
1013
+ d.value ? (n(), g(e(W), {
590
1014
  key: 1,
591
1015
  tone: "danger",
592
1016
  role: "alert",
593
1017
  class: "save-message"
594
1018
  }, {
595
- default: l(() => [
596
- g(t(y.errorText?.(u.value) ?? e(Ie)(u.value, i.value, "select")), 1)
1019
+ default: t(() => [
1020
+ k(l(r.errorText?.(d.value) ?? e(Ie)(d.value, o.value, "select")), 1)
597
1021
  ]),
598
1022
  _: 1
599
- })) : h("", !0),
600
- $("div", {
1023
+ })) : b("", !0),
1024
+ P("div", {
601
1025
  class: "nas-picker-content",
602
- "aria-busy": n.value,
603
- inert: n.value
1026
+ "aria-busy": s.value,
1027
+ inert: s.value
604
1028
  }, [
605
- y.open ? (s(), x(je, {
1029
+ r.open ? (n(), g(ca, {
606
1030
  key: 0,
607
- provider: y.provider,
608
- locale: y.locale,
609
- mode: y.mode,
610
- onSelected: c[0] || (c[0] = (w) => o.value = w)
611
- }, null, 8, ["provider", "locale", "mode"])) : h("", !0)
612
- ], 8, at)
1031
+ provider: r.provider,
1032
+ locale: r.locale,
1033
+ mode: r.mode,
1034
+ onSelected: _[0] || (_[0] = (S) => u.value = S)
1035
+ }, null, 8, ["provider", "locale", "mode"])) : b("", !0)
1036
+ ], 8, Tt)
613
1037
  ]),
614
1038
  _: 1
615
1039
  }, 8, ["open", "title", "description", "close-label", "show-close"]));
616
1040
  }
617
- }), Te = /* @__PURE__ */ ue(tt, [["__scopeId", "data-v-6ed8b8f6"]]), lt = { role: "alert" }, st = { class: "files-actions" }, nt = {
1041
+ }), Re = /* @__PURE__ */ ue(Ut, [["__scopeId", "data-v-6ed8b8f6"]]), Rt = { role: "alert" }, Dt = { class: "files-actions" }, Bt = {
618
1042
  key: 0,
619
1043
  class: "files-path",
620
1044
  role: "status"
621
- }, it = /* @__PURE__ */ oe({
1045
+ }, Ft = /* @__PURE__ */ ie({
622
1046
  __name: "FilesPage",
623
1047
  props: {
624
1048
  ctx: {}
625
1049
  },
626
- setup(y) {
627
- const q = y, f = b(), a = b(!1), o = b("folder"), m = b(!1), i = b(""), n = b(0), u = Me(q.ctx);
628
- let r = !1, v;
629
- async function k() {
630
- if (!r) {
631
- f.value = void 0, a.value = !1, i.value = "", m.value = !1, n.value++;
1050
+ setup(r) {
1051
+ const x = r, i = y(), a = y(!1), u = y("folder"), v = y(!1), o = y(""), s = y(0), d = ta(x.ctx);
1052
+ let c = !1, p;
1053
+ async function h() {
1054
+ if (!c) {
1055
+ i.value = void 0, a.value = !1, o.value = "", v.value = !1, s.value++;
632
1056
  try {
633
- await q.ctx.call("nas.session.status"), r || (a.value = !0);
634
- } catch (D) {
635
- !r && D?.code !== "unknown_method" && (f.value = D);
1057
+ await x.ctx.call("nas.session.status"), c || (a.value = !0);
1058
+ } catch (A) {
1059
+ !c && A?.code !== "unknown_method" && (i.value = A);
636
1060
  }
637
1061
  }
638
1062
  }
639
- return ge(() => {
640
- v = q.ctx.reopen(() => {
641
- k();
642
- }), k();
643
- }), ye(() => {
644
- r = !0, v?.(), u.dispose();
645
- }), (D, S) => (s(), V(ne, null, [
646
- f.value ? (s(), x(e(X), {
1063
+ return ve(() => {
1064
+ p = x.ctx.reopen(() => {
1065
+ h();
1066
+ }), h();
1067
+ }), ce(() => {
1068
+ c = !0, p?.(), d.dispose();
1069
+ }), (A, $) => (n(), R(oe, null, [
1070
+ i.value ? (n(), g(e(W), {
647
1071
  key: 0,
648
1072
  tone: "danger"
649
1073
  }, {
650
- default: l(() => [
651
- $("span", lt, t(e(Le)(f.value, e(be)(y.ctx.locale))), 1),
652
- d(e(U), {
1074
+ default: t(() => [
1075
+ P("span", Rt, l(e(ea)(i.value, e(be)(r.ctx.locale))), 1),
1076
+ f(e(F), {
653
1077
  variant: "secondary",
654
- onClick: k
1078
+ onClick: h
655
1079
  }, {
656
- default: l(() => [
657
- g(t(e(be)(y.ctx.locale).refresh), 1)
1080
+ default: t(() => [
1081
+ k(l(e(be)(r.ctx.locale).refresh), 1)
658
1082
  ]),
659
1083
  _: 1
660
1084
  })
661
1085
  ]),
662
1086
  _: 1
663
- })) : h("", !0),
664
- a.value ? (s(), x(e(he), {
1087
+ })) : b("", !0),
1088
+ a.value ? (n(), g(e(ke), {
665
1089
  key: 1,
666
- title: e(be)(y.ctx.locale).title,
667
- description: e(be)(y.ctx.locale).ownPermissions,
1090
+ title: e(be)(r.ctx.locale).title,
1091
+ description: e(be)(r.ctx.locale).ownPermissions,
668
1092
  collapsible: !1
669
1093
  }, {
670
- default: l(() => [
671
- $("div", st, [
672
- d(e(U), {
1094
+ default: t(() => [
1095
+ P("div", Dt, [
1096
+ f(e(F), {
673
1097
  variant: "secondary",
674
- onClick: S[0] || (S[0] = (c) => {
675
- o.value = "folder", m.value = !0;
1098
+ onClick: $[0] || ($[0] = (_) => {
1099
+ u.value = "folder", v.value = !0;
676
1100
  })
677
1101
  }, {
678
- default: l(() => [
679
- g(t(e(be)(y.ctx.locale).choose), 1)
1102
+ default: t(() => [
1103
+ k(l(e(be)(r.ctx.locale).choose), 1)
680
1104
  ]),
681
1105
  _: 1
682
1106
  }),
683
- d(e(U), {
1107
+ f(e(F), {
684
1108
  variant: "secondary",
685
- onClick: S[1] || (S[1] = (c) => {
686
- o.value = "file", m.value = !0;
1109
+ onClick: $[1] || ($[1] = (_) => {
1110
+ u.value = "file", v.value = !0;
687
1111
  })
688
1112
  }, {
689
- default: l(() => [
690
- g(t(e(be)(y.ctx.locale).chooseFile), 1)
1113
+ default: t(() => [
1114
+ k(l(e(be)(r.ctx.locale).chooseFile), 1)
691
1115
  ]),
692
1116
  _: 1
693
1117
  })
694
1118
  ]),
695
- i.value ? (s(), V("p", nt, [
696
- d(e(pe), { path: i.value }, null, 8, ["path"])
697
- ])) : h("", !0),
698
- (s(), x(je, {
699
- key: n.value,
700
- provider: e(u),
701
- locale: y.ctx.locale,
1119
+ o.value ? (n(), R("p", Bt, [
1120
+ f(e(ye), { path: o.value }, null, 8, ["path"])
1121
+ ])) : b("", !0),
1122
+ (n(), g(ca, {
1123
+ key: s.value,
1124
+ provider: e(d),
1125
+ locale: r.ctx.locale,
702
1126
  transfers: ""
703
1127
  }, null, 8, ["provider", "locale"])),
704
- d(Te, {
705
- provider: e(u),
706
- locale: y.ctx.locale,
707
- mode: o.value,
708
- open: m.value,
709
- "onUpdate:open": S[2] || (S[2] = (c) => m.value = c),
710
- onSelected: S[3] || (S[3] = (c) => i.value = c)
1128
+ f(Re, {
1129
+ provider: e(d),
1130
+ locale: r.ctx.locale,
1131
+ mode: u.value,
1132
+ open: v.value,
1133
+ "onUpdate:open": $[2] || ($[2] = (_) => v.value = _),
1134
+ onSelected: $[3] || ($[3] = (_) => o.value = _)
711
1135
  }, null, 8, ["provider", "locale", "mode", "open"])
712
1136
  ]),
713
1137
  _: 1
714
- }, 8, ["title", "description"])) : h("", !0)
1138
+ }, 8, ["title", "description"])) : b("", !0)
715
1139
  ], 64));
716
1140
  }
717
- }), Hl = /* @__PURE__ */ ue(it, [["__scopeId", "data-v-15f9eb8e"]]), ot = { key: 0 }, ut = { key: 1 }, rt = { key: 0 }, dt = { key: 3 }, vt = { role: "alert" }, ct = 5e3, pt = /* @__PURE__ */ oe({
1141
+ }), yn = /* @__PURE__ */ ue(Ft, [["__scopeId", "data-v-15f9eb8e"]]), qt = { role: "alert" }, Ot = 5e3, mn = /* @__PURE__ */ ie({
718
1142
  __name: "PortalSettings",
719
1143
  props: {
720
1144
  portal: {}
721
1145
  },
722
- setup(y) {
723
- const q = y, f = We(), a = q.portal.messages, o = b(), m = b(""), i = b(!1), n = b("");
724
- let u = !1;
725
- function r(S) {
726
- u || (o.value = S, m.value = S.alias || S.defaultAlias);
1146
+ setup(r) {
1147
+ const x = r, i = ua(), a = x.portal.messages, u = y(), v = y(""), o = y(!1), s = y("");
1148
+ let d = !1;
1149
+ function c(E) {
1150
+ d || (u.value = E, v.value = E.alias || E.defaultAlias);
727
1151
  }
728
- const v = /* @__PURE__ */ Symbol("late");
729
- async function k(S) {
730
- if (i.value) return;
731
- i.value = !0, n.value = "";
732
- const c = S();
1152
+ const p = /* @__PURE__ */ Symbol("late");
1153
+ async function h(E) {
1154
+ if (o.value) return;
1155
+ o.value = !0, s.value = "";
1156
+ const z = E();
733
1157
  try {
734
- const w = await Promise.race([c, new Promise((z) => setTimeout(() => z(v), ct))]);
735
- if (w !== v) {
736
- r(w);
1158
+ const I = await Promise.race([z, new Promise((K) => setTimeout(() => K(p), Ot))]);
1159
+ if (I !== p) {
1160
+ c(I);
737
1161
  return;
738
1162
  }
739
- r(await q.portal.status());
1163
+ c(await x.portal.status());
740
1164
  try {
741
- await c;
1165
+ await z;
742
1166
  } finally {
743
- r(await q.portal.status());
1167
+ c(await x.portal.status());
744
1168
  }
745
- } catch (w) {
746
- u || (n.value = a[w?.code || ""] || a.portal_unavailable);
1169
+ } catch (I) {
1170
+ d || (s.value = a[I?.code || ""] || a.portal_unavailable);
747
1171
  } finally {
748
- u || (i.value = !1);
1172
+ d || (o.value = !1);
749
1173
  }
750
1174
  }
751
- function D() {
752
- i.value || q.portal.status().then(r, () => {
1175
+ const A = U(() => !!u.value?.canManage && !!u.value.entry && u.value.entry !== "registered"), $ = U(() => {
1176
+ const E = u.value;
1177
+ if (E) {
1178
+ if (A.value) return E.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
1179
+ if (E.state !== "active")
1180
+ return E.canManage ? a.inactive : E.controlPanel ? void 0 : a.askAdmin;
1181
+ }
1182
+ }), _ = a.link?.replace(/\s*[::]\s*$/, "");
1183
+ async function S() {
1184
+ const E = await x.portal.register();
1185
+ return E.canManage && E.entry === "registered" && E.state === "inactive" ? (c(E), x.portal.apply(E.alias || E.defaultAlias)) : E;
1186
+ }
1187
+ function V() {
1188
+ o.value || x.portal.status().then(c, () => {
753
1189
  });
754
1190
  }
755
- return ge(() => {
756
- f.subscribe?.(D), D();
757
- }), ye(() => {
758
- u = !0;
759
- }), (S, c) => o.value ? (s(), x(e(he), {
1191
+ return ve(() => {
1192
+ i.subscribe?.(V), V();
1193
+ }), ce(() => {
1194
+ d = !0;
1195
+ }), (E, z) => u.value ? (n(), g(e(ke), {
760
1196
  key: 0,
761
1197
  title: e(a).title,
1198
+ description: $.value,
762
1199
  collapsible: !1,
763
- "aria-busy": i.value
764
- }, Xe({
765
- default: l(() => [
766
- o.value.state === "active" ? (s(), V("p", ot, [
767
- g(t(e(a).link) + " ", 1),
768
- d(e(Ye), {
769
- href: o.value.url,
770
- external: ""
771
- }, {
772
- default: l(() => [
773
- g(t(o.value.url), 1)
774
- ]),
775
- _: 1
776
- }, 8, ["href"])
777
- ])) : h("", !0),
778
- o.value.canManage && o.value.entry && o.value.entry !== "registered" ? (s(), V("p", ut, t(o.value.entry === "unregistered" ? e(a).entryOff : e(a).cleanupRequired), 1)) : o.value.canManage ? (s(), V(ne, { key: 2 }, [
779
- o.value.state !== "active" ? (s(), V("p", rt, t(e(a).inactive), 1)) : h("", !0),
780
- d(e(ze), {
781
- direction: "vertical",
782
- class: "portal-form",
783
- onSubmit: c[4] || (c[4] = Se((w) => k(() => y.portal.apply(m.value)), ["prevent"]))
784
- }, {
785
- default: l(() => [
786
- d(e(fe), {
787
- label: e(a).alias,
788
- "label-for": "portal-alias"
789
- }, {
790
- default: l(() => [
791
- d(e(_e), {
792
- id: "portal-alias",
793
- modelValue: m.value,
794
- "onUpdate:modelValue": c[0] || (c[0] = (w) => m.value = w),
795
- maxlength: "64",
796
- autocomplete: "off",
797
- disabled: i.value
798
- }, null, 8, ["modelValue", "disabled"])
799
- ]),
800
- _: 1
801
- }, 8, ["label"]),
802
- d(e(Pe), null, {
803
- default: l(() => [
804
- d(e(U), {
805
- type: "submit",
806
- variant: "primary",
807
- disabled: i.value
808
- }, {
809
- default: l(() => [
810
- g(t(e(a).apply), 1)
811
- ]),
812
- _: 1
813
- }, 8, ["disabled"]),
814
- o.value.state === "active" ? (s(), x(e(U), {
815
- key: 0,
816
- variant: "secondary",
817
- disabled: i.value,
818
- onClick: c[1] || (c[1] = (w) => k(() => y.portal.disable()))
819
- }, {
820
- default: l(() => [
821
- g(t(e(a).disable), 1)
822
- ]),
823
- _: 1
824
- }, 8, ["disabled"])) : h("", !0),
825
- d(e(U), {
826
- variant: "secondary",
827
- onClick: c[2] || (c[2] = (w) => y.portal.openControlPanel())
828
- }, {
829
- default: l(() => [
830
- g(t(e(a).advanced), 1)
831
- ]),
832
- _: 1
833
- }),
834
- o.value.entry ? (s(), x(e(U), {
835
- key: 1,
836
- variant: "secondary",
837
- disabled: i.value,
838
- onClick: c[3] || (c[3] = (w) => k(() => y.portal.unregister()))
839
- }, {
840
- default: l(() => [
841
- g(t(e(a).unregister), 1)
842
- ]),
843
- _: 1
844
- }, 8, ["disabled"])) : h("", !0)
845
- ]),
846
- _: 1
847
- })
848
- ]),
849
- _: 1
850
- })
851
- ], 64)) : !o.value.controlPanel && o.value.state !== "active" ? (s(), V("p", dt, t(e(a).askAdmin), 1)) : h("", !0),
852
- n.value ? (s(), x(e(X), {
853
- key: 4,
1200
+ "aria-busy": o.value
1201
+ }, Me({
1202
+ default: t(() => [
1203
+ u.value.state === "active" ? (n(), g(e(Ee), {
1204
+ key: 0,
1205
+ label: e(_)
1206
+ }, {
1207
+ default: t(() => [
1208
+ f(e(ia), {
1209
+ href: u.value.url,
1210
+ external: ""
1211
+ }, {
1212
+ default: t(() => [
1213
+ k(l(u.value.url), 1)
1214
+ ]),
1215
+ _: 1
1216
+ }, 8, ["href"])
1217
+ ]),
1218
+ _: 1
1219
+ }, 8, ["label"])) : b("", !0),
1220
+ u.value.canManage && !A.value ? (n(), g(e(Pe), {
1221
+ key: 1,
1222
+ onSubmit: z[4] || (z[4] = ze((I) => h(() => r.portal.apply(v.value)), ["prevent"]))
1223
+ }, {
1224
+ default: t(() => [
1225
+ f(e(Ee), {
1226
+ label: e(a).alias
1227
+ }, {
1228
+ default: t(() => [
1229
+ f(e(we), {
1230
+ id: "portal-alias",
1231
+ modelValue: v.value,
1232
+ "onUpdate:modelValue": z[0] || (z[0] = (I) => v.value = I),
1233
+ "aria-label": e(a).alias,
1234
+ maxlength: "64",
1235
+ autocomplete: "off",
1236
+ disabled: o.value
1237
+ }, null, 8, ["modelValue", "aria-label", "disabled"])
1238
+ ]),
1239
+ _: 1
1240
+ }, 8, ["label"]),
1241
+ f(e(Ee), {
1242
+ label: "",
1243
+ "field-width": "full"
1244
+ }, {
1245
+ default: t(() => [
1246
+ f(e(Ve), null, {
1247
+ default: t(() => [
1248
+ f(e(F), {
1249
+ type: "submit",
1250
+ variant: "primary",
1251
+ disabled: o.value
1252
+ }, {
1253
+ default: t(() => [
1254
+ k(l(e(a).apply), 1)
1255
+ ]),
1256
+ _: 1
1257
+ }, 8, ["disabled"]),
1258
+ u.value.state === "active" ? (n(), g(e(F), {
1259
+ key: 0,
1260
+ variant: "secondary",
1261
+ disabled: o.value,
1262
+ onClick: z[1] || (z[1] = (I) => h(() => r.portal.disable()))
1263
+ }, {
1264
+ default: t(() => [
1265
+ k(l(e(a).disable), 1)
1266
+ ]),
1267
+ _: 1
1268
+ }, 8, ["disabled"])) : b("", !0),
1269
+ f(e(F), {
1270
+ variant: "secondary",
1271
+ onClick: z[2] || (z[2] = (I) => r.portal.openControlPanel())
1272
+ }, {
1273
+ default: t(() => [
1274
+ k(l(e(a).advanced), 1)
1275
+ ]),
1276
+ _: 1
1277
+ }),
1278
+ u.value.entry ? (n(), g(e(F), {
1279
+ key: 1,
1280
+ variant: "secondary",
1281
+ disabled: o.value,
1282
+ onClick: z[3] || (z[3] = (I) => h(() => r.portal.unregister()))
1283
+ }, {
1284
+ default: t(() => [
1285
+ k(l(e(a).unregister), 1)
1286
+ ]),
1287
+ _: 1
1288
+ }, 8, ["disabled"])) : b("", !0)
1289
+ ]),
1290
+ _: 1
1291
+ })
1292
+ ]),
1293
+ _: 1
1294
+ })
1295
+ ]),
1296
+ _: 1
1297
+ })) : b("", !0),
1298
+ s.value ? (n(), g(e(W), {
1299
+ key: 2,
854
1300
  tone: "danger"
855
1301
  }, {
856
- default: l(() => [
857
- $("span", vt, t(n.value), 1)
1302
+ default: t(() => [
1303
+ P("span", qt, l(s.value), 1)
858
1304
  ]),
859
1305
  _: 1
860
- })) : h("", !0)
1306
+ })) : b("", !0)
861
1307
  ]),
862
1308
  _: 2
863
1309
  }, [
864
- o.value?.canManage && o.value.entry && o.value.entry !== "registered" ? {
1310
+ A.value ? {
865
1311
  name: "footer",
866
- fn: l(() => [
867
- o.value.entry === "unregistered" ? (s(), x(e(U), {
1312
+ fn: t(() => [
1313
+ u.value.entry === "unregistered" ? (n(), g(e(F), {
868
1314
  key: 0,
869
1315
  variant: "primary",
870
- disabled: i.value,
871
- onClick: c[5] || (c[5] = (w) => k(() => y.portal.register()))
1316
+ disabled: o.value,
1317
+ onClick: z[5] || (z[5] = (I) => h(S))
872
1318
  }, {
873
- default: l(() => [
874
- g(t(e(a).register), 1)
1319
+ default: t(() => [
1320
+ k(l(e(a).register), 1)
875
1321
  ]),
876
1322
  _: 1
877
- }, 8, ["disabled"])) : (s(), x(e(U), {
1323
+ }, 8, ["disabled"])) : (n(), g(e(F), {
878
1324
  key: 1,
879
1325
  variant: "primary",
880
- disabled: i.value,
881
- onClick: c[6] || (c[6] = (w) => k(() => y.portal.unregister()))
1326
+ disabled: o.value,
1327
+ onClick: z[6] || (z[6] = (I) => h(() => r.portal.unregister()))
882
1328
  }, {
883
- default: l(() => [
884
- g(t(e(a).unregister), 1)
1329
+ default: t(() => [
1330
+ k(l(e(a).unregister), 1)
885
1331
  ]),
886
1332
  _: 1
887
1333
  }, 8, ["disabled"]))
888
1334
  ]),
889
1335
  key: "0"
890
- } : o.value && !o.value.canManage && o.value.controlPanel ? {
1336
+ } : !u.value.canManage && u.value.controlPanel ? {
891
1337
  name: "footer",
892
- fn: l(() => [
893
- d(e(U), {
1338
+ fn: t(() => [
1339
+ f(e(F), {
894
1340
  variant: "secondary",
895
- onClick: c[7] || (c[7] = (w) => y.portal.openControlPanel())
1341
+ onClick: z[7] || (z[7] = (I) => r.portal.openControlPanel())
896
1342
  }, {
897
- default: l(() => [
898
- g(t(e(a).controlPanel), 1)
1343
+ default: t(() => [
1344
+ k(l(e(a).controlPanel), 1)
899
1345
  ]),
900
1346
  _: 1
901
1347
  })
902
1348
  ]),
903
1349
  key: "1"
904
1350
  } : void 0
905
- ]), 1032, ["title", "aria-busy"])) : h("", !0);
1351
+ ]), 1032, ["title", "description", "aria-busy"])) : b("", !0);
906
1352
  }
907
- }), Gl = /* @__PURE__ */ ue(pt, [["__scopeId", "data-v-d803ac7c"]]), ft = ["aria-busy"], yt = {
1353
+ }), Lt = ["aria-busy"], Nt = {
908
1354
  key: 1,
909
1355
  role: "status"
910
- }, mt = { role: "alert" }, bt = { role: "status" }, gt = /* @__PURE__ */ oe({
1356
+ }, Mt = { role: "alert" }, Kt = { role: "status" }, Ht = /* @__PURE__ */ ie({
911
1357
  __name: "LoginPage",
912
1358
  props: {
913
1359
  session: {},
914
1360
  locale: {}
915
1361
  },
916
- setup(y) {
917
- const q = y, f = L(() => la(q.locale)), a = b(""), o = b(""), m = b(""), i = b(!1), n = b(!1), u = b(""), r = b(), v = L(() => window.location.protocol === "https:");
918
- let k = !1;
919
- function D(z) {
920
- const M = z?.code;
921
- return f.value.errors[M || ""] || f.value.errors.failed;
1362
+ setup(r) {
1363
+ const x = r, i = U(() => ya(x.locale)), a = y(""), u = y(""), v = y(""), o = y(!1), s = y(!1), d = y(""), c = y(), p = U(() => window.location.protocol === "https:");
1364
+ let h = !1;
1365
+ function A(V) {
1366
+ const E = V?.code;
1367
+ return i.value.errors[E || ""] || i.value.errors.failed;
922
1368
  }
923
- async function S() {
924
- if (!(n.value || !v.value || !a.value || !o.value || i.value && !m.value)) {
925
- n.value = !0, u.value = "";
1369
+ async function $() {
1370
+ if (!(s.value || !p.value || !a.value || !u.value || o.value && !v.value)) {
1371
+ s.value = !0, d.value = "";
926
1372
  try {
927
- await q.session.login(a.value, o.value, m.value), o.value = "", m.value = "";
928
- } catch (z) {
929
- if (k) return;
930
- m.value = "", z?.code === "otp_required" ? i.value = !0 : (u.value = D(z), o.value = "", i.value = !1);
1373
+ await x.session.login(a.value, u.value, v.value), u.value = "", v.value = "";
1374
+ } catch (V) {
1375
+ if (h) return;
1376
+ v.value = "", V?.code === "otp_required" ? o.value = !0 : (d.value = A(V), u.value = "", o.value = !1);
931
1377
  } finally {
932
- k || (n.value = !1, i.value && (await pa(), k || r.value?.querySelector("input")?.focus()));
1378
+ h || (s.value = !1, o.value && (await Aa(), h || c.value?.querySelector("input")?.focus()));
933
1379
  }
934
1380
  }
935
1381
  }
936
- async function c() {
937
- if (!n.value) {
938
- n.value = !0, u.value = "";
1382
+ async function _() {
1383
+ if (!s.value) {
1384
+ s.value = !0, d.value = "";
939
1385
  try {
940
- await q.session.bootstrap();
941
- } catch (z) {
942
- k || (u.value = D(z));
1386
+ await x.session.bootstrap();
1387
+ } catch (V) {
1388
+ h || (d.value = A(V));
943
1389
  } finally {
944
- k || (n.value = !1);
1390
+ h || (s.value = !1);
945
1391
  }
946
1392
  }
947
1393
  }
948
- function w() {
949
- o.value = "", m.value = "", i.value = !1, u.value = "";
1394
+ function S() {
1395
+ u.value = "", v.value = "", o.value = !1, d.value = "";
950
1396
  }
951
- return Qe(() => {
952
- k = !0, o.value = "", m.value = "";
953
- }), (z, M) => (s(), V("main", {
1397
+ return sa(() => {
1398
+ h = !0, u.value = "", v.value = "";
1399
+ }), (V, E) => (n(), R("main", {
954
1400
  class: "identity-login",
955
- "aria-busy": n.value
1401
+ "aria-busy": s.value
956
1402
  }, [
957
- d(e(he), {
958
- title: f.value.title,
959
- description: f.value.intro,
1403
+ f(e(ke), {
1404
+ title: i.value.title,
1405
+ description: i.value.intro,
960
1406
  collapsible: !1
961
1407
  }, {
962
- default: l(() => [
963
- v.value ? h("", !0) : (s(), x(e(X), {
1408
+ default: t(() => [
1409
+ p.value ? b("", !0) : (n(), g(e(W), {
964
1410
  key: 0,
965
1411
  tone: "warning",
966
- title: f.value.httpsTitle
1412
+ title: i.value.httpsTitle
967
1413
  }, {
968
- default: l(() => [
969
- g(t(f.value.errors.https_required), 1)
1414
+ default: t(() => [
1415
+ k(l(i.value.errors.https_required), 1)
970
1416
  ]),
971
1417
  _: 1
972
1418
  }, 8, ["title"])),
973
- y.session.notice.value ? (s(), V("p", yt, t(f.value.notices[y.session.notice.value]), 1)) : h("", !0),
974
- u.value ? (s(), x(e(X), {
1419
+ r.session.notice.value ? (n(), R("p", Nt, l(i.value.notices[r.session.notice.value]), 1)) : b("", !0),
1420
+ d.value ? (n(), g(e(W), {
975
1421
  key: 2,
976
1422
  tone: "danger",
977
- title: f.value.failedTitle
1423
+ title: i.value.failedTitle
978
1424
  }, {
979
- default: l(() => [
980
- $("span", mt, t(u.value), 1)
1425
+ default: t(() => [
1426
+ P("span", Mt, l(d.value), 1)
981
1427
  ]),
982
1428
  _: 1
983
- }, 8, ["title"])) : h("", !0),
984
- d(e(ze), {
985
- onSubmit: Se(S, ["prevent"])
1429
+ }, 8, ["title"])) : b("", !0),
1430
+ f(e(Pe), {
1431
+ onSubmit: ze($, ["prevent"])
986
1432
  }, {
987
- default: l(() => [
988
- d(e(fe), {
989
- label: f.value.account
1433
+ default: t(() => [
1434
+ f(e(he), {
1435
+ label: i.value.account
990
1436
  }, {
991
- default: l(() => [
992
- d(e(_e), {
1437
+ default: t(() => [
1438
+ f(e(we), {
993
1439
  modelValue: a.value,
994
- "onUpdate:modelValue": M[0] || (M[0] = (N) => a.value = N),
1440
+ "onUpdate:modelValue": E[0] || (E[0] = (z) => a.value = z),
995
1441
  autocomplete: "username",
996
- disabled: n.value || i.value || !v.value
1442
+ disabled: s.value || o.value || !p.value
997
1443
  }, null, 8, ["modelValue", "disabled"])
998
1444
  ]),
999
1445
  _: 1
1000
1446
  }, 8, ["label"]),
1001
- i.value ? (s(), V(ne, { key: 1 }, [
1002
- $("p", bt, t(f.value.otpPrompt), 1),
1003
- $("div", {
1447
+ o.value ? (n(), R(oe, { key: 1 }, [
1448
+ P("p", Kt, l(i.value.otpPrompt), 1),
1449
+ P("div", {
1004
1450
  ref_key: "otpField",
1005
- ref: r
1451
+ ref: c
1006
1452
  }, [
1007
- d(e(fe), {
1008
- label: f.value.otp
1453
+ f(e(he), {
1454
+ label: i.value.otp
1009
1455
  }, {
1010
- default: l(() => [
1011
- d(e(_e), {
1012
- modelValue: m.value,
1013
- "onUpdate:modelValue": M[2] || (M[2] = (N) => m.value = N),
1456
+ default: t(() => [
1457
+ f(e(we), {
1458
+ modelValue: v.value,
1459
+ "onUpdate:modelValue": E[2] || (E[2] = (z) => v.value = z),
1014
1460
  inputmode: "numeric",
1015
1461
  autocomplete: "one-time-code",
1016
- disabled: n.value
1462
+ disabled: s.value
1017
1463
  }, null, 8, ["modelValue", "disabled"])
1018
1464
  ]),
1019
1465
  _: 1
1020
1466
  }, 8, ["label"])
1021
1467
  ], 512)
1022
- ], 64)) : (s(), x(e(fe), {
1468
+ ], 64)) : (n(), g(e(he), {
1023
1469
  key: 0,
1024
- label: f.value.password
1470
+ label: i.value.password
1025
1471
  }, {
1026
- default: l(() => [
1027
- d(e(_e), {
1028
- modelValue: o.value,
1029
- "onUpdate:modelValue": M[1] || (M[1] = (N) => o.value = N),
1472
+ default: t(() => [
1473
+ f(e(we), {
1474
+ modelValue: u.value,
1475
+ "onUpdate:modelValue": E[1] || (E[1] = (z) => u.value = z),
1030
1476
  type: "password",
1031
1477
  autocomplete: "current-password",
1032
- disabled: n.value || !v.value
1478
+ disabled: s.value || !p.value
1033
1479
  }, null, 8, ["modelValue", "disabled"])
1034
1480
  ]),
1035
1481
  _: 1
1036
1482
  }, 8, ["label"])),
1037
- d(e(Pe), null, {
1038
- default: l(() => [
1039
- d(e(U), {
1483
+ f(e(Ve), null, {
1484
+ default: t(() => [
1485
+ f(e(F), {
1040
1486
  type: "submit",
1041
1487
  variant: "primary",
1042
- disabled: n.value || !v.value || !a.value || !o.value || i.value && !m.value
1488
+ disabled: s.value || !p.value || !a.value || !u.value || o.value && !v.value
1043
1489
  }, {
1044
- default: l(() => [
1045
- g(t(n.value ? f.value.signingIn : i.value ? f.value.verify : f.value.signIn), 1)
1490
+ default: t(() => [
1491
+ k(l(s.value ? i.value.signingIn : o.value ? i.value.verify : i.value.signIn), 1)
1046
1492
  ]),
1047
1493
  _: 1
1048
1494
  }, 8, ["disabled"]),
1049
- i.value ? (s(), x(e(U), {
1495
+ o.value ? (n(), g(e(F), {
1050
1496
  key: 0,
1051
1497
  variant: "secondary",
1052
- disabled: n.value,
1053
- onClick: w
1498
+ disabled: s.value,
1499
+ onClick: S
1054
1500
  }, {
1055
- default: l(() => [
1056
- g(t(f.value.otherAccount), 1)
1501
+ default: t(() => [
1502
+ k(l(i.value.otherAccount), 1)
1057
1503
  ]),
1058
1504
  _: 1
1059
- }, 8, ["disabled"])) : (s(), x(e(U), {
1505
+ }, 8, ["disabled"])) : (n(), g(e(F), {
1060
1506
  key: 1,
1061
1507
  variant: "secondary",
1062
- disabled: n.value || !v.value,
1063
- onClick: c
1508
+ disabled: s.value || !p.value,
1509
+ onClick: _
1064
1510
  }, {
1065
- default: l(() => [
1066
- g(t(f.value.continueDSM), 1)
1511
+ default: t(() => [
1512
+ k(l(i.value.continueDSM), 1)
1067
1513
  ]),
1068
1514
  _: 1
1069
1515
  }, 8, ["disabled"]))
@@ -1076,388 +1522,388 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1076
1522
  ]),
1077
1523
  _: 1
1078
1524
  }, 8, ["title", "description"])
1079
- ], 8, ft));
1525
+ ], 8, Lt));
1080
1526
  }
1081
- }), Jl = /* @__PURE__ */ ue(gt, [["__scopeId", "data-v-1c0358cd"]]), ht = { role: "status" }, kt = { class: "integration-help" }, _t = { class: "integration-help" }, wt = { class: "integration-help" }, xt = { class: "integration-actions" }, Ct = {
1527
+ }), bn = /* @__PURE__ */ ue(Ht, [["__scopeId", "data-v-1c0358cd"]]), Gt = { role: "status" }, Jt = { class: "integration-help" }, Wt = { class: "integration-help" }, Xt = { class: "integration-help" }, Qt = { class: "integration-actions" }, Yt = {
1082
1528
  key: 0,
1083
1529
  role: "status",
1084
1530
  "data-bg-picked": "",
1085
1531
  class: "bg-path"
1086
- }, $t = { class: "integration-actions" }, St = { key: 2 }, zt = {
1532
+ }, Zt = { class: "integration-actions" }, jt = { key: 2 }, el = {
1087
1533
  key: 3,
1088
1534
  class: "bg-cards"
1089
- }, Pt = { class: "bg-card-body" }, Vt = {
1535
+ }, al = { class: "bg-card-body" }, tl = {
1090
1536
  key: 0,
1091
1537
  class: "integration-help"
1092
- }, It = {
1538
+ }, ll = {
1093
1539
  key: 1,
1094
1540
  class: "integration-help"
1095
- }, Tt = {
1541
+ }, nl = {
1096
1542
  key: 2,
1097
1543
  class: "integration-help bg-path"
1098
- }, Et = {
1544
+ }, sl = {
1099
1545
  key: 3,
1100
1546
  class: "integration-help"
1101
- }, Ut = {
1547
+ }, ol = {
1102
1548
  key: 4,
1103
1549
  class: "integration-help"
1104
- }, At = { class: "integration-actions" }, Dt = ["aria-label"], Rt = { class: "integration-help" }, qt = { key: 1 }, Bt = {
1550
+ }, il = { class: "integration-actions" }, ul = ["aria-label"], rl = { class: "integration-help" }, dl = { key: 1 }, cl = {
1105
1551
  key: 2,
1106
1552
  class: "bg-cards"
1107
- }, Ft = { class: "bg-card-body" }, Ot = {
1553
+ }, vl = { class: "bg-card-body" }, pl = {
1108
1554
  key: 0,
1109
1555
  class: "integration-help"
1110
- }, Lt = {
1556
+ }, fl = {
1111
1557
  key: 1,
1112
1558
  class: "integration-help"
1113
- }, Nt = { class: "integration-help" }, Mt = { class: "integration-actions" }, Kt = { class: "integration-actions" }, Ht = { class: "integration-actions" }, Gt = /* @__PURE__ */ oe({
1559
+ }, yl = { class: "integration-help" }, ml = { class: "integration-actions" }, bl = { class: "integration-actions" }, gl = { class: "integration-actions" }, hl = /* @__PURE__ */ ie({
1114
1560
  __name: "BackgroundPanel",
1115
1561
  props: {
1116
1562
  ctx: {}
1117
1563
  },
1118
- setup(y, { expose: q }) {
1119
- const f = y, a = L(() => sa(f.ctx.locale)), o = (p, B) => Ae(p, B, f.ctx.locale), m = b(), i = b([]), n = b(), u = b(!1), r = b(!1), v = b([]), k = b(), D = b(!1), S = b("3600"), c = b(), w = b(), z = b(), M = b(!1), N = b(!1), K = b(), O = b(""), Z = b(""), ae = na(f.ctx);
1120
- let W, H = !1;
1121
- const j = (p) => !["queued", "running"].includes(p.state), te = (p) => j(p) && p.state !== "paused", se = (p) => p.state === "running" && p.pauseRequested, Q = (p) => se(p) ? a.value.pausing : a.value[`state_${p.state}`], Y = (p) => se(p) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[p.state];
1122
- async function G(p, B) {
1564
+ setup(r, { expose: x }) {
1565
+ const i = r, a = U(() => ma(i.ctx.locale)), u = (m, L) => qe(m, L, i.ctx.locale), v = y(), o = y([]), s = y(), d = y(!1), c = y(!1), p = y([]), h = y(), A = y(!1), $ = y("3600"), _ = y(), S = y(), V = y(), E = y(!1), z = y(!1), I = y(), K = y(""), H = y(""), le = ba(i.ctx);
1566
+ let X, Q = !1;
1567
+ const Y = (m) => !["queued", "running"].includes(m.state), ne = (m) => Y(m) && m.state !== "paused", se = (m) => m.state === "running" && m.pauseRequested, ee = (m) => se(m) ? a.value.pausing : a.value[`state_${m.state}`], Z = (m) => se(m) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[m.state];
1568
+ async function G(m, L) {
1123
1569
  try {
1124
- return await f.ctx.call(p, B);
1125
- } catch (_) {
1126
- if (H) return;
1127
- _?.code === "unsupported" ? (u.value = !0, i.value = [], v.value = [], k.value = void 0, c.value = void 0, w.value = void 0, m.value = void 0, z.value = void 0, K.value = void 0, O.value && URL.revokeObjectURL(O.value), O.value = "") : H || (n.value = _);
1570
+ return await i.ctx.call(m, L);
1571
+ } catch (w) {
1572
+ if (Q) return;
1573
+ w?.code === "unsupported" ? (d.value = !0, o.value = [], p.value = [], h.value = void 0, _.value = void 0, S.value = void 0, v.value = void 0, V.value = void 0, I.value = void 0, K.value && URL.revokeObjectURL(K.value), K.value = "") : Q || (s.value = w);
1128
1574
  return;
1129
1575
  }
1130
1576
  }
1131
- async function le() {
1132
- if (!(H || M.value)) {
1133
- M.value = !0;
1577
+ async function j() {
1578
+ if (!(Q || E.value)) {
1579
+ E.value = !0;
1134
1580
  try {
1135
- const p = await G("bg.status");
1136
- if (!p || H) return;
1137
- if (!p.limits || typeof p.admin != "boolean") {
1138
- n.value = { code: "unavailable" };
1581
+ const m = await G("bg.status");
1582
+ if (!m || Q) return;
1583
+ if (!m.limits || typeof m.admin != "boolean") {
1584
+ s.value = { code: "unavailable" };
1139
1585
  return;
1140
1586
  }
1141
- u.value = !1, m.value = p;
1142
- const B = await G("bg.jobs.list");
1143
- B && !H && (i.value = B.jobs ?? []);
1144
- const _ = await G("bg.schedules.list");
1145
- _ && !H && (v.value = _.schedules ?? []), !H && i.value.every(j) && v.value.every((ie) => !ie.enabled) && W && (clearInterval(W), W = void 0);
1587
+ d.value = !1, v.value = m;
1588
+ const L = await G("bg.jobs.list");
1589
+ L && !Q && (o.value = L.jobs ?? []);
1590
+ const w = await G("bg.schedules.list");
1591
+ w && !Q && (p.value = w.schedules ?? []), !Q && o.value.every(Y) && p.value.every((re) => !re.enabled) && X && (clearInterval(X), X = void 0);
1146
1592
  } finally {
1147
- M.value = !1;
1593
+ E.value = !1;
1148
1594
  }
1149
1595
  }
1150
1596
  }
1151
- function R() {
1152
- W || (W = setInterval(() => {
1153
- le();
1597
+ function N() {
1598
+ X || (X = setInterval(() => {
1599
+ j();
1154
1600
  }, 3e3));
1155
1601
  }
1156
- async function T(p) {
1157
- if (!r.value) {
1158
- r.value = !0, n.value = void 0;
1602
+ async function D(m) {
1603
+ if (!c.value) {
1604
+ c.value = !0, s.value = void 0;
1159
1605
  try {
1160
- await p(), await le(), (v.value.some((B) => B.enabled) || i.value.some((B) => !j(B))) && R();
1606
+ await m(), await j(), (p.value.some((L) => L.enabled) || o.value.some((L) => !Y(L))) && N();
1161
1607
  } finally {
1162
- H || (r.value = !1);
1608
+ Q || (c.value = !1);
1163
1609
  }
1164
1610
  }
1165
1611
  }
1166
- const E = () => T(async () => {
1167
- if (!z.value) return;
1168
- await G("bg.jobs.purge", { owner: z.value }) && (z.value = void 0);
1169
- }), J = L(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), re = (p) => {
1170
- k.value = p, D.value = !1, S.value = "3600";
1171
- }, we = () => T(async () => {
1172
- if (!k.value || !D.value) return;
1173
- await G("bg.schedules.create", { key: Be(), jobId: k.value.id, intervalSeconds: Number(S.value), consent: !0 }) && (k.value = void 0);
1174
- }), xe = (p) => T(() => G("bg.schedules.disable", { id: p })), ve = () => T(async () => {
1175
- if (!c.value) return;
1176
- await G("bg.schedules.delete", { id: c.value.id }) && (c.value = void 0);
1177
- }), ce = () => T(async () => {
1178
- if (!w.value) return;
1179
- await G("bg.schedules.enable", { id: w.value.id, consent: !0 }) && (w.value = void 0);
1180
- }), de = (p) => {
1181
- const B = new Date(p);
1182
- return Number.isFinite(B.getTime()) ? B.toLocaleString() : a.value.unknownTime;
1183
- }, me = (p) => p.copyRetained && p.state === "succeeded" && !p.scheduleId && p.submitter?.user === m.value?.owner?.user && p.submitter?.uid === m.value?.owner?.uid, F = (p) => T(() => G("bg.jobs.cancel", { id: p })), ee = (p) => T(() => G("bg.jobs.pause", { id: p })), A = (p) => T(() => G("bg.jobs.resume", { id: p })), C = (p) => {
1184
- const B = p.lastIndexOf("/");
1185
- K.value = { folder: p.slice(0, B), relative: p.slice(B + 1) };
1186
- }, P = () => T(async () => {
1187
- if (!K.value) return;
1188
- await G("bg.jobs.submit", { key: Be(), ...K.value }) && (K.value = void 0);
1612
+ const O = () => D(async () => {
1613
+ if (!V.value) return;
1614
+ await G("bg.jobs.purge", { owner: V.value }) && (V.value = void 0);
1615
+ }), J = U(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), ae = (m) => {
1616
+ h.value = m, A.value = !1, $.value = "3600";
1617
+ }, xe = () => D(async () => {
1618
+ if (!h.value || !A.value) return;
1619
+ await G("bg.schedules.create", { key: He(), jobId: h.value.id, intervalSeconds: Number($.value), consent: !0 }) && (h.value = void 0);
1620
+ }), Ce = (m) => D(() => G("bg.schedules.disable", { id: m })), pe = () => D(async () => {
1621
+ if (!_.value) return;
1622
+ await G("bg.schedules.delete", { id: _.value.id }) && (_.value = void 0);
1623
+ }), fe = () => D(async () => {
1624
+ if (!S.value) return;
1625
+ await G("bg.schedules.enable", { id: S.value.id, consent: !0 }) && (S.value = void 0);
1626
+ }), de = (m) => {
1627
+ const L = new Date(m);
1628
+ return Number.isFinite(L.getTime()) ? L.toLocaleString() : a.value.unknownTime;
1629
+ }, me = (m) => m.copyRetained && m.state === "succeeded" && !m.scheduleId && m.submitter?.user === v.value?.owner?.user && m.submitter?.uid === v.value?.owner?.uid, M = (m) => D(() => G("bg.jobs.cancel", { id: m })), te = (m) => D(() => G("bg.jobs.pause", { id: m })), q = (m) => D(() => G("bg.jobs.resume", { id: m })), C = (m) => {
1630
+ const L = m.lastIndexOf("/");
1631
+ I.value = { folder: m.slice(0, L), relative: m.slice(L + 1) };
1632
+ }, T = () => D(async () => {
1633
+ if (!I.value) return;
1634
+ await G("bg.jobs.submit", { key: He(), ...I.value }) && (I.value = void 0);
1189
1635
  });
1190
- async function I(p) {
1191
- const B = await G("bg.jobs.result", { id: p.id });
1192
- !B || H || (O.value && URL.revokeObjectURL(O.value), O.value = URL.createObjectURL(new Blob([JSON.stringify(B.result, null, 2)], { type: "application/json" })), Z.value = `${p.name || p.id}.sha256.json`);
1636
+ async function B(m) {
1637
+ const L = await G("bg.jobs.result", { id: m.id });
1638
+ !L || Q || (K.value && URL.revokeObjectURL(K.value), K.value = URL.createObjectURL(new Blob([JSON.stringify(L.result, null, 2)], { type: "application/json" })), H.value = `${m.name || m.id}.sha256.json`);
1193
1639
  }
1194
- return q({ refresh: le }), ge(() => {
1195
- le().then(() => {
1196
- (v.value.some((p) => p.enabled) || i.value.some((p) => !j(p))) && R();
1640
+ return x({ refresh: j }), ve(() => {
1641
+ j().then(() => {
1642
+ (p.value.some((m) => m.enabled) || o.value.some((m) => !Y(m))) && N();
1197
1643
  });
1198
- }), ye(() => {
1199
- H = !0, ae.dispose(), W && clearInterval(W), O.value && URL.revokeObjectURL(O.value);
1200
- }), (p, B) => (s(), x(e(he), {
1201
- "aria-busy": r.value || M.value,
1644
+ }), ce(() => {
1645
+ Q = !0, le.dispose(), X && clearInterval(X), K.value && URL.revokeObjectURL(K.value);
1646
+ }), (m, L) => (n(), g(e(ke), {
1647
+ "aria-busy": c.value || E.value,
1202
1648
  title: a.value.title,
1203
- description: u.value ? void 0 : a.value.help,
1204
- loading: !m.value && !n.value && !u.value,
1649
+ description: d.value ? void 0 : a.value.help,
1650
+ loading: !v.value && !s.value && !d.value,
1205
1651
  collapsible: !1,
1206
1652
  "data-background-panel": ""
1207
1653
  }, {
1208
- default: l(() => [
1209
- u.value ? (s(), x(e(X), {
1654
+ default: t(() => [
1655
+ d.value ? (n(), g(e(W), {
1210
1656
  key: 0,
1211
1657
  tone: "warning"
1212
1658
  }, {
1213
- default: l(() => [
1214
- g(t(a.value.unsupported), 1)
1659
+ default: t(() => [
1660
+ k(l(a.value.unsupported), 1)
1215
1661
  ]),
1216
1662
  _: 1
1217
- })) : (s(), V(ne, { key: 1 }, [
1218
- n.value ? (s(), x(e(X), {
1663
+ })) : (n(), R(oe, { key: 1 }, [
1664
+ s.value ? (n(), g(e(W), {
1219
1665
  key: 0,
1220
1666
  tone: "danger",
1221
1667
  role: "alert"
1222
1668
  }, {
1223
- default: l(() => [
1224
- g(t(e(ia)(n.value, a.value)), 1)
1669
+ default: t(() => [
1670
+ k(l(e(ga)(s.value, a.value)), 1)
1225
1671
  ]),
1226
1672
  _: 1
1227
- })) : h("", !0),
1228
- m.value ? (s(), V(ne, { key: 1 }, [
1229
- $("p", ht, t(m.value.worker?.alive ? o(a.value.workerRunning, { user: m.value.worker.username }) : a.value.workerStopped), 1),
1230
- $("p", kt, t(o(a.value.limits, { size: m.value.limits.maxInputBytes / 1024, queue: m.value.limits.maxQueued, seconds: m.value.limits.jobTimeoutSeconds })), 1),
1231
- $("p", _t, t(m.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1232
- $("p", wt, t(o(a.value.ownerLimits, { jobs: m.value.limits.maxOwnerPending, size: m.value.limits.maxOwnerBytes / 1024 })), 1),
1233
- $("div", xt, [
1234
- d(e(U), {
1673
+ })) : b("", !0),
1674
+ v.value ? (n(), R(oe, { key: 1 }, [
1675
+ P("p", Gt, l(v.value.worker?.alive ? u(a.value.workerRunning, { user: v.value.worker.username }) : a.value.workerStopped), 1),
1676
+ P("p", Jt, l(u(a.value.limits, { size: v.value.limits.maxInputBytes / 1024, queue: v.value.limits.maxQueued, seconds: v.value.limits.jobTimeoutSeconds })), 1),
1677
+ P("p", Wt, l(v.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1678
+ P("p", Xt, l(u(a.value.ownerLimits, { jobs: v.value.limits.maxOwnerPending, size: v.value.limits.maxOwnerBytes / 1024 })), 1),
1679
+ P("div", Qt, [
1680
+ f(e(F), {
1235
1681
  variant: "secondary",
1236
- disabled: r.value,
1237
- onClick: B[0] || (B[0] = (_) => N.value = !0)
1682
+ disabled: c.value,
1683
+ onClick: L[0] || (L[0] = (w) => z.value = !0)
1238
1684
  }, {
1239
- default: l(() => [
1240
- g(t(a.value.chooseFile), 1)
1685
+ default: t(() => [
1686
+ k(l(a.value.chooseFile), 1)
1241
1687
  ]),
1242
1688
  _: 1
1243
1689
  }, 8, ["disabled"]),
1244
- d(e(U), {
1690
+ f(e(F), {
1245
1691
  variant: "primary",
1246
- disabled: r.value || !K.value,
1247
- onClick: P
1692
+ disabled: c.value || !I.value,
1693
+ onClick: T
1248
1694
  }, {
1249
- default: l(() => [
1250
- g(t(a.value.submit), 1)
1695
+ default: t(() => [
1696
+ k(l(a.value.submit), 1)
1251
1697
  ]),
1252
1698
  _: 1
1253
1699
  }, 8, ["disabled"])
1254
1700
  ]),
1255
- K.value ? (s(), V("p", Ct, [
1256
- g(t(o(a.value.chosen, { path: "" }).trim()) + " ", 1),
1257
- d(e(pe), {
1258
- path: `${K.value.folder}/${K.value.relative}`
1701
+ I.value ? (n(), R("p", Yt, [
1702
+ k(l(u(a.value.chosen, { path: "" }).trim()) + " ", 1),
1703
+ f(e(ye), {
1704
+ path: `${I.value.folder}/${I.value.relative}`
1259
1705
  }, null, 8, ["path"])
1260
- ])) : h("", !0),
1261
- d(Te, {
1262
- open: N.value,
1263
- "onUpdate:open": B[1] || (B[1] = (_) => N.value = _),
1264
- locale: y.ctx.locale,
1265
- provider: e(ae),
1706
+ ])) : b("", !0),
1707
+ f(Re, {
1708
+ open: z.value,
1709
+ "onUpdate:open": L[1] || (L[1] = (w) => z.value = w),
1710
+ locale: r.ctx.locale,
1711
+ provider: e(le),
1266
1712
  mode: "file",
1267
1713
  title: a.value.pickerTitle,
1268
1714
  description: a.value.pickerConsent,
1269
1715
  onSelected: C
1270
1716
  }, null, 8, ["open", "locale", "provider", "title", "description"]),
1271
- z.value && m.value.admin ? (s(), x(e(X), {
1717
+ V.value && v.value.admin ? (n(), g(e(W), {
1272
1718
  key: 1,
1273
1719
  tone: "warning"
1274
1720
  }, {
1275
- default: l(() => [
1276
- $("p", null, t(o(a.value.purgeConfirm, { user: z.value.user, uid: z.value.uid })), 1),
1277
- $("div", $t, [
1278
- d(e(U), {
1721
+ default: t(() => [
1722
+ P("p", null, l(u(a.value.purgeConfirm, { user: V.value.user, uid: V.value.uid })), 1),
1723
+ P("div", Zt, [
1724
+ f(e(F), {
1279
1725
  variant: "secondary",
1280
- disabled: r.value,
1281
- onClick: E
1726
+ disabled: c.value,
1727
+ onClick: O
1282
1728
  }, {
1283
- default: l(() => [
1284
- g(t(a.value.confirmPurge), 1)
1729
+ default: t(() => [
1730
+ k(l(a.value.confirmPurge), 1)
1285
1731
  ]),
1286
1732
  _: 1
1287
1733
  }, 8, ["disabled"]),
1288
- d(e(U), {
1734
+ f(e(F), {
1289
1735
  variant: "secondary",
1290
- disabled: r.value,
1291
- onClick: B[2] || (B[2] = (_) => z.value = void 0)
1736
+ disabled: c.value,
1737
+ onClick: L[2] || (L[2] = (w) => V.value = void 0)
1292
1738
  }, {
1293
- default: l(() => [
1294
- g(t(a.value.keepJobs), 1)
1739
+ default: t(() => [
1740
+ k(l(a.value.keepJobs), 1)
1295
1741
  ]),
1296
1742
  _: 1
1297
1743
  }, 8, ["disabled"])
1298
1744
  ])
1299
1745
  ]),
1300
1746
  _: 1
1301
- })) : h("", !0),
1302
- i.value.length ? (s(), V("div", zt, [
1303
- (s(!0), V(ne, null, ke(i.value, (_) => (s(), x(e(Fe), {
1304
- key: _.id,
1305
- title: _.name,
1747
+ })) : b("", !0),
1748
+ o.value.length ? (n(), R("div", el, [
1749
+ (n(!0), R(oe, null, _e(o.value, (w) => (n(), g(e(Ye), {
1750
+ key: w.id,
1751
+ title: w.name,
1306
1752
  "layout-type": "compact",
1307
- "data-job-state": _.state,
1308
- "data-job-id": _.id
1753
+ "data-job-state": w.state,
1754
+ "data-job-id": w.id
1309
1755
  }, {
1310
- "header-actions": l(() => [
1311
- d(e($e), {
1312
- tone: Y(_),
1756
+ "header-actions": t(() => [
1757
+ f(e(Se), {
1758
+ tone: Z(w),
1313
1759
  "data-bg-state": ""
1314
1760
  }, {
1315
- default: l(() => [
1316
- g(t(Q(_)), 1)
1761
+ default: t(() => [
1762
+ k(l(ee(w)), 1)
1317
1763
  ]),
1318
1764
  _: 2
1319
1765
  }, 1032, ["tone"])
1320
1766
  ]),
1321
- default: l(() => [
1322
- $("div", Pt, [
1323
- _.progress?.total ? (s(), V("span", Vt, t(o(a.value.progressItems, { done: _.progress.done, count: _.progress.total })), 1)) : h("", !0),
1324
- _.progress?.totalBytes ? (s(), V("span", It, t(o(a.value.progressBytes, { done: e(Re)(_.progress.bytes, y.ctx.locale), total: e(Re)(_.progress.totalBytes, y.ctx.locale) })), 1)) : h("", !0),
1325
- _.progress?.item ? (s(), V("span", Tt, [
1326
- g(t(o(a.value.progressItem, { item: "" }).trim()) + " ", 1),
1327
- d(e(pe), {
1328
- path: _.progress.item
1767
+ default: t(() => [
1768
+ P("div", al, [
1769
+ w.progress?.total ? (n(), R("span", tl, l(u(a.value.progressItems, { done: w.progress.done, count: w.progress.total })), 1)) : b("", !0),
1770
+ w.progress?.totalBytes ? (n(), R("span", ll, l(u(a.value.progressBytes, { done: e(Oe)(w.progress.bytes, r.ctx.locale), total: e(Oe)(w.progress.totalBytes, r.ctx.locale) })), 1)) : b("", !0),
1771
+ w.progress?.item ? (n(), R("span", nl, [
1772
+ k(l(u(a.value.progressItem, { item: "" }).trim()) + " ", 1),
1773
+ f(e(ye), {
1774
+ path: w.progress.item
1329
1775
  }, null, 8, ["path"])
1330
- ])) : h("", !0),
1331
- m.value.admin && _.submitter ? (s(), V("span", Et, t(o(a.value.owner, { user: _.submitter.user, uid: _.submitter.uid })), 1)) : h("", !0),
1332
- _.scheduleId ? (s(), V("span", Ut, t(a.value.scheduledJob), 1)) : h("", !0),
1333
- $("div", At, [
1334
- m.value.admin && _.submitter ? (s(), x(e(U), {
1776
+ ])) : b("", !0),
1777
+ v.value.admin && w.submitter ? (n(), R("span", sl, l(u(a.value.owner, { user: w.submitter.user, uid: w.submitter.uid })), 1)) : b("", !0),
1778
+ w.scheduleId ? (n(), R("span", ol, l(a.value.scheduledJob), 1)) : b("", !0),
1779
+ P("div", il, [
1780
+ v.value.admin && w.submitter ? (n(), g(e(F), {
1335
1781
  key: 0,
1336
1782
  variant: "secondary",
1337
- disabled: r.value,
1338
- onClick: (ie) => z.value = _.submitter
1783
+ disabled: c.value,
1784
+ onClick: (re) => V.value = w.submitter
1339
1785
  }, {
1340
- default: l(() => [
1341
- g(t(a.value.purgeOwner), 1)
1786
+ default: t(() => [
1787
+ k(l(a.value.purgeOwner), 1)
1342
1788
  ]),
1343
1789
  _: 1
1344
- }, 8, ["disabled", "onClick"])) : h("", !0),
1345
- !j(_) && !_.pauseRequested && !_.delegation_id ? (s(), x(e(U), {
1790
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1791
+ !Y(w) && !w.pauseRequested && !w.delegation_id ? (n(), g(e(F), {
1346
1792
  key: 1,
1347
1793
  variant: "secondary",
1348
- disabled: r.value,
1349
- onClick: (ie) => ee(_.id)
1794
+ disabled: c.value,
1795
+ onClick: (re) => te(w.id)
1350
1796
  }, {
1351
- default: l(() => [
1352
- g(t(a.value.pause), 1)
1797
+ default: t(() => [
1798
+ k(l(a.value.pause), 1)
1353
1799
  ]),
1354
1800
  _: 1
1355
- }, 8, ["disabled", "onClick"])) : h("", !0),
1356
- _.state === "paused" || se(_) ? (s(), x(e(U), {
1801
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1802
+ w.state === "paused" || se(w) ? (n(), g(e(F), {
1357
1803
  key: 2,
1358
1804
  variant: "secondary",
1359
- disabled: r.value,
1360
- onClick: (ie) => A(_.id)
1805
+ disabled: c.value,
1806
+ onClick: (re) => q(w.id)
1361
1807
  }, {
1362
- default: l(() => [
1363
- g(t(a.value.resume), 1)
1808
+ default: t(() => [
1809
+ k(l(a.value.resume), 1)
1364
1810
  ]),
1365
1811
  _: 1
1366
- }, 8, ["disabled", "onClick"])) : h("", !0),
1367
- te(_) ? h("", !0) : (s(), x(e(U), {
1812
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1813
+ ne(w) ? b("", !0) : (n(), g(e(F), {
1368
1814
  key: 3,
1369
1815
  variant: "secondary",
1370
- disabled: r.value,
1371
- onClick: (ie) => F(_.id)
1816
+ disabled: c.value,
1817
+ onClick: (re) => M(w.id)
1372
1818
  }, {
1373
- default: l(() => [
1374
- g(t(a.value.cancel), 1)
1819
+ default: t(() => [
1820
+ k(l(a.value.cancel), 1)
1375
1821
  ]),
1376
1822
  _: 1
1377
1823
  }, 8, ["disabled", "onClick"])),
1378
- me(_) ? (s(), x(e(U), {
1824
+ me(w) ? (n(), g(e(F), {
1379
1825
  key: 4,
1380
1826
  variant: "secondary",
1381
- disabled: r.value,
1382
- onClick: (ie) => re(_)
1827
+ disabled: c.value,
1828
+ onClick: (re) => ae(w)
1383
1829
  }, {
1384
- default: l(() => [
1385
- g(t(a.value.scheduleCopy), 1)
1830
+ default: t(() => [
1831
+ k(l(a.value.scheduleCopy), 1)
1386
1832
  ]),
1387
1833
  _: 1
1388
- }, 8, ["disabled", "onClick"])) : h("", !0),
1389
- _.state === "succeeded" ? (s(), x(e(U), {
1834
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1835
+ w.state === "succeeded" ? (n(), g(e(F), {
1390
1836
  key: 5,
1391
1837
  variant: "secondary",
1392
- disabled: r.value,
1393
- onClick: (ie) => I(_)
1838
+ disabled: c.value,
1839
+ onClick: (re) => B(w)
1394
1840
  }, {
1395
- default: l(() => [
1396
- g(t(a.value.result), 1)
1841
+ default: t(() => [
1842
+ k(l(a.value.result), 1)
1397
1843
  ]),
1398
1844
  _: 1
1399
- }, 8, ["disabled", "onClick"])) : h("", !0)
1845
+ }, 8, ["disabled", "onClick"])) : b("", !0)
1400
1846
  ])
1401
1847
  ])
1402
1848
  ]),
1403
1849
  _: 2
1404
1850
  }, 1032, ["title", "data-job-state", "data-job-id"]))), 128))
1405
- ])) : (s(), V("p", St, t(a.value.noJobs), 1)),
1406
- $("section", {
1851
+ ])) : (n(), R("p", jt, l(a.value.noJobs), 1)),
1852
+ P("section", {
1407
1853
  "data-bg-schedules": "",
1408
1854
  class: "bg-schedules",
1409
1855
  "aria-label": a.value.schedulesTitle
1410
1856
  }, [
1411
- $("h3", null, t(a.value.schedulesTitle), 1),
1412
- $("p", Rt, t(a.value.scheduleHelp), 1),
1413
- k.value ? (s(), x(e(ze), {
1857
+ P("h3", null, l(a.value.schedulesTitle), 1),
1858
+ P("p", rl, l(a.value.scheduleHelp), 1),
1859
+ h.value ? (n(), g(e(Pe), {
1414
1860
  key: 0,
1415
1861
  class: "bg-schedule-form",
1416
- onSubmit: Se(we, ["prevent"])
1862
+ onSubmit: ze(xe, ["prevent"])
1417
1863
  }, {
1418
- default: l(() => [
1419
- $("p", null, t(o(a.value.scheduleSource, { name: k.value.name })), 1),
1420
- d(e(fe), {
1864
+ default: t(() => [
1865
+ P("p", null, l(u(a.value.scheduleSource, { name: h.value.name })), 1),
1866
+ f(e(he), {
1421
1867
  label: a.value.interval
1422
1868
  }, {
1423
- default: l(() => [
1424
- d(e(Ze), {
1425
- modelValue: S.value,
1426
- "onUpdate:modelValue": B[3] || (B[3] = (_) => S.value = _),
1869
+ default: t(() => [
1870
+ f(e(oa), {
1871
+ modelValue: $.value,
1872
+ "onUpdate:modelValue": L[3] || (L[3] = (w) => $.value = w),
1427
1873
  "data-schedule-interval": "",
1428
1874
  options: J.value,
1429
- disabled: r.value
1875
+ disabled: c.value
1430
1876
  }, null, 8, ["modelValue", "options", "disabled"])
1431
1877
  ]),
1432
1878
  _: 1
1433
1879
  }, 8, ["label"]),
1434
- d(e(xa), {
1435
- modelValue: D.value,
1436
- "onUpdate:modelValue": B[4] || (B[4] = (_) => D.value = _),
1880
+ f(e(La), {
1881
+ modelValue: A.value,
1882
+ "onUpdate:modelValue": L[4] || (L[4] = (w) => A.value = w),
1437
1883
  "data-schedule-consent": "",
1438
- disabled: r.value,
1884
+ disabled: c.value,
1439
1885
  label: a.value.scheduleConsent
1440
1886
  }, null, 8, ["modelValue", "disabled", "label"]),
1441
- d(e(Pe), null, {
1442
- default: l(() => [
1443
- d(e(U), {
1887
+ f(e(Ve), null, {
1888
+ default: t(() => [
1889
+ f(e(F), {
1444
1890
  type: "submit",
1445
1891
  variant: "primary",
1446
- disabled: r.value || !D.value
1892
+ disabled: c.value || !A.value
1447
1893
  }, {
1448
- default: l(() => [
1449
- g(t(a.value.createSchedule), 1)
1894
+ default: t(() => [
1895
+ k(l(a.value.createSchedule), 1)
1450
1896
  ]),
1451
1897
  _: 1
1452
1898
  }, 8, ["disabled"]),
1453
- d(e(U), {
1899
+ f(e(F), {
1454
1900
  type: "button",
1455
1901
  variant: "secondary",
1456
- disabled: r.value,
1457
- onClick: B[5] || (B[5] = (_) => k.value = void 0)
1902
+ disabled: c.value,
1903
+ onClick: L[5] || (L[5] = (w) => h.value = void 0)
1458
1904
  }, {
1459
- default: l(() => [
1460
- g(t(a.value.cancel), 1)
1905
+ default: t(() => [
1906
+ k(l(a.value.cancel), 1)
1461
1907
  ]),
1462
1908
  _: 1
1463
1909
  }, 8, ["disabled"])
@@ -1466,76 +1912,76 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1466
1912
  })
1467
1913
  ]),
1468
1914
  _: 1
1469
- })) : h("", !0),
1470
- v.value.length ? (s(), V("div", Bt, [
1471
- (s(!0), V(ne, null, ke(v.value, (_) => (s(), x(e(Fe), {
1472
- key: _.id,
1473
- title: _.name,
1915
+ })) : b("", !0),
1916
+ p.value.length ? (n(), R("div", cl, [
1917
+ (n(!0), R(oe, null, _e(p.value, (w) => (n(), g(e(Ye), {
1918
+ key: w.id,
1919
+ title: w.name,
1474
1920
  "layout-type": "compact",
1475
- "data-schedule-id": _.id
1921
+ "data-schedule-id": w.id
1476
1922
  }, {
1477
- "header-actions": l(() => [
1478
- d(e($e), {
1479
- tone: _.enabled ? "success" : "neutral",
1923
+ "header-actions": t(() => [
1924
+ f(e(Se), {
1925
+ tone: w.enabled ? "success" : "neutral",
1480
1926
  "data-bg-state": ""
1481
1927
  }, {
1482
- default: l(() => [
1483
- g(t(_.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
1928
+ default: t(() => [
1929
+ k(l(w.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
1484
1930
  ]),
1485
1931
  _: 2
1486
1932
  }, 1032, ["tone"])
1487
1933
  ]),
1488
- default: l(() => [
1489
- $("div", Ft, [
1490
- m.value.admin ? (s(), V("span", Ot, t(o(a.value.owner, { user: _.owner.user, uid: _.owner.uid })), 1)) : h("", !0),
1491
- _.enabled ? (s(), V("span", Lt, t(o(a.value.nextRun, { time: de(_.nextAt) })), 1)) : h("", !0),
1492
- $("span", Nt, t(o(a.value.missedRuns, { count: _.missed })), 1),
1493
- _.reason === "worker-changed" ? (s(), x(e(X), {
1934
+ default: t(() => [
1935
+ P("div", vl, [
1936
+ v.value.admin ? (n(), R("span", pl, l(u(a.value.owner, { user: w.owner.user, uid: w.owner.uid })), 1)) : b("", !0),
1937
+ w.enabled ? (n(), R("span", fl, l(u(a.value.nextRun, { time: de(w.nextAt) })), 1)) : b("", !0),
1938
+ P("span", yl, l(u(a.value.missedRuns, { count: w.missed })), 1),
1939
+ w.reason === "worker-changed" ? (n(), g(e(W), {
1494
1940
  key: 2,
1495
1941
  tone: "warning"
1496
1942
  }, {
1497
- default: l(() => [
1498
- g(t(a.value.revisionChanged), 1)
1943
+ default: t(() => [
1944
+ k(l(a.value.revisionChanged), 1)
1499
1945
  ]),
1500
1946
  _: 1
1501
- })) : _.reason === "input-unavailable" ? (s(), x(e(X), {
1947
+ })) : w.reason === "input-unavailable" ? (n(), g(e(W), {
1502
1948
  key: 3,
1503
1949
  tone: "warning"
1504
1950
  }, {
1505
- default: l(() => [
1506
- g(t(a.value.errors["input-unavailable"]), 1)
1951
+ default: t(() => [
1952
+ k(l(a.value.errors["input-unavailable"]), 1)
1507
1953
  ]),
1508
1954
  _: 1
1509
- })) : h("", !0),
1510
- $("div", Mt, [
1511
- _.enabled ? (s(), x(e(U), {
1955
+ })) : b("", !0),
1956
+ P("div", ml, [
1957
+ w.enabled ? (n(), g(e(F), {
1512
1958
  key: 0,
1513
1959
  variant: "secondary",
1514
- disabled: r.value,
1515
- onClick: (ie) => xe(_.id)
1960
+ disabled: c.value,
1961
+ onClick: (re) => Ce(w.id)
1516
1962
  }, {
1517
- default: l(() => [
1518
- g(t(a.value.disableSchedule), 1)
1963
+ default: t(() => [
1964
+ k(l(a.value.disableSchedule), 1)
1519
1965
  ]),
1520
1966
  _: 1
1521
- }, 8, ["disabled", "onClick"])) : m.value.admin ? (s(), x(e(U), {
1967
+ }, 8, ["disabled", "onClick"])) : v.value.admin ? (n(), g(e(F), {
1522
1968
  key: 1,
1523
1969
  variant: "secondary",
1524
- disabled: r.value,
1525
- onClick: (ie) => w.value = _
1970
+ disabled: c.value,
1971
+ onClick: (re) => S.value = w
1526
1972
  }, {
1527
- default: l(() => [
1528
- g(t(a.value.enableSchedule), 1)
1973
+ default: t(() => [
1974
+ k(l(a.value.enableSchedule), 1)
1529
1975
  ]),
1530
1976
  _: 1
1531
- }, 8, ["disabled", "onClick"])) : h("", !0),
1532
- d(e(U), {
1977
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1978
+ f(e(F), {
1533
1979
  variant: "secondary",
1534
- disabled: r.value,
1535
- onClick: (ie) => c.value = _
1980
+ disabled: c.value,
1981
+ onClick: (re) => _.value = w
1536
1982
  }, {
1537
- default: l(() => [
1538
- g(t(a.value.deleteSchedule), 1)
1983
+ default: t(() => [
1984
+ k(l(a.value.deleteSchedule), 1)
1539
1985
  ]),
1540
1986
  _: 1
1541
1987
  }, 8, ["disabled", "onClick"])
@@ -1544,475 +1990,281 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1544
1990
  ]),
1545
1991
  _: 2
1546
1992
  }, 1032, ["title", "data-schedule-id"]))), 128))
1547
- ])) : (s(), V("p", qt, t(a.value.noSchedules), 1)),
1548
- c.value ? (s(), x(e(X), {
1993
+ ])) : (n(), R("p", dl, l(a.value.noSchedules), 1)),
1994
+ _.value ? (n(), g(e(W), {
1549
1995
  key: 3,
1550
1996
  tone: "warning"
1551
1997
  }, {
1552
- default: l(() => [
1553
- $("p", null, t(o(a.value.deleteScheduleConsent, { name: c.value.name })), 1),
1554
- $("div", Kt, [
1555
- d(e(U), {
1998
+ default: t(() => [
1999
+ P("p", null, l(u(a.value.deleteScheduleConsent, { name: _.value.name })), 1),
2000
+ P("div", bl, [
2001
+ f(e(F), {
1556
2002
  variant: "danger",
1557
- disabled: r.value,
1558
- onClick: ve
2003
+ disabled: c.value,
2004
+ onClick: pe
1559
2005
  }, {
1560
- default: l(() => [
1561
- g(t(a.value.confirmDeleteSchedule), 1)
2006
+ default: t(() => [
2007
+ k(l(a.value.confirmDeleteSchedule), 1)
1562
2008
  ]),
1563
2009
  _: 1
1564
2010
  }, 8, ["disabled"]),
1565
- d(e(U), {
2011
+ f(e(F), {
1566
2012
  variant: "secondary",
1567
- disabled: r.value,
1568
- onClick: B[6] || (B[6] = (_) => c.value = void 0)
2013
+ disabled: c.value,
2014
+ onClick: L[6] || (L[6] = (w) => _.value = void 0)
1569
2015
  }, {
1570
- default: l(() => [
1571
- g(t(a.value.cancel), 1)
2016
+ default: t(() => [
2017
+ k(l(a.value.cancel), 1)
1572
2018
  ]),
1573
2019
  _: 1
1574
2020
  }, 8, ["disabled"])
1575
2021
  ])
1576
2022
  ]),
1577
2023
  _: 1
1578
- })) : h("", !0),
1579
- w.value ? (s(), x(e(X), {
2024
+ })) : b("", !0),
2025
+ S.value ? (n(), g(e(W), {
1580
2026
  key: 4,
1581
2027
  tone: "warning"
1582
2028
  }, {
1583
- default: l(() => [
1584
- $("p", null, t(o(a.value.enableScheduleConsent, { name: w.value.name })), 1),
1585
- $("div", Ht, [
1586
- d(e(U), {
2029
+ default: t(() => [
2030
+ P("p", null, l(u(a.value.enableScheduleConsent, { name: S.value.name })), 1),
2031
+ P("div", gl, [
2032
+ f(e(F), {
1587
2033
  variant: "primary",
1588
- disabled: r.value,
1589
- onClick: ce
2034
+ disabled: c.value,
2035
+ onClick: fe
1590
2036
  }, {
1591
- default: l(() => [
1592
- g(t(a.value.confirmEnableSchedule), 1)
2037
+ default: t(() => [
2038
+ k(l(a.value.confirmEnableSchedule), 1)
1593
2039
  ]),
1594
2040
  _: 1
1595
2041
  }, 8, ["disabled"]),
1596
- d(e(U), {
2042
+ f(e(F), {
1597
2043
  variant: "secondary",
1598
- disabled: r.value,
1599
- onClick: B[7] || (B[7] = (_) => w.value = void 0)
2044
+ disabled: c.value,
2045
+ onClick: L[7] || (L[7] = (w) => S.value = void 0)
1600
2046
  }, {
1601
- default: l(() => [
1602
- g(t(a.value.cancel), 1)
2047
+ default: t(() => [
2048
+ k(l(a.value.cancel), 1)
1603
2049
  ]),
1604
2050
  _: 1
1605
2051
  }, 8, ["disabled"])
1606
2052
  ])
1607
2053
  ]),
1608
2054
  _: 1
1609
- })) : h("", !0)
1610
- ], 8, Dt),
1611
- O.value ? (s(), x(e(Ye), {
2055
+ })) : b("", !0)
2056
+ ], 8, ul),
2057
+ K.value ? (n(), g(e(ia), {
1612
2058
  key: 4,
1613
- href: O.value,
1614
- download: Z.value
2059
+ href: K.value,
2060
+ download: H.value
1615
2061
  }, {
1616
- default: l(() => [
1617
- g(t(a.value.download), 1)
2062
+ default: t(() => [
2063
+ k(l(a.value.download), 1)
1618
2064
  ]),
1619
2065
  _: 1
1620
- }, 8, ["href", "download"])) : h("", !0)
1621
- ], 64)) : h("", !0)
2066
+ }, 8, ["href", "download"])) : b("", !0)
2067
+ ], 64)) : b("", !0)
1622
2068
  ], 64))
1623
2069
  ]),
1624
2070
  _: 1
1625
2071
  }, 8, ["aria-busy", "title", "description", "loading"]));
1626
2072
  }
1627
- }), Xl = /* @__PURE__ */ ue(Gt, [["__scopeId", "data-v-fa2b6101"]]), Jt = { class: "executor-alert" }, Xt = {
1628
- key: 1,
1629
- class: "executor-summary"
1630
- }, Qt = ["data-executor-status"], Yt = { class: "executor-help" }, Zt = {
1631
- key: 0,
1632
- class: "executor-hint"
1633
- }, Wt = /* @__PURE__ */ oe({
1634
- __name: "ExecutorSettings",
2073
+ }), gn = /* @__PURE__ */ ue(hl, [["__scopeId", "data-v-fa2b6101"]]), kl = {
2074
+ key: 2,
2075
+ class: "executor-approval"
2076
+ }, _l = /* @__PURE__ */ ie({
2077
+ __name: "ExecutorApproval",
1635
2078
  props: {
1636
2079
  admin: { type: Boolean },
1637
2080
  locale: {},
1638
2081
  ctx: {}
1639
2082
  },
1640
- emits: ["confirmed"],
1641
- setup(y, { expose: q, emit: f }) {
1642
- const a = y, o = f, m = We(), i = L(() => Ke(a.locale)), n = b(), u = b(""), r = b(!1), v = b(!1), k = b(!1), D = b(), S = b(""), c = b([]), w = L(() => D.value?.scope_mode === "install-selected"), z = L(() => [{ label: i.value.homeScope, value: "home" }, ...c.value]), M = L(() => !w.value || !!S.value && z.value.some((Q) => Q.value === S.value)), N = L(() => w.value && !D.value?.selection), K = L(() => S.value !== D.value?.selection?.scope);
1643
- let O = !1;
1644
- async function Z(Q) {
1645
- const Y = Q ?? await m.status();
1646
- if (O || (n.value = Y, !a.ctx)) return;
1647
- const G = await a.ctx.call("delegate.status");
1648
- if (O || (D.value = G, G.scope_mode !== "install-selected")) return;
1649
- const le = [];
1650
- let R = 0;
1651
- for (let T = 0; T < 128; T++) {
1652
- const E = await a.ctx.call("bg.browse", { offset: R });
1653
- if (O) return;
1654
- if (!Array.isArray(E.shares) || !Number.isSafeInteger(E.total) || E.total < 0 || !E.shares.length && R < E.total) throw { code: "EXECUTOR_PROTOCOL" };
1655
- for (const J of E.shares)
1656
- J.isdir && J.path === "/" + J.name && !["home", "homes"].includes(J.name.toLowerCase()) && le.push({ label: J.name, value: "shared:" + J.name });
1657
- if (R += E.shares.length, R >= E.total) break;
1658
- if (T === 127) throw { code: "EXECUTOR_PROTOCOL" };
1659
- }
1660
- c.value = le, S.value = G.selection?.scope ?? G.preselection ?? "";
1661
- }
1662
- async function ae() {
1663
- if (!(!a.admin || r.value)) {
1664
- r.value = !0, k.value = !1;
1665
- try {
1666
- await Z();
1667
- } catch {
1668
- O || (k.value = !0);
1669
- } finally {
1670
- O || (r.value = !1);
1671
- }
1672
- }
1673
- }
1674
- async function W() {
1675
- if (!a.admin || r.value || !u.value || !M.value || k.value) return;
1676
- r.value = !0, k.value = !1;
1677
- const Q = u.value;
1678
- u.value = "", v.value = !0;
2083
+ setup(r) {
2084
+ const x = r, i = Le(Ke, void 0), a = U(() => Te(x.locale)), u = y("checking");
2085
+ let v = !1, o;
2086
+ async function s() {
1679
2087
  try {
1680
- let Y = w.value ? await m.authorize(Q, S.value) : await m.authorize(Q);
1681
- await Z(Y), !O && w.value && Y.state === "ready" && N.value && (Y = await m.authorize(Q, S.value), await Z(Y)), O || o("confirmed");
2088
+ const d = await i.status();
2089
+ v || (u.value = d.state);
1682
2090
  } catch {
1683
- O || (k.value = !0);
1684
- } finally {
1685
- O || (r.value = !1, v.value = !1);
2091
+ v || (u.value = "blocked");
1686
2092
  }
1687
2093
  }
1688
- const H = L(() => v.value ? "confirming" : n.value ? n.value.state === "ready" ? N.value ? "scope" : "ready" : n.value.state === "needs-admin-approval" ? "needs" : "blocked" : void 0), j = L(() => ({ ready: { tone: "success", text: i.value.statusReady }, scope: { tone: "warning", text: i.value.statusScope }, needs: { tone: "warning", text: i.value.statusNeeds }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[H.value ?? "confirming"]), te = L(() => w.value && !!D.value?.selection && !K.value), se = L(() => r.value || k.value ? "" : te.value ? i.value.hintUnchanged : u.value ? "" : i.value.hintPassword);
1689
- return q({ refresh: ae }), ge(() => {
1690
- m.subscribe?.((Q) => {
1691
- O || (n.value = Q);
1692
- }), ae();
1693
- }), ye(() => {
1694
- O = !0, u.value = "";
1695
- }), (Q, Y) => y.admin ? (s(), x(e(he), {
1696
- key: 0,
1697
- title: i.value.setupTitle,
1698
- description: i.value.setupHelp,
1699
- loading: !n.value && !v.value && !k.value,
1700
- collapsible: !1,
1701
- "aria-busy": r.value
1702
- }, {
1703
- default: l(() => [
1704
- k.value ? (s(), x(e(X), {
1705
- key: 0,
1706
- tone: "danger",
1707
- role: "alert"
1708
- }, {
1709
- default: l(() => [
1710
- $("span", Jt, [
1711
- g(t(i.value.setupError), 1),
1712
- d(e(U), {
1713
- variant: "secondary",
1714
- size: "sm",
1715
- disabled: r.value,
1716
- onClick: ae
1717
- }, {
1718
- default: l(() => [
1719
- g(t(i.value.retry), 1)
1720
- ]),
1721
- _: 1
1722
- }, 8, ["disabled"])
1723
- ])
1724
- ]),
1725
- _: 1
1726
- })) : h("", !0),
1727
- n.value || v.value ? (s(), V("div", Xt, [
1728
- d(e(Ce), {
1729
- label: i.value.status,
1730
- "label-width": "10rem"
1731
- }, {
1732
- default: l(() => [
1733
- $("span", {
1734
- role: "status",
1735
- "data-executor-status": H.value
1736
- }, [
1737
- d(e($e), {
1738
- tone: j.value.tone
1739
- }, {
1740
- default: l(() => [
1741
- g(t(j.value.text), 1)
1742
- ]),
1743
- _: 1
1744
- }, 8, ["tone"])
1745
- ], 8, Qt)
1746
- ]),
1747
- _: 1
1748
- }, 8, ["label"]),
1749
- n.value?.reason && (n.value.state === "blocked" || n.value.state === "unsupported") ? (s(), x(e(Ce), {
1750
- key: 0,
1751
- label: i.value.details,
1752
- "label-width": "10rem"
1753
- }, {
1754
- default: l(() => [
1755
- g(t(n.value.reason), 1)
1756
- ]),
1757
- _: 1
1758
- }, 8, ["label"])) : h("", !0),
1759
- D.value?.selection ? (s(), x(e(Ce), {
1760
- key: 1,
1761
- label: i.value.protectedScope,
1762
- "label-width": "10rem"
1763
- }, {
1764
- default: l(() => [
1765
- d(e(pe), {
1766
- path: D.value.selection.root
1767
- }, null, 8, ["path"])
1768
- ]),
1769
- _: 1
1770
- }, 8, ["label"])) : h("", !0)
1771
- ])) : h("", !0),
1772
- H.value === "needs" ? (s(), x(e(X), {
1773
- key: 2,
1774
- tone: "info"
1775
- }, {
1776
- default: l(() => [
1777
- g(t(i.value.needs), 1)
1778
- ]),
1779
- _: 1
1780
- })) : H.value === "scope" ? (s(), x(e(X), {
1781
- key: 3,
1782
- tone: "warning"
1783
- }, {
1784
- default: l(() => [
1785
- g(t(i.value.scopeNeeds), 1)
1786
- ]),
1787
- _: 1
1788
- })) : H.value === "blocked" ? (s(), x(e(X), {
1789
- key: 4,
1790
- tone: "warning"
1791
- }, {
1792
- default: l(() => [
1793
- g(t(i.value.blocked), 1)
1794
- ]),
1795
- _: 1
1796
- })) : h("", !0),
1797
- D.value?.mismatch ? (s(), x(e(X), {
1798
- key: 5,
1799
- tone: "warning"
1800
- }, {
1801
- default: l(() => [
1802
- g(t(i.value.scopeMismatch), 1)
1803
- ]),
1804
- _: 1
1805
- })) : h("", !0),
1806
- n.value?.state === "needs-admin-approval" || n.value?.retry || w.value && n.value?.state === "ready" ? (s(), x(e(ze), {
1807
- key: 6,
1808
- direction: "vertical",
1809
- class: "executor-form",
1810
- onSubmit: Se(W, ["prevent"])
1811
- }, {
1812
- default: l(() => [
1813
- w.value ? (s(), V(ne, { key: 0 }, [
1814
- $("p", Yt, t(D.value?.selection ? i.value.scopeChangeHelp : i.value.preselectionHelp), 1),
1815
- d(e(fe), {
1816
- label: i.value.scopeLabel,
1817
- "label-for": "delegate-scope"
1818
- }, {
1819
- default: l(() => [
1820
- d(e(Ze), {
1821
- id: "delegate-scope",
1822
- modelValue: S.value,
1823
- "onUpdate:modelValue": Y[0] || (Y[0] = (G) => S.value = G),
1824
- options: z.value,
1825
- disabled: r.value || k.value
1826
- }, null, 8, ["modelValue", "options", "disabled"])
1827
- ]),
1828
- _: 1
1829
- }, 8, ["label"])
1830
- ], 64)) : h("", !0),
1831
- d(e(fe), {
1832
- label: i.value.password,
1833
- "label-for": "delegate-password"
1834
- }, {
1835
- default: l(() => [
1836
- d(e(_e), {
1837
- id: "delegate-password",
1838
- modelValue: u.value,
1839
- "onUpdate:modelValue": Y[1] || (Y[1] = (G) => u.value = G),
1840
- type: "password",
1841
- autocomplete: "current-password",
1842
- disabled: r.value || k.value
1843
- }, null, 8, ["modelValue", "disabled"])
1844
- ]),
1845
- _: 1
1846
- }, 8, ["label"]),
1847
- d(e(Pe), null, {
1848
- default: l(() => [
1849
- d(e(U), {
1850
- type: "submit",
1851
- variant: "primary",
1852
- disabled: r.value || k.value || !u.value || !M.value || te.value
1853
- }, {
1854
- default: l(() => [
1855
- g(t(w.value ? D.value?.selection ? i.value.confirmScope : i.value.confirmShare : i.value.authorize), 1)
1856
- ]),
1857
- _: 1
1858
- }, 8, ["disabled"]),
1859
- se.value ? (s(), V("span", Zt, t(se.value), 1)) : h("", !0)
1860
- ]),
1861
- _: 1
1862
- })
1863
- ]),
1864
- _: 1
1865
- })) : h("", !0)
1866
- ]),
1867
- _: 1
1868
- }, 8, ["title", "description", "loading", "aria-busy"])) : h("", !0);
2094
+ return ve(() => {
2095
+ i && (i.subscribe?.((d) => {
2096
+ v || (u.value = d.state);
2097
+ }), o = x.ctx?.reopen(() => {
2098
+ s();
2099
+ }), s());
2100
+ }), ce(() => {
2101
+ v = !0, o?.();
2102
+ }), (d, c) => !e(i) || u.value === "ready" ? ge(d.$slots, "default", {}, void 0, !0, 0) : u.value === "checking" ? (n(), g(e(Na), {
2103
+ key: 1,
2104
+ text: a.value.loading
2105
+ }, null, 8, ["text"])) : (n(), R("div", kl, [
2106
+ r.admin ? (n(), g(da, {
2107
+ key: 0,
2108
+ admin: !0,
2109
+ locale: r.locale,
2110
+ onConfirmed: s
2111
+ }, null, 8, ["locale"])) : (n(), g(e(W), {
2112
+ key: 1,
2113
+ tone: "info"
2114
+ }, {
2115
+ default: t(() => [
2116
+ k(l(u.value === "needs-admin-approval" ? a.value.executorNeeds : a.value.executorBlocked), 1)
2117
+ ]),
2118
+ _: 1
2119
+ }))
2120
+ ]));
1869
2121
  }
1870
- }), Ql = /* @__PURE__ */ ue(Wt, [["__scopeId", "data-v-868f9f3a"]]), jt = {
2122
+ }), hn = /* @__PURE__ */ ue(_l, [["__scopeId", "data-v-49f9a67c"]]), wl = {
1871
2123
  key: 1,
1872
2124
  role: "status"
1873
- }, el = {
2125
+ }, xl = {
1874
2126
  key: 2,
1875
2127
  role: "status"
1876
- }, al = {
2128
+ }, Cl = {
1877
2129
  key: 0,
1878
2130
  role: "status",
1879
2131
  class: "destination"
1880
- }, tl = { key: 3 }, ll = {
2132
+ }, $l = { key: 3 }, Sl = {
1881
2133
  key: 4,
1882
2134
  class: "records"
1883
- }, sl = ["data-job-state"], nl = ["role"], il = { key: 5 }, ol = {
2135
+ }, zl = ["data-job-state"], Pl = ["role"], Vl = { key: 5 }, Al = {
1884
2136
  key: 6,
1885
2137
  class: "records"
1886
- }, ul = /* @__PURE__ */ oe({
2138
+ }, Il = /* @__PURE__ */ ie({
1887
2139
  __name: "DelegatePanel",
1888
2140
  props: {
1889
2141
  ctx: {}
1890
2142
  },
1891
- setup(y, { expose: q }) {
1892
- const f = y, a = L(() => Ke(f.ctx.locale)), o = L(() => He(f.ctx.locale)), m = Me(f.ctx), i = b(), n = b([]), u = b([]), r = b(!1), v = b(), k = b(""), D = b(!1), S = b(""), c = b(""), w = b("");
1893
- let z = !1, M, N;
1894
- Je([c, S, w], () => {
1895
- N = void 0;
2143
+ setup(r, { expose: x }) {
2144
+ const i = r, a = U(() => Te(i.ctx.locale)), u = U(() => la(i.ctx.locale)), v = ta(i.ctx), o = y(), s = y([]), d = y([]), c = y(!1), p = y(), h = y(""), A = y(!1), $ = y(""), _ = y(""), S = y("");
2145
+ let V = !1, E, z;
2146
+ Ne([_, $, S], () => {
2147
+ z = void 0;
1896
2148
  }, { flush: "sync" });
1897
- const K = (R) => ["queued", "running", "waiting_executor"].includes(R.state), O = L(() => u.value.some((R) => R.state === "waiting_executor")), Z = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], ae = L(() => O.value && Z.includes(v.value?.code ?? "")), W = L(() => i.value && i.value.state !== "ready" && !(O.value && i.value.state === "needs-admin-approval" && Z.includes(i.value.reason ?? "")));
1898
- async function H() {
1899
- if (z) return;
1900
- const [R, T, E] = await Promise.allSettled([f.ctx.call("delegate.status"), f.ctx.call("delegate.list"), f.ctx.call("delegate.jobs.list")]);
1901
- if (!z) {
1902
- R.status === "fulfilled" && (i.value = R.value), T.status === "fulfilled" && (n.value = (T.value.delegations ?? []).filter((J) => !J.revoked)), E.status === "fulfilled" && (u.value = E.value.jobs ?? []);
1903
- for (const J of [R, T, E]) if (J.status === "rejected") throw J.reason;
2149
+ const I = (N) => ["queued", "running", "waiting_executor"].includes(N.state), K = U(() => d.value.some((N) => N.state === "waiting_executor")), H = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], le = U(() => K.value && H.includes(p.value?.code ?? "")), X = U(() => o.value && o.value.state !== "ready" && !(K.value && o.value.state === "needs-admin-approval" && H.includes(o.value.reason ?? "")));
2150
+ async function Q() {
2151
+ if (V) return;
2152
+ const [N, D, O] = await Promise.allSettled([i.ctx.call("delegate.status"), i.ctx.call("delegate.list"), i.ctx.call("delegate.jobs.list")]);
2153
+ if (!V) {
2154
+ N.status === "fulfilled" && (o.value = N.value), D.status === "fulfilled" && (s.value = (D.value.delegations ?? []).filter((J) => !J.revoked)), O.status === "fulfilled" && (d.value = O.value.jobs ?? []);
2155
+ for (const J of [N, D, O]) if (J.status === "rejected") throw J.reason;
1904
2156
  }
1905
2157
  }
1906
- async function j(R) {
1907
- if (!(r.value || z)) {
1908
- r.value = !0, v.value = void 0;
2158
+ async function Y(N) {
2159
+ if (!(c.value || V)) {
2160
+ c.value = !0, p.value = void 0;
1909
2161
  try {
1910
- await R();
1911
- } catch (T) {
1912
- z || (v.value = T);
2162
+ await N();
2163
+ } catch (D) {
2164
+ V || (p.value = D);
1913
2165
  } finally {
1914
- z || (r.value = !1);
2166
+ V || (c.value = !1);
1915
2167
  }
1916
2168
  }
1917
2169
  }
1918
- const te = () => j(H), se = (R) => j(async () => {
1919
- await f.ctx.call("delegate.revoke", { delegation_id: R }), await H();
1920
- }), Q = (R) => j(async () => {
1921
- const T = await f.ctx.call("delegate.jobs.cancel", { id: R });
1922
- z || (k.value = T.revocation_pending ? a.value.pending : ""), await H();
1923
- }), Y = L(() => i.value?.state === "ready" && !!S.value && !!c.value && !!w.value), G = () => j(async () => {
1924
- Y.value && (await f.ctx.call("delegate.jobs.submit", { key: N ?? (N = crypto.randomUUID()), url: c.value, dest: S.value, name: w.value }), z || (c.value = "", w.value = "", S.value = ""), await H());
1925
- }), le = (R) => {
1926
- const T = new Date(R);
1927
- return Number.isNaN(T.getTime()) ? "—" : T.toLocaleString(f.ctx.locale);
2170
+ const ne = () => Y(Q), se = (N) => Y(async () => {
2171
+ await i.ctx.call("delegate.revoke", { delegation_id: N }), await Q();
2172
+ }), ee = (N) => Y(async () => {
2173
+ const D = await i.ctx.call("delegate.jobs.cancel", { id: N });
2174
+ V || (h.value = D.revocation_pending ? a.value.pending : ""), await Q();
2175
+ }), Z = U(() => o.value?.state === "ready" && !!$.value && !!_.value && !!S.value), G = () => Y(async () => {
2176
+ Z.value && (await i.ctx.call("delegate.jobs.submit", { key: z ?? (z = crypto.randomUUID()), url: _.value, dest: $.value, name: S.value }), V || (_.value = "", S.value = "", $.value = ""), await Q());
2177
+ }), j = (N) => {
2178
+ const D = new Date(N);
2179
+ return Number.isNaN(D.getTime()) ? "—" : D.toLocaleString(i.ctx.locale);
1928
2180
  };
1929
- return q({ refresh: te }), ge(() => {
1930
- te(), M = setInterval(() => {
1931
- u.value.some(K) && te();
2181
+ return x({ refresh: ne }), ve(() => {
2182
+ ne(), E = setInterval(() => {
2183
+ d.value.some(I) && ne();
1932
2184
  }, 3e3);
1933
- }), ye(() => {
1934
- z = !0, M && clearInterval(M), m.dispose();
1935
- }), (R, T) => (s(), x(e(he), {
2185
+ }), ce(() => {
2186
+ V = !0, E && clearInterval(E), v.dispose();
2187
+ }), (N, D) => (n(), g(e(ke), {
1936
2188
  title: a.value.title,
1937
2189
  description: a.value.help,
1938
- loading: !i.value && r.value,
2190
+ loading: !o.value && c.value,
1939
2191
  collapsible: !1,
1940
- "aria-busy": r.value,
2192
+ "aria-busy": c.value,
1941
2193
  class: "delegate-panel"
1942
2194
  }, {
1943
- default: l(() => [
1944
- v.value && !ae.value ? (s(), x(e(X), {
2195
+ default: t(() => [
2196
+ p.value && !le.value ? (n(), g(e(W), {
1945
2197
  key: 0,
1946
2198
  tone: "danger",
1947
2199
  role: "alert"
1948
2200
  }, {
1949
- default: l(() => [
1950
- g(t(e(oa)(v.value, a.value)), 1)
2201
+ default: t(() => [
2202
+ k(l(e(ha)(p.value, a.value)), 1)
1951
2203
  ]),
1952
2204
  _: 1
1953
- })) : h("", !0),
1954
- k.value ? (s(), V("p", jt, t(k.value), 1)) : h("", !0),
1955
- W.value ? (s(), V("p", el, t(i.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : h("", !0),
1956
- d(e(ze), {
2205
+ })) : b("", !0),
2206
+ h.value ? (n(), R("p", wl, l(h.value), 1)) : b("", !0),
2207
+ X.value ? (n(), R("p", xl, l(o.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : b("", !0),
2208
+ f(e(Pe), {
1957
2209
  direction: "vertical",
1958
- onSubmit: Se(G, ["prevent"])
2210
+ onSubmit: ze(G, ["prevent"])
1959
2211
  }, {
1960
- default: l(() => [
1961
- d(e(fe), {
2212
+ default: t(() => [
2213
+ f(e(he), {
1962
2214
  label: a.value.url,
1963
2215
  "label-for": "delegate-url"
1964
2216
  }, {
1965
- default: l(() => [
1966
- d(e(_e), {
2217
+ default: t(() => [
2218
+ f(e(we), {
1967
2219
  id: "delegate-url",
1968
- modelValue: c.value,
1969
- "onUpdate:modelValue": T[0] || (T[0] = (E) => c.value = E),
2220
+ modelValue: _.value,
2221
+ "onUpdate:modelValue": D[0] || (D[0] = (O) => _.value = O),
1970
2222
  type: "url",
1971
- disabled: r.value || i.value?.state !== "ready"
2223
+ disabled: c.value || o.value?.state !== "ready"
1972
2224
  }, null, 8, ["modelValue", "disabled"])
1973
2225
  ]),
1974
2226
  _: 1
1975
2227
  }, 8, ["label"]),
1976
- d(e(fe), {
2228
+ f(e(he), {
1977
2229
  label: a.value.name,
1978
2230
  "label-for": "delegate-name"
1979
2231
  }, {
1980
- default: l(() => [
1981
- d(e(_e), {
2232
+ default: t(() => [
2233
+ f(e(we), {
1982
2234
  id: "delegate-name",
1983
- modelValue: w.value,
1984
- "onUpdate:modelValue": T[1] || (T[1] = (E) => w.value = E),
2235
+ modelValue: S.value,
2236
+ "onUpdate:modelValue": D[1] || (D[1] = (O) => S.value = O),
1985
2237
  "data-file-name": "",
1986
- disabled: r.value || i.value?.state !== "ready"
2238
+ disabled: c.value || o.value?.state !== "ready"
1987
2239
  }, null, 8, ["modelValue", "disabled"])
1988
2240
  ]),
1989
2241
  _: 1
1990
2242
  }, 8, ["label"]),
1991
- $("p", null, t(a.value.size), 1),
1992
- S.value ? (s(), V("p", al, [
1993
- g(t(a.value.destination) + t(o.value), 1),
1994
- d(e(pe), { path: S.value }, null, 8, ["path"])
1995
- ])) : h("", !0),
1996
- d(e(Pe), null, {
1997
- default: l(() => [
1998
- d(e(U), {
2243
+ P("p", null, l(a.value.size), 1),
2244
+ $.value ? (n(), R("p", Cl, [
2245
+ k(l(a.value.destination) + l(u.value), 1),
2246
+ f(e(ye), { path: $.value }, null, 8, ["path"])
2247
+ ])) : b("", !0),
2248
+ f(e(Ve), null, {
2249
+ default: t(() => [
2250
+ f(e(F), {
1999
2251
  type: "button",
2000
2252
  variant: "secondary",
2001
- disabled: r.value || i.value?.state !== "ready",
2002
- onClick: T[2] || (T[2] = (E) => D.value = !0)
2253
+ disabled: c.value || o.value?.state !== "ready",
2254
+ onClick: D[2] || (D[2] = (O) => A.value = !0)
2003
2255
  }, {
2004
- default: l(() => [
2005
- g(t(a.value.choose), 1)
2256
+ default: t(() => [
2257
+ k(l(a.value.choose), 1)
2006
2258
  ]),
2007
2259
  _: 1
2008
2260
  }, 8, ["disabled"]),
2009
- d(e(U), {
2261
+ f(e(F), {
2010
2262
  type: "submit",
2011
2263
  variant: "primary",
2012
- disabled: r.value || !Y.value
2264
+ disabled: c.value || !Z.value
2013
2265
  }, {
2014
- default: l(() => [
2015
- g(t(a.value.submit), 1)
2266
+ default: t(() => [
2267
+ k(l(a.value.submit), 1)
2016
2268
  ]),
2017
2269
  _: 1
2018
2270
  }, 8, ["disabled"])
@@ -2022,54 +2274,54 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2022
2274
  ]),
2023
2275
  _: 1
2024
2276
  }),
2025
- d(Te, {
2026
- open: D.value,
2027
- "onUpdate:open": T[3] || (T[3] = (E) => D.value = E),
2028
- locale: y.ctx.locale,
2029
- provider: e(m),
2277
+ f(Re, {
2278
+ open: A.value,
2279
+ "onUpdate:open": D[3] || (D[3] = (O) => A.value = O),
2280
+ locale: r.ctx.locale,
2281
+ provider: e(v),
2030
2282
  mode: "folder",
2031
- onSelected: T[4] || (T[4] = (E) => S.value = E)
2283
+ onSelected: D[4] || (D[4] = (O) => $.value = O)
2032
2284
  }, null, 8, ["open", "locale", "provider"]),
2033
- $("h3", null, t(a.value.downloads), 1),
2034
- !u.value.length && !v.value ? (s(), V("p", tl, t(a.value.noJobs), 1)) : (s(), V("ul", ll, [
2035
- (s(!0), V(ne, null, ke(u.value, (E) => (s(), V("li", {
2036
- key: E.id,
2037
- "data-job-state": E.state
2285
+ P("h3", null, l(a.value.downloads), 1),
2286
+ !d.value.length && !p.value ? (n(), R("p", $l, l(a.value.noJobs), 1)) : (n(), R("ul", Sl, [
2287
+ (n(!0), R(oe, null, _e(d.value, (O) => (n(), R("li", {
2288
+ key: O.id,
2289
+ "data-job-state": O.state
2038
2290
  }, [
2039
- $("span", {
2040
- role: E.state === "waiting_executor" ? "status" : void 0
2041
- }, t(E.name) + " · " + t(a.value[E.state]), 9, nl),
2042
- K(E) ? (s(), x(e(U), {
2291
+ P("span", {
2292
+ role: O.state === "waiting_executor" ? "status" : void 0
2293
+ }, l(O.name) + " · " + l(a.value[O.state]), 9, Pl),
2294
+ I(O) ? (n(), g(e(F), {
2043
2295
  key: 0,
2044
2296
  variant: "secondary",
2045
- disabled: r.value,
2046
- onClick: (J) => Q(E.id)
2297
+ disabled: c.value,
2298
+ onClick: (J) => ee(O.id)
2047
2299
  }, {
2048
- default: l(() => [
2049
- g(t(a.value.cancel), 1)
2300
+ default: t(() => [
2301
+ k(l(a.value.cancel), 1)
2050
2302
  ]),
2051
2303
  _: 1
2052
- }, 8, ["disabled", "onClick"])) : h("", !0)
2053
- ], 8, sl))), 128))
2304
+ }, 8, ["disabled", "onClick"])) : b("", !0)
2305
+ ], 8, zl))), 128))
2054
2306
  ])),
2055
- $("h3", null, t(a.value.delegations), 1),
2056
- !n.value.length && !v.value ? (s(), V("p", il, t(a.value.noDelegations), 1)) : (s(), V("ul", ol, [
2057
- (s(!0), V(ne, null, ke(n.value, (E) => (s(), V("li", {
2058
- key: E.delegation_id
2307
+ P("h3", null, l(a.value.delegations), 1),
2308
+ !s.value.length && !p.value ? (n(), R("p", Vl, l(a.value.noDelegations), 1)) : (n(), R("ul", Al, [
2309
+ (n(!0), R(oe, null, _e(s.value, (O) => (n(), R("li", {
2310
+ key: O.delegation_id
2059
2311
  }, [
2060
- $("div", null, [
2061
- d(e(pe), {
2062
- path: E.path
2312
+ P("div", null, [
2313
+ f(e(ye), {
2314
+ path: O.path
2063
2315
  }, null, 8, ["path"]),
2064
- $("p", null, t(a.value.expires) + t(o.value) + t(le(E.expires_at)), 1)
2316
+ P("p", null, l(a.value.expires) + l(u.value) + l(j(O.expires_at)), 1)
2065
2317
  ]),
2066
- d(e(U), {
2318
+ f(e(F), {
2067
2319
  variant: "secondary",
2068
- disabled: r.value,
2069
- onClick: (J) => se(E.delegation_id)
2320
+ disabled: c.value,
2321
+ onClick: (J) => se(O.delegation_id)
2070
2322
  }, {
2071
- default: l(() => [
2072
- g(t(a.value.revoke), 1)
2323
+ default: t(() => [
2324
+ k(l(a.value.revoke), 1)
2073
2325
  ]),
2074
2326
  _: 1
2075
2327
  }, 8, ["disabled", "onClick"])
@@ -2079,37 +2331,37 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2079
2331
  _: 1
2080
2332
  }, 8, ["title", "description", "loading", "aria-busy"]));
2081
2333
  }
2082
- }), Yl = /* @__PURE__ */ ue(ul, [["__scopeId", "data-v-c590f505"]]), rl = { class: "save-alert" }, dl = { "data-save-error": "" }, vl = {
2334
+ }), kn = /* @__PURE__ */ ue(Il, [["__scopeId", "data-v-c590f505"]]), El = { class: "save-alert" }, Tl = { "data-save-error": "" }, Ul = {
2083
2335
  key: 2,
2084
2336
  class: "save-summary"
2085
- }, cl = ["data-save-status"], pl = {
2337
+ }, Rl = ["data-save-status"], Dl = {
2086
2338
  key: 7,
2087
2339
  class: "save-help"
2088
- }, fl = {
2340
+ }, Bl = {
2089
2341
  key: 8,
2090
2342
  class: "save-records"
2091
- }, yl = { class: "save-record" }, ml = { class: "save-note" }, bl = {
2343
+ }, Fl = { class: "save-record" }, ql = { class: "save-note" }, Ol = {
2092
2344
  key: 9,
2093
2345
  class: "save-actions"
2094
- }, gl = {
2346
+ }, Ll = {
2095
2347
  key: 11,
2096
2348
  class: "save-example"
2097
- }, hl = { class: "save-help" }, kl = { class: "save-actions" }, _l = {
2349
+ }, Nl = { class: "save-help" }, Ml = { class: "save-actions" }, Kl = {
2098
2350
  key: 12,
2099
2351
  class: "save-help"
2100
- }, wl = {
2352
+ }, Hl = {
2101
2353
  key: 13,
2102
2354
  "data-save-operations": ""
2103
- }, xl = ["data-save-job", "title"], Cl = {
2355
+ }, Gl = ["data-save-job", "title"], Jl = {
2104
2356
  key: 0,
2105
2357
  class: "save-note"
2106
- }, $l = {
2358
+ }, Wl = {
2107
2359
  key: 1,
2108
2360
  class: "save-note"
2109
- }, Sl = ["data-save-state"], zl = { key: 1 }, Pl = {
2361
+ }, Xl = ["data-save-state"], Ql = { key: 1 }, Yl = {
2110
2362
  class: "save-danger",
2111
2363
  "data-save-danger": ""
2112
- }, Ve = 10, Vl = /* @__PURE__ */ oe({
2364
+ }, Ae = 10, Zl = /* @__PURE__ */ ie({
2113
2365
  __name: "BackgroundSavePanel",
2114
2366
  props: {
2115
2367
  sdk: {},
@@ -2120,337 +2372,337 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2120
2372
  sampleSave: { type: Boolean }
2121
2373
  },
2122
2374
  emits: ["authorized"],
2123
- setup(y, { expose: q, emit: f }) {
2124
- const a = y, o = f, m = b(!1), i = b(""), n = L(() => Ne(a.locale)), u = b(), r = b([]), v = b([]), k = b(!1), D = b(), S = b(""), c = b(!1), w = b([]), z = L(() => a.picker && (u.value?.selection ? ua(a.picker.provider, u.value.selection.root) : u.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
2125
- let M = !1, N;
2126
- const K = (F) => F.state === "copying" && F.code === "CANCEL_REQUESTED", O = (F) => K(F) ? "canceling" : F.state === "committed" && !F.receipt?.path ? "uncertain" : F.state, Z = (F) => ["queued", "copying"].includes(F.state) && !K(F);
2127
- function ae() {
2128
- u.value = void 0, r.value = [], v.value = [], w.value = [], m.value = !1;
2375
+ setup(r, { expose: x, emit: i }) {
2376
+ const a = r, u = i, v = y(!1), o = y(""), s = U(() => aa(a.locale)), d = y(), c = y([]), p = y([]), h = y(!1), A = y(), $ = y(""), _ = y(!1), S = y([]), V = U(() => a.picker && (d.value?.selection ? ka(a.picker.provider, d.value.selection.root) : d.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
2377
+ let E = !1, z;
2378
+ const I = (M) => M.state === "copying" && M.code === "CANCEL_REQUESTED", K = (M) => I(M) ? "canceling" : M.state === "committed" && !M.receipt?.path ? "uncertain" : M.state, H = (M) => ["queued", "copying"].includes(M.state) && !I(M);
2379
+ function le() {
2380
+ d.value = void 0, c.value = [], p.value = [], S.value = [], v.value = !1;
2129
2381
  }
2130
- async function W() {
2131
- const [F, ee, A, C] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((P) => a.sdk.destination(P)))]);
2132
- if (!M) {
2133
- if (!F || typeof F.disabled != "boolean" || !Array.isArray(ee) || !Array.isArray(A)) throw { code: "unavailable" };
2134
- (u.value?.selection?.generation !== F.selection?.generation || u.value?.selection?.scope !== F.selection?.scope) && (m.value = !1), u.value = F, r.value = C.length ? ee.filter((P) => C.some((I) => I.status === "active" && I.destination?.id === P.id)) : ee, v.value = A, w.value = C;
2382
+ async function X() {
2383
+ const [M, te, q, C] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((T) => a.sdk.destination(T)))]);
2384
+ if (!E) {
2385
+ if (!M || typeof M.disabled != "boolean" || !Array.isArray(te) || !Array.isArray(q)) throw { code: "unavailable" };
2386
+ (d.value?.selection?.generation !== M.selection?.generation || d.value?.selection?.scope !== M.selection?.scope) && (v.value = !1), d.value = M, c.value = C.length ? te.filter((T) => C.some((B) => B.status === "active" && B.destination?.id === T.id)) : te, p.value = q, S.value = C;
2135
2387
  }
2136
2388
  }
2137
- async function H(F) {
2138
- if (!(M || k.value)) {
2139
- k.value = !0, D.value = void 0, S.value = "", c.value = !1;
2389
+ async function Q(M) {
2390
+ if (!(E || h.value)) {
2391
+ h.value = !0, A.value = void 0, $.value = "", _.value = !1;
2140
2392
  try {
2141
- await F();
2142
- } catch (ee) {
2143
- M || (ae(), D.value = ee);
2393
+ await M();
2394
+ } catch (te) {
2395
+ E || (le(), A.value = te);
2144
2396
  } finally {
2145
- M || (k.value = !1);
2397
+ E || (h.value = !1);
2146
2398
  }
2147
2399
  }
2148
2400
  }
2149
- const j = () => H(W);
2150
- function te(F) {
2151
- o("authorized", F), j();
2401
+ const Y = () => Q(X);
2402
+ function ne(M) {
2403
+ u("authorized", M), Y();
2152
2404
  }
2153
- function se(F) {
2154
- M || (S.value = "", D.value = F, c.value = !0);
2405
+ function se(M) {
2406
+ E || ($.value = "", A.value = M, _.value = !0);
2155
2407
  }
2156
- const Q = L(() => c.value ? a.pickerErrorText?.(D.value) ?? Ie(D.value, n.value, "select") : Ie(D.value, n.value)), Y = (F) => H(async () => {
2157
- if ((await a.sdk.revoke({ delegation_id: F }))?.revoked !== !0) throw { code: "commit-uncertain" };
2158
- await W(), M || (S.value = n.value.revoked);
2159
- }), G = (F) => H(async () => {
2160
- await a.sdk.cancel({ delegation_id: F.delegation_id, job_id: F.job_id }), await W();
2161
- }), le = () => H(async () => {
2162
- if (!a.admin || !u.value) return;
2163
- const F = u.value.disabled;
2164
- if ((F ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !F) throw { code: "commit-uncertain" };
2165
- await W();
2166
- }), R = (F) => H(async () => {
2167
- const ee = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (A) => A.toString(16).padStart(2, "0")).join("");
2168
- await a.sdk.exportExample({ key: F, job_id: ee }), await W();
2169
- }), T = b(1), E = L(() => v.value.slice((T.value - 1) * Ve, T.value * Ve)), J = L(() => [{ key: "name", label: n.value.file }, { key: "state", label: n.value.status, width: "6.5rem" }, { key: "size", label: n.value.size, width: "6rem", align: "right" }, { key: "location", label: n.value.location, width: "30%" }, { key: "actions", label: "", width: "7.5rem" }]), re = (F) => ({ committed: "success", canceled: "neutral", canceling: "neutral", interrupted: "danger", uncertain: "warning" })[O(F)] ?? "info", we = (F) => F.slice(0, F.lastIndexOf("/")) || "/", xe = L(() => u.value?.scopeMode === "install-selected" && !u.value.selection), ve = L(() => u.value ? u.value.disabled ? "disabled" : xe.value ? "needs-scope" : "enabled" : void 0), ce = (F) => a.picker?.labels?.[F] ? `${n.value.choose}${me.value}${a.picker.labels[F]}` : n.value.choose, de = (F) => a.picker?.labels?.[F] ? `${n.value.example}${me.value}${a.picker.labels[F]}` : n.value.example, me = L(() => He(a.locale));
2170
- return q({ refresh: j }), ge(() => {
2171
- j(), N = setInterval(() => {
2172
- v.value.some(Z) && j();
2408
+ const ee = U(() => _.value ? a.pickerErrorText?.(A.value) ?? Ie(A.value, s.value, "select") : Ie(A.value, s.value)), Z = (M) => Q(async () => {
2409
+ if ((await a.sdk.revoke({ delegation_id: M }))?.revoked !== !0) throw { code: "commit-uncertain" };
2410
+ await X(), E || ($.value = s.value.revoked);
2411
+ }), G = (M) => Q(async () => {
2412
+ await a.sdk.cancel({ delegation_id: M.delegation_id, job_id: M.job_id }), await X();
2413
+ }), j = () => Q(async () => {
2414
+ if (!a.admin || !d.value) return;
2415
+ const M = d.value.disabled;
2416
+ if ((M ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !M) throw { code: "commit-uncertain" };
2417
+ await X();
2418
+ }), N = (M) => Q(async () => {
2419
+ const te = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (q) => q.toString(16).padStart(2, "0")).join("");
2420
+ await a.sdk.exportExample({ key: M, job_id: te }), await X();
2421
+ }), D = y(1), O = U(() => p.value.slice((D.value - 1) * Ae, D.value * Ae)), J = U(() => [{ key: "name", label: s.value.file }, { key: "state", label: s.value.status, width: "6.5rem" }, { key: "size", label: s.value.size, width: "6rem", align: "right" }, { key: "location", label: s.value.location, width: "30%" }, { key: "actions", label: "", width: "7.5rem" }]), ae = (M) => ({ committed: "success", canceled: "neutral", canceling: "neutral", interrupted: "danger", uncertain: "warning" })[K(M)] ?? "info", xe = (M) => M.slice(0, M.lastIndexOf("/")) || "/", Ce = U(() => d.value?.scopeMode === "install-selected" && !d.value.selection), pe = U(() => d.value ? d.value.disabled ? "disabled" : Ce.value ? "needs-scope" : "enabled" : void 0), fe = (M) => a.picker?.labels?.[M] ? `${s.value.choose}${me.value}${a.picker.labels[M]}` : s.value.choose, de = (M) => a.picker?.labels?.[M] ? `${s.value.example}${me.value}${a.picker.labels[M]}` : s.value.example, me = U(() => la(a.locale));
2422
+ return x({ refresh: Y }), ve(() => {
2423
+ Y(), z = setInterval(() => {
2424
+ p.value.some(H) && Y();
2173
2425
  }, 3e3);
2174
- }), ye(() => {
2175
- M = !0, N && clearInterval(N);
2176
- }), (F, ee) => (s(), x(e(he), {
2177
- title: n.value.title,
2178
- description: n.value.help,
2179
- loading: k.value && !u.value && !D.value,
2426
+ }), ce(() => {
2427
+ E = !0, z && clearInterval(z);
2428
+ }), (M, te) => (n(), g(e(ke), {
2429
+ title: s.value.title,
2430
+ description: s.value.help,
2431
+ loading: h.value && !d.value && !A.value,
2180
2432
  collapsible: !1,
2181
- "aria-busy": k.value,
2433
+ "aria-busy": h.value,
2182
2434
  class: "background-save-panel"
2183
- }, Xe({
2184
- default: l(() => [
2185
- D.value ? (s(), x(e(X), {
2435
+ }, Me({
2436
+ default: t(() => [
2437
+ A.value ? (n(), g(e(W), {
2186
2438
  key: 0,
2187
2439
  tone: "danger",
2188
2440
  role: "alert",
2189
2441
  class: "save-message"
2190
2442
  }, {
2191
- default: l(() => [
2192
- $("span", rl, [
2193
- $("span", dl, t(Q.value), 1),
2194
- d(e(U), {
2443
+ default: t(() => [
2444
+ P("span", El, [
2445
+ P("span", Tl, l(ee.value), 1),
2446
+ f(e(F), {
2195
2447
  variant: "secondary",
2196
2448
  size: "sm",
2197
- disabled: k.value,
2198
- onClick: j
2449
+ disabled: h.value,
2450
+ onClick: Y
2199
2451
  }, {
2200
- default: l(() => [
2201
- g(t(n.value.retry), 1)
2452
+ default: t(() => [
2453
+ k(l(s.value.retry), 1)
2202
2454
  ]),
2203
2455
  _: 1
2204
2456
  }, 8, ["disabled"])
2205
2457
  ])
2206
2458
  ]),
2207
2459
  _: 1
2208
- })) : h("", !0),
2209
- S.value ? (s(), x(e(X), {
2460
+ })) : b("", !0),
2461
+ $.value ? (n(), g(e(W), {
2210
2462
  key: 1,
2211
2463
  tone: "success",
2212
2464
  role: "status"
2213
2465
  }, {
2214
- default: l(() => [
2215
- g(t(S.value), 1)
2466
+ default: t(() => [
2467
+ k(l($.value), 1)
2216
2468
  ]),
2217
2469
  _: 1
2218
- })) : h("", !0),
2219
- u.value ? (s(), V("div", vl, [
2220
- d(e(Ce), {
2221
- label: n.value.status,
2470
+ })) : b("", !0),
2471
+ d.value ? (n(), R("div", Ul, [
2472
+ f(e($e), {
2473
+ label: s.value.status,
2222
2474
  "label-width": "10rem"
2223
2475
  }, {
2224
- default: l(() => [
2225
- $("span", {
2476
+ default: t(() => [
2477
+ P("span", {
2226
2478
  role: "status",
2227
- "data-save-status": ve.value
2479
+ "data-save-status": pe.value
2228
2480
  }, [
2229
- d(e($e), {
2230
- tone: ve.value === "enabled" ? "success" : ve.value === "disabled" ? "neutral" : "warning"
2481
+ f(e(Se), {
2482
+ tone: pe.value === "enabled" ? "success" : pe.value === "disabled" ? "neutral" : "warning"
2231
2483
  }, {
2232
- default: l(() => [
2233
- g(t(ve.value === "enabled" ? n.value.statusEnabled : ve.value === "disabled" ? n.value.statusDisabled : n.value.statusNeedsScope), 1)
2484
+ default: t(() => [
2485
+ k(l(pe.value === "enabled" ? s.value.statusEnabled : pe.value === "disabled" ? s.value.statusDisabled : s.value.statusNeedsScope), 1)
2234
2486
  ]),
2235
2487
  _: 1
2236
2488
  }, 8, ["tone"])
2237
- ], 8, cl)
2489
+ ], 8, Rl)
2238
2490
  ]),
2239
2491
  _: 1
2240
2492
  }, 8, ["label"]),
2241
- u.value.selection ? (s(), x(e(Ce), {
2493
+ d.value.selection ? (n(), g(e($e), {
2242
2494
  key: 0,
2243
- label: n.value.scope,
2495
+ label: s.value.scope,
2244
2496
  "label-width": "10rem",
2245
2497
  "data-save-scope": ""
2246
2498
  }, {
2247
- default: l(() => [
2248
- d(e(pe), {
2249
- path: u.value.selection.root
2499
+ default: t(() => [
2500
+ f(e(ye), {
2501
+ path: d.value.selection.root
2250
2502
  }, null, 8, ["path"])
2251
2503
  ]),
2252
2504
  _: 1
2253
- }, 8, ["label"])) : h("", !0)
2254
- ])) : h("", !0),
2255
- u.value?.mismatch ? (s(), x(e(X), {
2505
+ }, 8, ["label"])) : b("", !0)
2506
+ ])) : b("", !0),
2507
+ d.value?.mismatch ? (n(), g(e(W), {
2256
2508
  key: 3,
2257
2509
  tone: "warning"
2258
2510
  }, {
2259
- default: l(() => [
2260
- g(t(n.value.scopeMismatch) + " " + t(u.value.preselection) + " → " + t(u.value.selection?.root), 1)
2511
+ default: t(() => [
2512
+ k(l(s.value.scopeMismatch) + " " + l(d.value.preselection) + " → " + l(d.value.selection?.root), 1)
2261
2513
  ]),
2262
2514
  _: 1
2263
- })) : h("", !0),
2264
- xe.value ? (s(), x(e(X), {
2515
+ })) : b("", !0),
2516
+ Ce.value ? (n(), g(e(W), {
2265
2517
  key: 4,
2266
2518
  tone: "warning"
2267
2519
  }, {
2268
- default: l(() => [
2269
- g(t(n.value.scopeNeeds), 1)
2520
+ default: t(() => [
2521
+ k(l(s.value.scopeNeeds), 1)
2270
2522
  ]),
2271
2523
  _: 1
2272
- })) : h("", !0),
2273
- u.value?.disabled ? (s(), x(e(X), {
2524
+ })) : b("", !0),
2525
+ d.value?.disabled ? (n(), g(e(W), {
2274
2526
  key: 5,
2275
2527
  tone: "warning",
2276
2528
  class: "save-message"
2277
2529
  }, {
2278
- default: l(() => [
2279
- g(t(n.value.disabled), 1)
2530
+ default: t(() => [
2531
+ k(l(s.value.disabled), 1)
2280
2532
  ]),
2281
2533
  _: 1
2282
- })) : h("", !0),
2283
- $("h3", null, t(n.value.delegations), 1),
2284
- w.value.some((A) => A.status === "reselection-required") ? (s(), x(e(X), {
2534
+ })) : b("", !0),
2535
+ P("h3", null, l(s.value.delegations), 1),
2536
+ S.value.some((q) => q.status === "reselection-required") ? (n(), g(e(W), {
2285
2537
  key: 6,
2286
2538
  tone: "warning"
2287
2539
  }, {
2288
- default: l(() => [
2289
- g(t(n.value.reselect), 1)
2540
+ default: t(() => [
2541
+ k(l(s.value.reselect), 1)
2290
2542
  ]),
2291
2543
  _: 1
2292
- })) : h("", !0),
2293
- u.value && !r.value.length ? (s(), V("p", pl, t(n.value.empty), 1)) : h("", !0),
2294
- r.value.length ? (s(), V("ul", fl, [
2295
- (s(!0), V(ne, null, ke(r.value, (A) => (s(), V("li", {
2296
- key: A.id
2544
+ })) : b("", !0),
2545
+ d.value && !c.value.length ? (n(), R("p", Dl, l(s.value.empty), 1)) : b("", !0),
2546
+ c.value.length ? (n(), R("ul", Bl, [
2547
+ (n(!0), R(oe, null, _e(c.value, (q) => (n(), R("li", {
2548
+ key: q.id
2297
2549
  }, [
2298
- $("div", yl, [
2299
- d(e(pe), {
2300
- path: A.path
2550
+ P("div", Fl, [
2551
+ f(e(ye), {
2552
+ path: q.path
2301
2553
  }, null, 8, ["path"]),
2302
- $("span", ml, t(n.value.untilRevoked), 1)
2554
+ P("span", ql, l(s.value.untilRevoked), 1)
2303
2555
  ]),
2304
- d(e(U), {
2556
+ f(e(F), {
2305
2557
  variant: "secondary",
2306
- disabled: k.value,
2307
- onClick: (C) => Y(A.id)
2558
+ disabled: h.value,
2559
+ onClick: (C) => Z(q.id)
2308
2560
  }, {
2309
- default: l(() => [
2310
- g(t(n.value.revoke), 1)
2561
+ default: t(() => [
2562
+ k(l(s.value.revoke), 1)
2311
2563
  ]),
2312
2564
  _: 1
2313
2565
  }, 8, ["disabled", "onClick"])
2314
2566
  ]))), 128))
2315
- ])) : h("", !0),
2316
- y.picker ? (s(), V("div", bl, [
2317
- (s(!0), V(ne, null, ke(y.picker.keys, (A) => (s(), x(e(U), {
2318
- key: A,
2567
+ ])) : b("", !0),
2568
+ r.picker ? (n(), R("div", Ol, [
2569
+ (n(!0), R(oe, null, _e(r.picker.keys, (q) => (n(), g(e(F), {
2570
+ key: q,
2319
2571
  variant: "secondary",
2320
- disabled: k.value || !u.value || u.value.disabled || !z.value,
2572
+ disabled: h.value || !d.value || d.value.disabled || !V.value,
2321
2573
  onClick: (C) => {
2322
- i.value = A, m.value = !0;
2574
+ o.value = q, v.value = !0;
2323
2575
  }
2324
2576
  }, {
2325
- default: l(() => [
2326
- g(t(ce(A)), 1)
2577
+ default: t(() => [
2578
+ k(l(fe(q)), 1)
2327
2579
  ]),
2328
2580
  _: 2
2329
2581
  }, 1032, ["disabled", "onClick"]))), 128))
2330
- ])) : h("", !0),
2331
- z.value ? (s(), x(Te, {
2332
- key: u.value?.selection?.scope,
2333
- open: m.value,
2334
- "onUpdate:open": ee[0] || (ee[0] = (A) => m.value = A),
2335
- provider: z.value,
2336
- locale: y.locale,
2582
+ ])) : b("", !0),
2583
+ V.value ? (n(), g(Re, {
2584
+ key: d.value?.selection?.scope,
2585
+ open: v.value,
2586
+ "onUpdate:open": te[0] || (te[0] = (q) => v.value = q),
2587
+ provider: V.value,
2588
+ locale: r.locale,
2337
2589
  mode: "folder",
2338
- destination: { key: i.value, selectDestination: y.sdk.selectDestination },
2339
- onAuthorized: te,
2590
+ destination: { key: o.value, selectDestination: r.sdk.selectDestination },
2591
+ onAuthorized: ne,
2340
2592
  onRefused: se,
2341
- "error-text": y.pickerErrorText
2342
- }, null, 8, ["open", "provider", "locale", "destination", "error-text"])) : h("", !0),
2343
- y.sampleSave && w.value.some((A) => A.status === "active") ? (s(), V("div", gl, [
2344
- $("p", hl, t(n.value.exampleHelp), 1),
2345
- $("div", kl, [
2346
- (s(!0), V(ne, null, ke(w.value.filter((A) => A.status === "active"), (A) => (s(), x(e(U), {
2347
- key: A.key,
2593
+ "error-text": r.pickerErrorText
2594
+ }, null, 8, ["open", "provider", "locale", "destination", "error-text"])) : b("", !0),
2595
+ r.sampleSave && S.value.some((q) => q.status === "active") ? (n(), R("div", Ll, [
2596
+ P("p", Nl, l(s.value.exampleHelp), 1),
2597
+ P("div", Ml, [
2598
+ (n(!0), R(oe, null, _e(S.value.filter((q) => q.status === "active"), (q) => (n(), g(e(F), {
2599
+ key: q.key,
2348
2600
  variant: "secondary",
2349
- disabled: k.value || u.value?.disabled,
2350
- onClick: (C) => R(A.key)
2601
+ disabled: h.value || d.value?.disabled,
2602
+ onClick: (C) => N(q.key)
2351
2603
  }, {
2352
- default: l(() => [
2353
- g(t(de(A.key)), 1)
2604
+ default: t(() => [
2605
+ k(l(de(q.key)), 1)
2354
2606
  ]),
2355
2607
  _: 2
2356
2608
  }, 1032, ["disabled", "onClick"]))), 128))
2357
2609
  ])
2358
- ])) : h("", !0),
2359
- $("h3", null, t(n.value.operations), 1),
2360
- u.value && !v.value.length ? (s(), V("p", _l, t(n.value.noOperations), 1)) : h("", !0),
2361
- v.value.length ? (s(), V("div", wl, [
2362
- d(e(Ca), {
2610
+ ])) : b("", !0),
2611
+ P("h3", null, l(s.value.operations), 1),
2612
+ d.value && !p.value.length ? (n(), R("p", Kl, l(s.value.noOperations), 1)) : b("", !0),
2613
+ p.value.length ? (n(), R("div", Hl, [
2614
+ f(e(Ma), {
2363
2615
  columns: J.value,
2364
- rows: E.value,
2616
+ rows: O.value,
2365
2617
  "row-key": "job_id"
2366
2618
  }, {
2367
- "cell-name": l(({ row: A }) => [
2368
- $("span", {
2619
+ "cell-name": t(({ row: q }) => [
2620
+ P("span", {
2369
2621
  class: "save-name",
2370
- "data-save-job": A.job_id,
2371
- title: A.name
2372
- }, t(A.name), 9, xl),
2373
- O(A) === "uncertain" ? (s(), V("p", Cl, t(n.value.uncertainHelp), 1)) : O(A) === "interrupted" ? (s(), V("p", $l, t(A.code ? e(Ie)({ code: A.code }, n.value) : n.value.interruptedHelp), 1)) : h("", !0)
2622
+ "data-save-job": q.job_id,
2623
+ title: q.name
2624
+ }, l(q.name), 9, Gl),
2625
+ K(q) === "uncertain" ? (n(), R("p", Jl, l(s.value.uncertainHelp), 1)) : K(q) === "interrupted" ? (n(), R("p", Wl, l(q.code ? e(Ie)({ code: q.code }, s.value) : s.value.interruptedHelp), 1)) : b("", !0)
2374
2626
  ]),
2375
- "cell-state": l(({ row: A }) => [
2376
- $("span", {
2377
- "data-save-state": O(A)
2627
+ "cell-state": t(({ row: q }) => [
2628
+ P("span", {
2629
+ "data-save-state": K(q)
2378
2630
  }, [
2379
- d(e($e), {
2380
- tone: re(A)
2631
+ f(e(Se), {
2632
+ tone: ae(q)
2381
2633
  }, {
2382
- default: l(() => [
2383
- g(t(n.value[O(A)]), 1)
2634
+ default: t(() => [
2635
+ k(l(s.value[K(q)]), 1)
2384
2636
  ]),
2385
2637
  _: 2
2386
2638
  }, 1032, ["tone"])
2387
- ], 8, Sl)
2639
+ ], 8, Xl)
2388
2640
  ]),
2389
- "cell-size": l(({ row: A }) => [
2390
- g(t(A.receipt?.size !== void 0 ? e($a)(A.receipt.size) : "—"), 1)
2641
+ "cell-size": t(({ row: q }) => [
2642
+ k(l(q.receipt?.size !== void 0 ? e(Ka)(q.receipt.size) : "—"), 1)
2391
2643
  ]),
2392
- "cell-location": l(({ row: A }) => [
2393
- O(A) === "committed" ? (s(), x(e(pe), {
2644
+ "cell-location": t(({ row: q }) => [
2645
+ K(q) === "committed" ? (n(), g(e(ye), {
2394
2646
  key: 0,
2395
- path: A.receipt.path
2396
- }, null, 8, ["path"])) : (s(), V("span", zl, "—"))
2647
+ path: q.receipt.path
2648
+ }, null, 8, ["path"])) : (n(), R("span", Ql, "—"))
2397
2649
  ]),
2398
- "cell-actions": l(({ row: A }) => [
2399
- O(A) === "committed" ? (s(), x(e(U), {
2650
+ "cell-actions": t(({ row: q }) => [
2651
+ K(q) === "committed" ? (n(), g(e(F), {
2400
2652
  key: 0,
2401
2653
  variant: "ghost",
2402
2654
  size: "sm",
2403
- "aria-label": n.value.openFolder,
2404
- title: n.value.openFolder,
2405
- onClick: (C) => e(ra)(we(A.receipt.path))
2655
+ "aria-label": s.value.openFolder,
2656
+ title: s.value.openFolder,
2657
+ onClick: (C) => e(_a)(xe(q.receipt.path))
2406
2658
  }, {
2407
- default: l(() => [
2408
- d(e(Ua), {
2659
+ default: t(() => [
2660
+ f(e(Ya), {
2409
2661
  class: "save-icon",
2410
2662
  "aria-hidden": "true"
2411
2663
  })
2412
2664
  ]),
2413
2665
  _: 1
2414
- }, 8, ["aria-label", "title", "onClick"])) : h("", !0),
2415
- Z(A) ? (s(), x(e(U), {
2666
+ }, 8, ["aria-label", "title", "onClick"])) : b("", !0),
2667
+ H(q) ? (n(), g(e(F), {
2416
2668
  key: 1,
2417
2669
  variant: "secondary",
2418
2670
  size: "sm",
2419
- disabled: k.value,
2420
- onClick: (C) => G(A)
2671
+ disabled: h.value,
2672
+ onClick: (C) => G(q)
2421
2673
  }, {
2422
- default: l(() => [
2423
- g(t(n.value.cancel), 1)
2674
+ default: t(() => [
2675
+ k(l(s.value.cancel), 1)
2424
2676
  ]),
2425
2677
  _: 1
2426
- }, 8, ["disabled", "onClick"])) : h("", !0)
2678
+ }, 8, ["disabled", "onClick"])) : b("", !0)
2427
2679
  ]),
2428
2680
  _: 1
2429
2681
  }, 8, ["columns", "rows"]),
2430
- v.value.length > Ve ? (s(), x(e(Sa), {
2682
+ p.value.length > Ae ? (n(), g(e(Ha), {
2431
2683
  key: 0,
2432
- modelValue: T.value,
2433
- "onUpdate:modelValue": ee[1] || (ee[1] = (A) => T.value = A),
2434
- total: v.value.length,
2435
- "page-size": Ve,
2684
+ modelValue: D.value,
2685
+ "onUpdate:modelValue": te[1] || (te[1] = (q) => D.value = q),
2686
+ total: p.value.length,
2687
+ "page-size": Ae,
2436
2688
  class: "save-pages"
2437
- }, null, 8, ["modelValue", "total"])) : h("", !0)
2438
- ])) : h("", !0)
2689
+ }, null, 8, ["modelValue", "total"])) : b("", !0)
2690
+ ])) : b("", !0)
2439
2691
  ]),
2440
2692
  _: 2
2441
2693
  }, [
2442
- y.admin && u.value ? {
2694
+ r.admin && d.value ? {
2443
2695
  name: "footer",
2444
- fn: l(() => [
2445
- $("div", Pl, [
2446
- $("p", null, t(n.value.disableHelp), 1),
2447
- d(e(U), {
2448
- variant: u.value.disabled ? "secondary" : "danger",
2449
- disabled: k.value,
2450
- onClick: le
2696
+ fn: t(() => [
2697
+ P("div", Yl, [
2698
+ P("p", null, l(s.value.disableHelp), 1),
2699
+ f(e(F), {
2700
+ variant: d.value.disabled ? "secondary" : "danger",
2701
+ disabled: h.value,
2702
+ onClick: j
2451
2703
  }, {
2452
- default: l(() => [
2453
- g(t(u.value.disabled ? n.value.enable : n.value.disable), 1)
2704
+ default: t(() => [
2705
+ k(l(d.value.disabled ? s.value.enable : s.value.disable), 1)
2454
2706
  ]),
2455
2707
  _: 1
2456
2708
  }, 8, ["variant", "disabled"])
@@ -2460,187 +2712,187 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2460
2712
  } : void 0
2461
2713
  ]), 1032, ["title", "description", "loading", "aria-busy"]));
2462
2714
  }
2463
- }), Zl = /* @__PURE__ */ ue(Vl, [["__scopeId", "data-v-5ef5e256"]]), ea = /* @__PURE__ */ Symbol("authorization");
2464
- function Il() {
2465
- const y = Ge(ea, void 0);
2466
- if (!y) throw Error("authorization controls must be placed inside AuthorizationGate");
2467
- return y;
2715
+ }), _n = /* @__PURE__ */ ue(Zl, [["__scopeId", "data-v-5ef5e256"]]), va = /* @__PURE__ */ Symbol("authorization");
2716
+ function jl() {
2717
+ const r = Le(va, void 0);
2718
+ if (!r) throw Error("authorization controls must be placed inside AuthorizationGate");
2719
+ return r;
2468
2720
  }
2469
- const Tl = { class: "authorization-content" }, El = ["aria-busy", "data-authorization-state"], Ul = { class: "authorization-body" }, Al = /* @__PURE__ */ oe({
2721
+ const en = { class: "authorization-content" }, an = ["aria-busy", "data-authorization-state"], tn = { class: "authorization-body" }, ln = /* @__PURE__ */ ie({
2470
2722
  __name: "AuthorizationGate",
2471
2723
  props: {
2472
2724
  ctx: {},
2473
2725
  name: {}
2474
2726
  },
2475
2727
  emits: ["ready"],
2476
- setup(y, { emit: q }) {
2477
- const f = y, a = q, o = b(), m = b(), i = b(!1), n = b(!1), u = b(!1);
2478
- let r = [], v = !1, k = 0, D = !1, S;
2479
- const c = L(() => da(f.ctx.locale, f.name ?? f.ctx.displayName ?? "")), w = L(() => o.value || m.value), z = L(() => w.value?.state === "authorization_required"), M = L(() => ["helper_untrusted", "cli_untrusted"].includes(w.value?.reason || "")), N = L(() => z.value && !M.value), K = L(() => w.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), O = L(() => w.value ? z.value ? c.value("title") : w.value.state === "ready" ? c.value("ready") : w.value.state === "not_admin" ? c.value("not_admin.title") : w.value.state === "session_expired" ? c.value("session_expired.title") : c.value(K.value + ".title") : c.value("checking")), Z = L(() => z.value ? c.value("purpose") : w.value?.state === "not_admin" ? c.value("not_admin.body") : w.value?.state === "session_expired" ? c.value("session_expired.body") : w.value?.state === "unavailable" ? c.value(K.value + ".body") : c.value("purpose")), ae = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], W = L(() => ae.includes(w.value?.reason || "") ? w.value.reason : "unknown"), H = L(() => M.value ? "next.reinstall" : W.value === "grant_missing" ? "next.install" : W.value === "upgrade_reapproval" || W.value === "grant_incompatible" ? "next.update" : "next.repair");
2480
- function j(R) {
2481
- if (!R || R.command !== "authorization" || R.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(R.state) || R.reason === "upgrade_reapproval" && R.state !== "authorization_required") throw Error("invalid status");
2482
- return R;
2728
+ setup(r, { emit: x }) {
2729
+ const i = r, a = x, u = y(), v = y(), o = y(!1), s = y(!1), d = y(!1);
2730
+ let c = [], p = !1, h = 0, A = !1, $;
2731
+ const _ = U(() => wa(i.ctx.locale, i.name ?? i.ctx.displayName ?? "")), S = U(() => u.value || v.value), V = U(() => S.value?.state === "authorization_required"), E = U(() => ["helper_untrusted", "cli_untrusted"].includes(S.value?.reason || "")), z = U(() => V.value && !E.value), I = U(() => S.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), K = U(() => S.value ? V.value ? _.value("title") : S.value.state === "ready" ? _.value("ready") : S.value.state === "not_admin" ? _.value("not_admin.title") : S.value.state === "session_expired" ? _.value("session_expired.title") : _.value(I.value + ".title") : _.value("checking")), H = U(() => V.value ? _.value("purpose") : S.value?.state === "not_admin" ? _.value("not_admin.body") : S.value?.state === "session_expired" ? _.value("session_expired.body") : S.value?.state === "unavailable" ? _.value(I.value + ".body") : _.value("purpose")), le = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], X = U(() => le.includes(S.value?.reason || "") ? S.value.reason : "unknown"), Q = U(() => E.value ? "next.reinstall" : X.value === "grant_missing" ? "next.install" : X.value === "upgrade_reapproval" || X.value === "grant_incompatible" ? "next.update" : "next.repair");
2732
+ function Y(N) {
2733
+ if (!N || N.command !== "authorization" || N.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(N.state) || N.reason === "upgrade_reapproval" && N.state !== "authorization_required") throw Error("invalid status");
2734
+ return N;
2483
2735
  }
2484
- const te = [1e3, 3e3];
2485
- async function se(R) {
2486
- const T = R === "status" && !u.value ? te : [];
2487
- for (let E = 0; ; E++) {
2736
+ const ne = [1e3, 3e3];
2737
+ async function se(N) {
2738
+ const D = N === "status" && !d.value ? ne : [];
2739
+ for (let O = 0; ; O++) {
2488
2740
  try {
2489
- const J = j(await f.ctx.authorization?.[R]());
2490
- if (J.state !== "unavailable" || E >= T.length) return J;
2741
+ const J = Y(await i.ctx.authorization?.[N]());
2742
+ if (J.state !== "unavailable" || O >= D.length) return J;
2491
2743
  } catch (J) {
2492
- if (J.code === "session_required" || E >= T.length) throw J;
2744
+ if (J.code === "session_required" || O >= D.length) throw J;
2493
2745
  }
2494
- if (await new Promise((J) => setTimeout(J, T[E])), v) throw Error("disposed");
2746
+ if (await new Promise((J) => setTimeout(J, D[O])), p) throw Error("disposed");
2495
2747
  }
2496
2748
  }
2497
- async function Q(R) {
2498
- if (i.value || v) return;
2499
- const T = ++k;
2500
- m.value = R === "request" && o.value?.state === "authorization_required" ? o.value : void 0, i.value = !0, n.value = !1, o.value = void 0;
2749
+ async function ee(N) {
2750
+ if (o.value || p) return;
2751
+ const D = ++h;
2752
+ v.value = N === "request" && u.value?.state === "authorization_required" ? u.value : void 0, o.value = !0, s.value = !1, u.value = void 0;
2501
2753
  try {
2502
- const E = await se(R);
2503
- if (v || T !== k) return;
2504
- o.value = E, u.value = E.state !== "ready", E.state === "ready" && Y(!0), E.state === "ready" && a("ready");
2505
- } catch (E) {
2506
- !v && T === k && (o.value = E.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : m.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, n.value = !0, u.value = !0);
2754
+ const O = await se(N);
2755
+ if (p || D !== h) return;
2756
+ u.value = O, d.value = O.state !== "ready", O.state === "ready" && Z(!0), O.state === "ready" && a("ready");
2757
+ } catch (O) {
2758
+ !p && D === h && (u.value = O.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : v.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, s.value = !0, d.value = !0);
2507
2759
  } finally {
2508
- !v && T === k && (i.value = !1, m.value = void 0, D && (D = !1, Q("status")));
2760
+ !p && D === h && (o.value = !1, v.value = void 0, A && (A = !1, ee("status")));
2509
2761
  }
2510
2762
  }
2511
- function Y(R) {
2512
- const T = r;
2513
- r = [], T.forEach((E) => E(R));
2763
+ function Z(N) {
2764
+ const D = c;
2765
+ c = [], D.forEach((O) => O(N));
2514
2766
  }
2515
- function G(R) {
2516
- u.value = R, R || Y(!1);
2767
+ function G(N) {
2768
+ d.value = N, N || Z(!1);
2517
2769
  }
2518
- function le() {
2519
- return o.value?.state === "ready" ? Promise.resolve(!0) : (i.value || (u.value = !0), new Promise((R) => r.push(R)));
2770
+ function j() {
2771
+ return u.value?.state === "ready" ? Promise.resolve(!0) : (o.value || (d.value = !0), new Promise((N) => c.push(N)));
2520
2772
  }
2521
- return fa(ea, { state: L(() => o.value?.state ?? "checking"), requireAuthorization: le, text: c, busy: i, canManage: () => !!f.ctx.authorization?.canManage?.(), revoke: () => Q("revoke") }), ge(() => {
2522
- S = f.ctx.reopen(() => {
2523
- i.value ? D = !0 : Q("status");
2524
- }), Q("status");
2525
- }), Qe(() => {
2526
- v = !0, k++, Y(!1), typeof S == "function" && S();
2527
- }), (R, T) => (s(), V(ne, null, [
2528
- $("div", Tl, [
2529
- De(R.$slots, "default", {}, void 0, !0)
2773
+ return na(va, { state: U(() => u.value?.state ?? "checking"), requireAuthorization: j, text: _, busy: o, canManage: () => !!i.ctx.authorization?.canManage?.(), revoke: () => ee("revoke") }), ve(() => {
2774
+ $ = i.ctx.reopen(() => {
2775
+ o.value ? A = !0 : ee("status");
2776
+ }), ee("status");
2777
+ }), sa(() => {
2778
+ p = !0, h++, Z(!1), typeof $ == "function" && $();
2779
+ }), (N, D) => (n(), R(oe, null, [
2780
+ P("div", en, [
2781
+ ge(N.$slots, "default", {}, void 0, !0)
2530
2782
  ]),
2531
- d(e(qe), {
2532
- open: u.value,
2533
- title: O.value,
2783
+ f(e(Ue), {
2784
+ open: d.value,
2785
+ title: K.value,
2534
2786
  width: "480px",
2535
2787
  "onUpdate:open": G
2536
2788
  }, {
2537
- footer: l(() => [
2538
- N.value ? (s(), x(e(U), {
2789
+ footer: t(() => [
2790
+ z.value ? (n(), g(e(F), {
2539
2791
  key: 0,
2540
2792
  variant: "primary",
2541
- loading: i.value,
2542
- disabled: i.value,
2543
- onClick: T[0] || (T[0] = (E) => Q("request"))
2793
+ loading: o.value,
2794
+ disabled: o.value,
2795
+ onClick: D[0] || (D[0] = (O) => ee("request"))
2544
2796
  }, {
2545
- default: l(() => [
2546
- g(t(i.value ? c.value("authorizing") : c.value("authorize")), 1)
2797
+ default: t(() => [
2798
+ k(l(o.value ? _.value("authorizing") : _.value("authorize")), 1)
2547
2799
  ]),
2548
2800
  _: 1
2549
- }, 8, ["loading", "disabled"])) : (s(), x(e(U), {
2801
+ }, 8, ["loading", "disabled"])) : (n(), g(e(F), {
2550
2802
  key: 1,
2551
2803
  variant: "primary",
2552
- loading: i.value,
2553
- disabled: i.value,
2554
- onClick: T[1] || (T[1] = (E) => Q("status"))
2804
+ loading: o.value,
2805
+ disabled: o.value,
2806
+ onClick: D[1] || (D[1] = (O) => ee("status"))
2555
2807
  }, {
2556
- default: l(() => [
2557
- g(t(i.value ? c.value("checking") : c.value("retry")), 1)
2808
+ default: t(() => [
2809
+ k(l(o.value ? _.value("checking") : _.value("retry")), 1)
2558
2810
  ]),
2559
2811
  _: 1
2560
2812
  }, 8, ["loading", "disabled"]))
2561
2813
  ]),
2562
- default: l(() => [
2563
- $("div", {
2814
+ default: t(() => [
2815
+ P("div", {
2564
2816
  class: "authorization-view",
2565
- "aria-busy": i.value,
2566
- "data-authorization-state": o.value?.state || "checking"
2817
+ "aria-busy": o.value,
2818
+ "data-authorization-state": u.value?.state || "checking"
2567
2819
  }, [
2568
- $("p", Ul, t(Z.value), 1),
2569
- z.value ? (s(), x(e(X), {
2820
+ P("p", tn, l(H.value), 1),
2821
+ V.value ? (n(), g(e(W), {
2570
2822
  key: 0,
2571
2823
  class: "authorization-status",
2572
- tone: ["grant_missing", "upgrade_reapproval"].includes(W.value) ? "info" : "warning",
2573
- title: c.value("reason." + W.value)
2824
+ tone: ["grant_missing", "upgrade_reapproval"].includes(X.value) ? "info" : "warning",
2825
+ title: _.value("reason." + X.value)
2574
2826
  }, {
2575
- default: l(() => [
2576
- g(t(c.value(H.value)), 1)
2827
+ default: t(() => [
2828
+ k(l(_.value(Q.value)), 1)
2577
2829
  ]),
2578
2830
  _: 1
2579
- }, 8, ["tone", "title"])) : h("", !0),
2580
- n.value ? (s(), x(e(X), {
2831
+ }, 8, ["tone", "title"])) : b("", !0),
2832
+ s.value ? (n(), g(e(W), {
2581
2833
  key: 1,
2582
2834
  class: "authorization-failed",
2583
2835
  tone: "warning"
2584
2836
  }, {
2585
- default: l(() => [
2586
- g(t(c.value("failed")), 1)
2837
+ default: t(() => [
2838
+ k(l(_.value("failed")), 1)
2587
2839
  ]),
2588
2840
  _: 1
2589
- })) : h("", !0)
2590
- ], 8, El)
2841
+ })) : b("", !0)
2842
+ ], 8, an)
2591
2843
  ]),
2592
2844
  _: 1
2593
2845
  }, 8, ["open", "title"])
2594
2846
  ], 64));
2595
2847
  }
2596
- }), Wl = /* @__PURE__ */ ue(Al, [["__scopeId", "data-v-e16b5f7d"]]), Dl = { class: "authorization-setting" }, Rl = {
2848
+ }), wn = /* @__PURE__ */ ue(ln, [["__scopeId", "data-v-e16b5f7d"]]), nn = { class: "authorization-setting" }, sn = {
2597
2849
  class: "authorization-state",
2598
2850
  role: "status"
2599
- }, ql = { class: "authorization-revoke-body" }, Bl = /* @__PURE__ */ oe({
2851
+ }, on = { class: "authorization-revoke-body" }, un = /* @__PURE__ */ ie({
2600
2852
  __name: "AuthorizationSettings",
2601
- setup(y) {
2602
- const { state: q, requireAuthorization: f, text: a, busy: o, canManage: m, revoke: i } = Il(), n = b(!1), u = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
2603
- return (r, v) => (s(), V(ne, null, [
2604
- d(e(he), {
2853
+ setup(r) {
2854
+ const { state: x, requireAuthorization: i, text: a, busy: u, canManage: v, revoke: o } = jl(), s = y(!1), d = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
2855
+ return (c, p) => (n(), R(oe, null, [
2856
+ f(e(ke), {
2605
2857
  title: e(a)("settings.title"),
2606
2858
  collapsible: !1
2607
2859
  }, {
2608
- default: l(() => [
2609
- d(e(za), {
2860
+ default: t(() => [
2861
+ f(e(Ee), {
2610
2862
  label: e(a)("settings.status"),
2611
2863
  description: e(a)("purpose"),
2612
2864
  align: "center"
2613
2865
  }, {
2614
- default: l(() => [
2615
- $("div", Dl, [
2616
- $("span", Rl, [
2617
- e(q) === "ready" ? (s(), x(e(Aa), {
2866
+ default: t(() => [
2867
+ P("div", nn, [
2868
+ P("span", sn, [
2869
+ e(x) === "ready" ? (n(), g(e(Za), {
2618
2870
  key: 0,
2619
2871
  size: 16,
2620
2872
  "aria-hidden": "true"
2621
- })) : h("", !0),
2622
- g(t(e(a)(u[e(q)])), 1)
2873
+ })) : b("", !0),
2874
+ k(l(e(a)(d[e(x)])), 1)
2623
2875
  ]),
2624
- e(q) === "ready" && e(m)() ? (s(), x(e(U), {
2876
+ e(x) === "ready" && e(v)() ? (n(), g(e(F), {
2625
2877
  key: 0,
2626
2878
  variant: "secondary",
2627
- disabled: e(o),
2628
- onClick: v[0] || (v[0] = (k) => n.value = !0)
2879
+ disabled: e(u),
2880
+ onClick: p[0] || (p[0] = (h) => s.value = !0)
2629
2881
  }, {
2630
- default: l(() => [
2631
- g(t(e(a)("revoke")), 1)
2882
+ default: t(() => [
2883
+ k(l(e(a)("revoke")), 1)
2632
2884
  ]),
2633
2885
  _: 1
2634
- }, 8, ["disabled"])) : e(q) !== "ready" && e(q) !== "checking" ? (s(), x(e(U), {
2886
+ }, 8, ["disabled"])) : e(x) !== "ready" && e(x) !== "checking" ? (n(), g(e(F), {
2635
2887
  key: 1,
2636
2888
  variant: "secondary",
2637
- onClick: v[1] || (v[1] = (k) => e(f)())
2889
+ onClick: p[1] || (p[1] = (h) => e(i)())
2638
2890
  }, {
2639
- default: l(() => [
2640
- g(t(e(a)("settings.details")), 1)
2891
+ default: t(() => [
2892
+ k(l(e(a)("settings.details")), 1)
2641
2893
  ]),
2642
2894
  _: 1
2643
- })) : h("", !0)
2895
+ })) : b("", !0)
2644
2896
  ])
2645
2897
  ]),
2646
2898
  _: 1
@@ -2648,105 +2900,112 @@ const Tl = { class: "authorization-content" }, El = ["aria-busy", "data-authoriz
2648
2900
  ]),
2649
2901
  _: 1
2650
2902
  }, 8, ["title"]),
2651
- d(e(qe), {
2652
- open: n.value,
2653
- "onUpdate:open": v[4] || (v[4] = (k) => n.value = k),
2903
+ f(e(Ue), {
2904
+ open: s.value,
2905
+ "onUpdate:open": p[4] || (p[4] = (h) => s.value = h),
2654
2906
  title: e(a)("revoke.title"),
2655
2907
  width: "480px"
2656
2908
  }, {
2657
- footer: l(() => [
2658
- d(e(U), {
2909
+ footer: t(() => [
2910
+ f(e(F), {
2659
2911
  variant: "secondary",
2660
- onClick: v[2] || (v[2] = (k) => n.value = !1)
2912
+ onClick: p[2] || (p[2] = (h) => s.value = !1)
2661
2913
  }, {
2662
- default: l(() => [
2663
- g(t(e(a)("cancel")), 1)
2914
+ default: t(() => [
2915
+ k(l(e(a)("cancel")), 1)
2664
2916
  ]),
2665
2917
  _: 1
2666
2918
  }),
2667
- d(e(U), {
2919
+ f(e(F), {
2668
2920
  variant: "danger",
2669
- disabled: e(o),
2670
- onClick: v[3] || (v[3] = (k) => {
2671
- n.value = !1, e(i)();
2921
+ disabled: e(u),
2922
+ onClick: p[3] || (p[3] = (h) => {
2923
+ s.value = !1, e(o)();
2672
2924
  })
2673
2925
  }, {
2674
- default: l(() => [
2675
- g(t(e(a)("revoke")), 1)
2926
+ default: t(() => [
2927
+ k(l(e(a)("revoke")), 1)
2676
2928
  ]),
2677
2929
  _: 1
2678
2930
  }, 8, ["disabled"])
2679
2931
  ]),
2680
- default: l(() => [
2681
- $("p", ql, t(e(a)("revoke.body")), 1)
2932
+ default: t(() => [
2933
+ P("p", on, l(e(a)("revoke.body")), 1)
2682
2934
  ]),
2683
2935
  _: 1
2684
2936
  }, 8, ["open", "title"])
2685
2937
  ], 64));
2686
2938
  }
2687
- }), jl = /* @__PURE__ */ ue(Bl, [["__scopeId", "data-v-f031e7c7"]]);
2939
+ }), xn = /* @__PURE__ */ ue(un, [["__scopeId", "data-v-f031e7c7"]]);
2688
2940
  export {
2689
- Kl as AppShell,
2690
- Wl as AuthorizationGate,
2691
- jl as AuthorizationSettings,
2692
- Xl as BackgroundPanel,
2693
- Zl as BackgroundSavePanel,
2694
- ts as DEFAULT_REQUEST_TIMEOUT,
2695
- Yl as DelegatePanel,
2696
- Ql as ExecutorSettings,
2697
- Da as ExecutorSetupKey,
2698
- ls as FILE_STATION_APP,
2699
- je as FileBrowser,
2700
- Hl as FilesPage,
2701
- Jl as LoginPage,
2702
- Te as NasPicker,
2703
- Gl as PortalSettings,
2704
- ss as activePage,
2705
- ns as authorizationCatalogs,
2706
- da as authorizationCopy,
2707
- is as backgroundCatalogs,
2708
- sa as backgroundCopy,
2709
- ia as backgroundErrorCopy,
2710
- os as catalogs,
2711
- us as clientTimeout,
2712
- na as createBackgroundPickerProvider,
2713
- rs as createBackgroundSaveFacade,
2714
- ds as createFileTransfers,
2715
- Me as createNasProvider,
2716
- vs as createPortalAccess,
2717
- Ml as createSession,
2718
- cs as decodeResponse,
2719
- ps as delegateCatalogs,
2720
- Ke as delegateCopy,
2721
- fs as encodeRequest,
2722
- oa as errorCopy,
2723
- ys as fileStationPath,
2724
- Ae as format,
2725
- ms as identityCatalogs,
2726
- la as identityCopy,
2727
- He as labelSeparator,
2728
- bs as mergeCatalogs,
2729
- gs as nasCatalogs,
2941
+ fn as AppShell,
2942
+ wn as AuthorizationGate,
2943
+ xn as AuthorizationSettings,
2944
+ gn as BackgroundPanel,
2945
+ _n as BackgroundSavePanel,
2946
+ Sn as DEFAULT_REQUEST_TIMEOUT,
2947
+ kn as DelegatePanel,
2948
+ hn as ExecutorApproval,
2949
+ vt as ExecutorNotice,
2950
+ da as ExecutorSettings,
2951
+ Ke as ExecutorSetupKey,
2952
+ zn as FILE_STATION_APP,
2953
+ ca as FileBrowser,
2954
+ yn as FilesPage,
2955
+ bn as LoginPage,
2956
+ Re as NasPicker,
2957
+ mn as PortalSettings,
2958
+ Pn as activePage,
2959
+ Vn as authorizationCatalogs,
2960
+ wa as authorizationCopy,
2961
+ An as backgroundCatalogs,
2962
+ ma as backgroundCopy,
2963
+ ga as backgroundErrorCopy,
2964
+ In as bridgeCatalogs,
2965
+ En as bridgeErrorCopy,
2966
+ Tn as catalogs,
2967
+ Un as clientTimeout,
2968
+ ba as createBackgroundPickerProvider,
2969
+ Rn as createBackgroundSaveFacade,
2970
+ Dn as createFileTransfers,
2971
+ ta as createNasProvider,
2972
+ Bn as createPortalAccess,
2973
+ pn as createSession,
2974
+ Fn as createStandaloneContext,
2975
+ qn as createStandaloneHost,
2976
+ On as decodeResponse,
2977
+ Ln as delegateCatalogs,
2978
+ Te as delegateCopy,
2979
+ Nn as encodeRequest,
2980
+ ha as errorCopy,
2981
+ Mn as fileStationPath,
2982
+ qe as format,
2983
+ Kn as identityCatalogs,
2984
+ ya as identityCopy,
2985
+ fa as isFullPage,
2986
+ la as labelSeparator,
2987
+ Hn as mergeCatalogs,
2988
+ Gn as nasCatalogs,
2730
2989
  be as nasCopy,
2731
- Le as nasErrorCopy,
2732
- hs as openFileInFileStation,
2733
- ra as openFolderInFileStation,
2734
- ks as portalCatalogs,
2735
- _s as portalMessages,
2736
- ws as protocolCodes,
2737
- xs as protocolOps,
2738
- Cs as protocolSchemas,
2739
- Be as requestKey,
2740
- $s as saveCatalogs,
2741
- Ne as saveCopy,
2990
+ ea as nasErrorCopy,
2991
+ Jn as openFileInFileStation,
2992
+ _a as openFolderInFileStation,
2993
+ Wn as portalCatalogs,
2994
+ Xn as portalMessages,
2995
+ Qn as protocolCodes,
2996
+ Yn as protocolOps,
2997
+ Zn as protocolSchemas,
2998
+ He as requestKey,
2999
+ jn as saveCatalogs,
3000
+ aa as saveCopy,
2742
3001
  Ie as saveError,
2743
- ua as scopedPicker,
2744
- Ss as shellCatalogs,
2745
- aa as shellCopy,
2746
- zs as shellPages,
2747
- ta as uiLocale,
2748
- Ps as uiLocales,
2749
- Il as useAuthorization,
2750
- We as useExecutorSetup,
2751
- Ra as useNasRequest
3002
+ ka as scopedPicker,
3003
+ es as shellCatalogs,
3004
+ pa as shellCopy,
3005
+ as as shellPages,
3006
+ je as uiLocale,
3007
+ ts as uiLocales,
3008
+ jl as useAuthorization,
3009
+ ua as useExecutorSetup,
3010
+ ja as useNasRequest
2752
3011
  };