vuefinder 2.1.1 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vuefinder.js CHANGED
@@ -1,18 +1,18 @@
1
1
  var Ce = Object.defineProperty;
2
2
  var Se = (p, e, s) => e in p ? Ce(p, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : p[e] = s;
3
3
  var fe = (p, e, s) => (Se(p, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { reactive as le, watch as ie, ref as _, computed as ve, inject as F, openBlock as n, createElementBlock as v, unref as o, createCommentVNode as M, normalizeClass as U, createElementVNode as t, createTextVNode as N, toDisplayString as m, customRef as Me, withModifiers as Y, Fragment as H, renderList as I, withDirectives as q, withKeys as Q, isRef as _e, vModelText as Z, nextTick as de, createVNode as B, TransitionGroup as Ee, withCtx as j, onMounted as P, onUpdated as De, onBeforeUnmount as ke, vShow as ae, normalizeStyle as be, vModelSelect as pe, provide as je, Transition as Ae, createBlock as L, resolveDynamicComponent as Te, renderSlot as ne, onUnmounted as Le, vModelCheckbox as Fe } from "vue";
5
- import Ne from "mitt";
4
+ import { reactive as ie, watch as de, ref as k, computed as ee, inject as F, openBlock as n, createElementBlock as m, unref as a, createCommentVNode as M, normalizeClass as z, createElementVNode as t, createTextVNode as V, toDisplayString as v, customRef as Me, withModifiers as Y, Fragment as U, renderList as I, withDirectives as q, withKeys as Q, isRef as _e, vModelText as Z, nextTick as ce, createVNode as H, TransitionGroup as Ee, withCtx as A, onMounted as P, onUpdated as De, onBeforeUnmount as ke, vShow as re, normalizeStyle as be, vModelSelect as pe, provide as je, Transition as Ae, createBlock as T, resolveDynamicComponent as Le, renderSlot as le, onUnmounted as Te, vModelCheckbox as Fe } from "vue";
5
+ import Oe from "mitt";
6
6
  import Ve from "dragselect";
7
- import ze from "vanilla-lazyload";
7
+ import Ne from "vanilla-lazyload";
8
8
  import "cropperjs/dist/cropper.css";
9
- import Oe from "cropperjs";
10
- import Ue from "@uppy/core";
11
- import He from "@uppy/xhr-upload";
9
+ import Be from "cropperjs";
10
+ import ze from "@uppy/core";
11
+ import Ue from "@uppy/xhr-upload";
12
12
  import "microtip/microtip.css";
13
13
  var ge;
14
- const ue = (ge = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : ge.getAttribute("content");
15
- class Be {
14
+ const me = (ge = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : ge.getAttribute("content");
15
+ class He {
16
16
  /** @param {RequestConfig} config */
17
17
  constructor(e) {
18
18
  /** @type {RequestConfig} */
@@ -35,30 +35,30 @@ class Be {
35
35
  */
36
36
  transformRequestParams(e) {
37
37
  const s = this.config, r = {};
38
- ue != null && ue !== "" && (r[s.xsrfHeaderName] = ue);
39
- const a = Object.assign({}, s.headers, r, e.headers), d = Object.assign({}, s.params, e.params), u = e.body, i = s.baseUrl + e.url, l = e.method;
38
+ me != null && me !== "" && (r[s.xsrfHeaderName] = me);
39
+ const o = Object.assign({}, s.headers, r, e.headers), i = Object.assign({}, s.params, e.params), u = e.body, d = s.baseUrl + e.url, l = e.method;
40
40
  let c;
41
- l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([k, $]) => {
42
- c.append(k, $);
41
+ l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([_, w]) => {
42
+ c.append(_, w);
43
43
  })) : (c = { ...u }, s.body != null && Object.assign(c, this.config.body)));
44
- const w = {
45
- url: i,
44
+ const g = {
45
+ url: d,
46
46
  method: l,
47
- headers: a,
48
- params: d,
47
+ headers: o,
48
+ params: i,
49
49
  body: c
50
50
  };
51
51
  if (s.transformRequest != null) {
52
- const k = s.transformRequest({
53
- url: i,
52
+ const _ = s.transformRequest({
53
+ url: d,
54
54
  method: l,
55
- headers: a,
56
- params: d,
55
+ headers: o,
56
+ params: i,
57
57
  body: c
58
58
  });
59
- k.url != null && (w.url = k.url), k.method != null && (w.method = k.method), k.params != null && (w.params = k.params ?? {}), k.headers != null && (w.headers = k.headers ?? {}), k.body != null && (w.body = k.body);
59
+ _.url != null && (g.url = _.url), _.method != null && (g.method = _.method), _.params != null && (g.params = _.params ?? {}), _.headers != null && (g.headers = _.headers ?? {}), _.body != null && (g.body = _.body);
60
60
  }
61
- return w;
61
+ return g;
62
62
  }
63
63
  /**
64
64
  * Get download url
@@ -110,16 +110,16 @@ class Be {
110
110
  * @throws {Record<String,?String>|null} resp json error
111
111
  */
112
112
  async send(e) {
113
- const s = this.transformRequestParams(e), r = e.responseType || "json", a = {
113
+ const s = this.transformRequestParams(e), r = e.responseType || "json", o = {
114
114
  method: e.method,
115
115
  headers: s.headers,
116
116
  signal: e.abortSignal
117
- }, d = s.url + "?" + new URLSearchParams(s.params);
117
+ }, i = s.url + "?" + new URLSearchParams(s.params);
118
118
  if (s.method !== "get" && s.body != null) {
119
- let i;
120
- s.body instanceof FormData ? i = e.body : (i = JSON.stringify(s.body), a.headers["Content-Type"] = "application/json"), a.body = i;
119
+ let d;
120
+ s.body instanceof FormData ? d = e.body : (d = JSON.stringify(s.body), o.headers["Content-Type"] = "application/json"), o.body = d;
121
121
  }
122
- const u = await fetch(d, a);
122
+ const u = await fetch(i, o);
123
123
  if (u.ok)
124
124
  return await u[r]();
125
125
  throw await u.json();
@@ -133,46 +133,46 @@ function Re(p) {
133
133
  body: {},
134
134
  xsrfHeaderName: "X-CSRF-Token"
135
135
  };
136
- return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new Be(e);
136
+ return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new He(e);
137
137
  }
138
138
  function qe(p) {
139
139
  let e = localStorage.getItem(p + "_storage");
140
- const s = le(JSON.parse(e ?? "{}"));
141
- ie(s, r);
140
+ const s = ie(JSON.parse(e ?? "{}"));
141
+ de(s, r);
142
142
  function r() {
143
143
  Object.keys(s).length ? localStorage.setItem(p + "_storage", JSON.stringify(s)) : localStorage.removeItem(p + "_storage");
144
144
  }
145
- function a(l, c) {
145
+ function o(l, c) {
146
146
  s[l] = c;
147
147
  }
148
- function d(l) {
148
+ function i(l) {
149
149
  delete s[l];
150
150
  }
151
151
  function u() {
152
- Object.keys(s).map((l) => d(l));
152
+ Object.keys(s).map((l) => i(l));
153
153
  }
154
- return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: a, removeStore: d, clearStore: u };
154
+ return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: o, removeStore: i, clearStore: u };
155
155
  }
156
156
  async function Ie(p, e) {
157
- let s;
158
- return typeof e[p] == "function" ? s = (await e[p]()).default : s = e[p], s;
157
+ const s = e[p];
158
+ return typeof s == "function" ? (await s()).default : s;
159
159
  }
160
160
  function Pe(p, e, s, r) {
161
- const { getStore: a, setStore: d } = p, u = _({}), i = _(a("locale", e)), l = (k, $ = "en") => {
162
- Ie(k, r).then((y) => {
163
- u.value = y, d("locale", k), i.value = k, d("translations", y), s.emit("vf-toast-push", { label: "The language is set to " + k }), s.emit("vf-language-saved");
161
+ const { getStore: o, setStore: i } = p, u = k({}), d = k(o("locale", e)), l = (_, w = e) => {
162
+ Ie(_, r).then((y) => {
163
+ u.value = y, i("locale", _), d.value = _, i("translations", y), Object.values(r).length > 1 && (s.emit("vf-toast-push", { label: "The language is set to " + _ }), s.emit("vf-language-saved"));
164
164
  }).catch((y) => {
165
- $ ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l($, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
165
+ w ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l(w, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
166
166
  });
167
167
  };
168
- a("locale") ? u.value = a("translations") : l(e);
169
- const c = (k, ...$) => $.length ? c(k = k.replace("%s", $.shift()), ...$) : k;
170
- function w(k, ...$) {
171
- return u.value.hasOwnProperty(k) ? c(u.value[k], ...$) : c(k, ...$);
168
+ !o("locale") && !r.length ? l(e) : u.value = o("translations");
169
+ const c = (_, ...w) => w.length ? c(_ = _.replace("%s", w.shift()), ...w) : _;
170
+ function g(_, ...w) {
171
+ return u.value && u.value.hasOwnProperty(_) ? c(u.value[_], ...w) : c(_, ...w);
172
172
  }
173
- return { t: w, changeLocale: l, locale: i };
173
+ return { t: g, changeLocale: l, locale: d };
174
174
  }
175
- const z = {
175
+ const B = {
176
176
  EDIT: "edit",
177
177
  NEW_FILE: "newfile",
178
178
  NEW_FOLDER: "newfolder",
@@ -183,14 +183,15 @@ const z = {
183
183
  RENAME: "rename",
184
184
  UPLOAD: "upload",
185
185
  DELETE: "delete",
186
+ FULL_SCREEN: "fullscreen",
186
187
  DOWNLOAD: "download",
187
188
  LANGUAGE: "language"
188
- }, Ge = Object.values(z), We = "2.1.1";
189
- function ye(p, e, s, r, a) {
190
- return (e = Math, s = e.log, r = 1024, a = s(p) / s(r) | 0, p / e.pow(r, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "iB" : "B");
189
+ }, We = Object.values(B), Ge = "2.2.1";
190
+ function ye(p, e, s, r, o) {
191
+ return (e = Math, s = e.log, r = 1024, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "iB" : "B");
191
192
  }
192
- function xe(p, e, s, r, a) {
193
- return (e = Math, s = e.log, r = 1e3, a = s(p) / s(r) | 0, p / e.pow(r, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "B" : "B");
193
+ function xe(p, e, s, r, o) {
194
+ return (e = Math, s = e.log, r = 1e3, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "B" : "B");
194
195
  }
195
196
  function Ye(p) {
196
197
  const e = { k: 1, m: 2, g: 3, t: 4 }, r = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(p);
@@ -202,12 +203,12 @@ const J = {
202
203
  DARK: "dark"
203
204
  };
204
205
  function Ke(p, e) {
205
- const s = _(J.SYSTEM), r = _(J.LIGHT);
206
+ const s = k(J.SYSTEM), r = k(J.LIGHT);
206
207
  s.value = p.getStore("theme", e ?? J.SYSTEM);
207
- const a = window.matchMedia("(prefers-color-scheme: dark)"), d = (u) => {
208
+ const o = window.matchMedia("(prefers-color-scheme: dark)"), i = (u) => {
208
209
  s.value === J.DARK || s.value === J.SYSTEM && u.matches ? r.value = J.DARK : r.value = J.LIGHT;
209
210
  };
210
- return d(a), a.addEventListener("change", d), {
211
+ return i(o), o.addEventListener("change", i), {
211
212
  /**
212
213
  * @type {import('vue').Ref<Theme>}
213
214
  */
@@ -220,16 +221,15 @@ function Ke(p, e) {
220
221
  * @param {Theme} value
221
222
  */
222
223
  set(u) {
223
- s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"), d(a);
224
+ s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"), i(o);
224
225
  }
225
226
  };
226
227
  }
227
228
  const Je = (p, e) => {
228
- const s = qe(p.id), r = Ne(), a = s.getStore("metricUnits", !1), d = Ke(s, p.theme), u = ve(() => Pe(s, p.locale, r, e));
229
- let l = ((c) => Array.isArray(c) ? c : Ge)(p.features);
230
- return Object.values(e).length || (l = l.filter((c) => c !== z.LANGUAGE)), le({
229
+ const s = qe(p.id), r = Oe(), o = s.getStore("metricUnits", !1), i = Ke(s, p.theme), u = e.i18n, d = p.locale ?? e.locale, l = ee(() => Pe(s, d, r, u)), c = (_) => Array.isArray(_) ? _ : We, g = p.persist ? s.getStore("path", p.path) : p.path;
230
+ return ie({
231
231
  // app version
232
- version: We,
232
+ version: Ge,
233
233
  // root element
234
234
  root: null,
235
235
  // app id
@@ -237,25 +237,27 @@ const Je = (p, e) => {
237
237
  // Event Bus
238
238
  emitter: r,
239
239
  // active features
240
- features: l,
240
+ features: c(p.features),
241
241
  // http object
242
242
  requester: Re(p.request),
243
243
  // theme state
244
- theme: d,
244
+ theme: i,
245
245
  // view state
246
246
  view: s.getStore("viewport", "grid"),
247
247
  // fullscreen state
248
- fullscreen: s.getStore("full-screen", !1),
248
+ fullScreen: s.getStore("full-screen", p.fullScreen),
249
+ // selectButton state
250
+ selectButton: p.selectButton,
249
251
  // unit state - for example: GB or GiB
250
- metricUnits: a,
252
+ metricUnits: o,
251
253
  // human readable file sizes
252
- filesize: a ? xe : ye,
254
+ filesize: o ? xe : ye,
253
255
  // max file size
254
256
  maxFileSize: p.maxFileSize,
255
257
  // loading state
256
258
  loading: !1,
257
259
  // default locale
258
- i18n: u,
260
+ i18n: l,
259
261
  // modal state
260
262
  modal: {
261
263
  active: !1,
@@ -264,10 +266,16 @@ const Je = (p, e) => {
264
266
  },
265
267
  // main storage adapter
266
268
  adapter: s.getStore("adapter"),
269
+ // main storage adapter
270
+ path: g,
271
+ // persist state
272
+ persist: p.persist,
267
273
  // storage
268
274
  storage: s,
269
275
  // fetched items
270
- data: { adapter: s.getStore("adapter"), storages: [], dirname: ".", files: [] }
276
+ data: { adapter: s.getStore("adapter"), storages: [], dirname: g, files: [] },
277
+ // selected items
278
+ selectedItems: []
271
279
  });
272
280
  }, Xe = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Qe = {
273
281
  key: 0,
@@ -287,7 +295,7 @@ const Je = (p, e) => {
287
295
  })
288
296
  ], -1), tt = [
289
297
  et
290
- ], st = ["aria-label"], ot = /* @__PURE__ */ t("svg", {
298
+ ], st = ["aria-label"], at = /* @__PURE__ */ t("svg", {
291
299
  xmlns: "http://www.w3.org/2000/svg",
292
300
  class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
293
301
  fill: "none",
@@ -300,8 +308,8 @@ const Je = (p, e) => {
300
308
  "stroke-linejoin": "round",
301
309
  d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
302
310
  })
303
- ], -1), at = [
304
- ot
311
+ ], -1), ot = [
312
+ at
305
313
  ], rt = ["aria-label"], nt = /* @__PURE__ */ t("path", {
306
314
  "stroke-linecap": "round",
307
315
  "stroke-linejoin": "round",
@@ -381,7 +389,7 @@ const Je = (p, e) => {
381
389
  "stroke-linecap": "round",
382
390
  "stroke-linejoin": "round",
383
391
  d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
384
- }, Tt = ["aria-label"], Lt = {
392
+ }, Lt = ["aria-label"], Tt = {
385
393
  key: 0,
386
394
  "stroke-linecap": "round",
387
395
  "stroke-linejoin": "round",
@@ -391,117 +399,117 @@ const Je = (p, e) => {
391
399
  "stroke-linecap": "round",
392
400
  "stroke-linejoin": "round",
393
401
  d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"
394
- }, Nt = {
402
+ }, Ot = {
395
403
  name: "VFToolbar"
396
- }, Vt = /* @__PURE__ */ Object.assign(Nt, {
404
+ }, Vt = /* @__PURE__ */ Object.assign(Ot, {
397
405
  setup(p) {
398
- const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, a = _([]), d = _("");
406
+ const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, o = k([]), i = k("");
399
407
  e.emitter.on("vf-search-query", ({ newQuery: l }) => {
400
- d.value = l;
408
+ i.value = l;
401
409
  });
402
410
  const u = () => {
403
- e.fullscreen = !e.fullscreen, s("full-screen", e.fullscreen), e.emitter.emit("vf-fullscreen-toggle");
411
+ e.fullScreen = !e.fullScreen, s("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle");
404
412
  };
405
413
  e.emitter.on("vf-nodes-selected", (l) => {
406
- a.value = l;
414
+ o.value = l;
407
415
  });
408
- const i = () => {
416
+ const d = () => {
409
417
  e.view = e.view === "list" ? "grid" : "list", s("viewport", e.view);
410
418
  };
411
- return (l, c) => (n(), v("div", Xe, [
412
- d.value.length ? (n(), v("div", bt, [
419
+ return (l, c) => (n(), m("div", Xe, [
420
+ i.value.length ? (n(), m("div", bt, [
413
421
  t("div", yt, [
414
- N(m(o(r)("Search results for")) + " ", 1),
415
- t("span", xt, m(d.value), 1)
422
+ V(v(a(r)("Search results for")) + " ", 1),
423
+ t("span", xt, v(i.value), 1)
416
424
  ]),
417
- o(e).loading ? (n(), v("svg", wt, St)) : M("", !0)
418
- ])) : (n(), v("div", Qe, [
419
- o(e).features.includes(o(z).NEW_FOLDER) ? (n(), v("div", {
425
+ a(e).loading ? (n(), m("svg", wt, St)) : M("", !0)
426
+ ])) : (n(), m("div", Qe, [
427
+ a(e).features.includes(a(B).NEW_FOLDER) ? (n(), m("div", {
420
428
  key: 0,
421
429
  class: "mx-1.5",
422
- "aria-label": o(r)("New Folder"),
430
+ "aria-label": a(r)("New Folder"),
423
431
  "data-microtip-position": "bottom-right",
424
432
  role: "tooltip",
425
- onClick: c[0] || (c[0] = (w) => o(e).emitter.emit("vf-modal-show", { type: "new-folder", items: a.value }))
433
+ onClick: c[0] || (c[0] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-folder", items: o.value }))
426
434
  }, tt, 8, Ze)) : M("", !0),
427
- o(e).features.includes(o(z).NEW_FILE) ? (n(), v("div", {
435
+ a(e).features.includes(a(B).NEW_FILE) ? (n(), m("div", {
428
436
  key: 1,
429
437
  class: "mx-1.5",
430
- "aria-label": o(r)("New File"),
438
+ "aria-label": a(r)("New File"),
431
439
  "data-microtip-position": "bottom",
432
440
  role: "tooltip",
433
- onClick: c[1] || (c[1] = (w) => o(e).emitter.emit("vf-modal-show", { type: "new-file", items: a.value }))
434
- }, at, 8, st)) : M("", !0),
435
- o(e).features.includes(o(z).RENAME) ? (n(), v("div", {
441
+ onClick: c[1] || (c[1] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-file", items: o.value }))
442
+ }, ot, 8, st)) : M("", !0),
443
+ a(e).features.includes(a(B).RENAME) ? (n(), m("div", {
436
444
  key: 2,
437
445
  class: "mx-1.5",
438
- "aria-label": o(r)("Rename"),
446
+ "aria-label": a(r)("Rename"),
439
447
  "data-microtip-position": "bottom",
440
448
  role: "tooltip",
441
- onClick: c[2] || (c[2] = (w) => a.value.length != 1 || o(e).emitter.emit("vf-modal-show", { type: "rename", items: a.value }))
449
+ onClick: c[2] || (c[2] = (g) => o.value.length != 1 || a(e).emitter.emit("vf-modal-show", { type: "rename", items: o.value }))
442
450
  }, [
443
- (n(), v("svg", {
451
+ (n(), m("svg", {
444
452
  xmlns: "http://www.w3.org/2000/svg",
445
- class: U([a.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
453
+ class: z([o.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
446
454
  fill: "none",
447
455
  viewBox: "0 0 24 24",
448
456
  stroke: "none",
449
457
  "stroke-width": "1.5"
450
458
  }, lt, 2))
451
459
  ], 8, rt)) : M("", !0),
452
- o(e).features.includes(o(z).DELETE) ? (n(), v("div", {
460
+ a(e).features.includes(a(B).DELETE) ? (n(), m("div", {
453
461
  key: 3,
454
462
  class: "mx-1.5",
455
- "aria-label": o(r)("Delete"),
463
+ "aria-label": a(r)("Delete"),
456
464
  "data-microtip-position": "bottom",
457
465
  role: "tooltip",
458
- onClick: c[3] || (c[3] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "delete", items: a.value }))
466
+ onClick: c[3] || (c[3] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "delete", items: o.value }))
459
467
  }, [
460
- (n(), v("svg", {
468
+ (n(), m("svg", {
461
469
  xmlns: "http://www.w3.org/2000/svg",
462
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
470
+ class: z([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
463
471
  fill: "none",
464
472
  viewBox: "0 0 24 24",
465
473
  stroke: "none",
466
474
  "stroke-width": "1.5"
467
475
  }, ct, 2))
468
476
  ], 8, it)) : M("", !0),
469
- o(e).features.includes(o(z).UPLOAD) ? (n(), v("div", {
477
+ a(e).features.includes(a(B).UPLOAD) ? (n(), m("div", {
470
478
  key: 4,
471
479
  class: "mx-1.5",
472
- "aria-label": o(r)("Upload"),
480
+ "aria-label": a(r)("Upload"),
473
481
  "data-microtip-position": "bottom",
474
482
  role: "tooltip",
475
- onClick: c[4] || (c[4] = (w) => o(e).emitter.emit("vf-modal-show", { type: "upload", items: a.value }))
483
+ onClick: c[4] || (c[4] = (g) => a(e).emitter.emit("vf-modal-show", { type: "upload", items: o.value }))
476
484
  }, vt, 8, ut)) : M("", !0),
477
- o(e).features.includes(o(z).UNARCHIVE) && a.value.length == 1 && a.value[0].mime_type == "application/zip" ? (n(), v("div", {
485
+ a(e).features.includes(a(B).UNARCHIVE) && o.value.length == 1 && o.value[0].mime_type == "application/zip" ? (n(), m("div", {
478
486
  key: 5,
479
487
  class: "mx-1.5",
480
- "aria-label": o(r)("Unarchive"),
488
+ "aria-label": a(r)("Unarchive"),
481
489
  "data-microtip-position": "bottom",
482
490
  role: "tooltip",
483
- onClick: c[5] || (c[5] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "unarchive", items: a.value }))
491
+ onClick: c[5] || (c[5] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "unarchive", items: o.value }))
484
492
  }, [
485
- (n(), v("svg", {
493
+ (n(), m("svg", {
486
494
  xmlns: "http://www.w3.org/2000/svg",
487
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
495
+ class: z([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
488
496
  fill: "none",
489
497
  viewBox: "0 0 24 24",
490
498
  stroke: "none",
491
499
  "stroke-width": "1.5"
492
500
  }, ft, 2))
493
501
  ], 8, pt)) : M("", !0),
494
- o(e).features.includes(o(z).ARCHIVE) ? (n(), v("div", {
502
+ a(e).features.includes(a(B).ARCHIVE) ? (n(), m("div", {
495
503
  key: 6,
496
504
  class: "mx-1.5",
497
- "aria-label": o(r)("Archive"),
505
+ "aria-label": a(r)("Archive"),
498
506
  "data-microtip-position": "bottom",
499
507
  role: "tooltip",
500
- onClick: c[6] || (c[6] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "archive", items: a.value }))
508
+ onClick: c[6] || (c[6] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "archive", items: o.value }))
501
509
  }, [
502
- (n(), v("svg", {
510
+ (n(), m("svg", {
503
511
  xmlns: "http://www.w3.org/2000/svg",
504
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
512
+ class: z([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
505
513
  fill: "none",
506
514
  viewBox: "0 0 24 24",
507
515
  stroke: "none",
@@ -510,74 +518,75 @@ const Je = (p, e) => {
510
518
  ], 8, gt)) : M("", !0)
511
519
  ])),
512
520
  t("div", Mt, [
513
- t("div", {
521
+ a(e).features.includes(a(B).FULL_SCREEN) ? (n(), m("div", {
522
+ key: 0,
514
523
  class: "mx-1.5",
515
- "aria-label": o(r)("Toggle Full Screen"),
524
+ "aria-label": a(r)("Toggle Full Screen"),
516
525
  "data-microtip-position": "bottom-left",
517
526
  role: "tooltip",
518
527
  onClick: u
519
528
  }, [
520
- (n(), v("svg", Dt, [
521
- o(e).fullscreen ? (n(), v("path", jt)) : (n(), v("path", At))
529
+ (n(), m("svg", Dt, [
530
+ a(e).fullScreen ? (n(), m("path", jt)) : (n(), m("path", At))
522
531
  ]))
523
- ], 8, Et),
532
+ ], 8, Et)) : M("", !0),
524
533
  t("div", {
525
534
  class: "mx-1.5",
526
- "aria-label": o(r)("Change View"),
535
+ "aria-label": a(r)("Change View"),
527
536
  "data-microtip-position": "bottom-left",
528
537
  role: "tooltip",
529
- onClick: c[7] || (c[7] = (w) => d.value.length || i())
538
+ onClick: c[7] || (c[7] = (g) => i.value.length || d())
530
539
  }, [
531
- (n(), v("svg", {
540
+ (n(), m("svg", {
532
541
  xmlns: "http://www.w3.org/2000/svg",
533
- class: U([d.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
542
+ class: z([i.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
534
543
  fill: "none",
535
544
  viewBox: "0 0 24 24",
536
545
  stroke: "none",
537
546
  "stroke-width": "1.5"
538
547
  }, [
539
- o(e).view === "grid" ? (n(), v("path", Lt)) : M("", !0),
540
- o(e).view === "list" ? (n(), v("path", Ft)) : M("", !0)
548
+ a(e).view === "grid" ? (n(), m("path", Tt)) : M("", !0),
549
+ a(e).view === "list" ? (n(), m("path", Ft)) : M("", !0)
541
550
  ], 2))
542
- ], 8, Tt)
551
+ ], 8, Lt)
543
552
  ])
544
553
  ]));
545
554
  }
546
- }), zt = (p, e = 0, s = !1) => {
555
+ }), Nt = (p, e = 0, s = !1) => {
547
556
  let r;
548
- return (...a) => {
549
- s && !r && p(...a), clearTimeout(r), r = setTimeout(() => {
550
- p(...a);
557
+ return (...o) => {
558
+ s && !r && p(...o), clearTimeout(r), r = setTimeout(() => {
559
+ p(...o);
551
560
  }, e);
552
561
  };
553
- }, Ot = (p, e, s) => {
554
- const r = _(p);
555
- return Me((a, d) => ({
562
+ }, Bt = (p, e, s) => {
563
+ const r = k(p);
564
+ return Me((o, i) => ({
556
565
  get() {
557
- return a(), r.value;
566
+ return o(), r.value;
558
567
  },
559
- set: zt(
568
+ set: Nt(
560
569
  (u) => {
561
- r.value = u, d();
570
+ r.value = u, i();
562
571
  },
563
572
  e,
564
573
  s
565
574
  )
566
575
  }));
567
- }, Ut = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm" }, Ht = ["aria-label"], Bt = /* @__PURE__ */ t("path", {
576
+ }, zt = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm" }, Ut = ["aria-label"], Ht = /* @__PURE__ */ t("path", {
568
577
  "fill-rule": "evenodd",
569
578
  d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",
570
579
  "clip-rule": "evenodd"
571
580
  }, null, -1), Rt = [
572
- Bt
581
+ Ht
573
582
  ], qt = ["aria-label"], It = /* @__PURE__ */ t("path", { d: "M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z" }, null, -1), Pt = [
574
583
  It
575
- ], Gt = ["aria-label"], Wt = /* @__PURE__ */ t("path", {
584
+ ], Wt = ["aria-label"], Gt = /* @__PURE__ */ t("path", {
576
585
  "stroke-linecap": "round",
577
586
  "stroke-linejoin": "round",
578
587
  d: "M6 18L18 6M6 6l12 12"
579
588
  }, null, -1), Yt = [
580
- Wt
589
+ Gt
581
590
  ], Kt = /* @__PURE__ */ t("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), Jt = [
582
591
  Kt
583
592
  ], Xt = { class: "flex leading-6" }, Qt = /* @__PURE__ */ t("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), Zt = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], es = {
@@ -597,10 +606,10 @@ const Je = (p, e) => {
597
606
  class: "opacity-75",
598
607
  fill: "currentColor",
599
608
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
600
- }, null, -1), os = [
609
+ }, null, -1), as = [
601
610
  ts,
602
611
  ss
603
- ], as = {
612
+ ], os = {
604
613
  key: 3,
605
614
  class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"
606
615
  }, rs = /* @__PURE__ */ t("div", null, [
@@ -626,76 +635,76 @@ const Je = (p, e) => {
626
635
  name: "VFBreadcrumb"
627
636
  }, cs = /* @__PURE__ */ Object.assign(ds, {
628
637
  setup(p) {
629
- const e = _(null), s = _([]), r = _(!1), a = _(null), d = F("ServiceContainer"), { t: u } = d.i18n;
630
- d.emitter.on("vf-explorer-update", () => {
631
- let E = [], g = [];
632
- e.value = d.data.dirname ?? d.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(d.adapter + "://", "").split("/").forEach(function(f) {
633
- E.push(f), E.join("/") != "" && g.push({
634
- basename: f,
635
- name: f,
636
- path: d.adapter + "://" + E.join("/"),
638
+ const e = k(null), s = k([]), r = k(!1), o = k(null), i = F("ServiceContainer"), { t: u } = i.i18n;
639
+ i.emitter.on("vf-explorer-update", () => {
640
+ let $ = [], f = [];
641
+ e.value = i.data.dirname ?? i.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(i.adapter + "://", "").split("/").forEach(function(h) {
642
+ $.push(h), $.join("/") != "" && f.push({
643
+ basename: h,
644
+ name: h,
645
+ path: i.adapter + "://" + $.join("/"),
637
646
  type: "dir"
638
647
  });
639
- }), g.length > 4 && (g = g.slice(-5), g[0].name = ".."), s.value = g;
648
+ }), f.length > 4 && (f = f.slice(-5), f[0].name = ".."), s.value = f;
640
649
  });
641
- const i = () => {
650
+ const d = () => {
642
651
  r.value = !1, c.value = "";
643
652
  };
644
- d.emitter.on("vf-search-exit", () => {
645
- i();
653
+ i.emitter.on("vf-search-exit", () => {
654
+ d();
646
655
  });
647
656
  const l = () => {
648
- d.features.includes(z.SEARCH) && (r.value = !0, de(() => a.value.focus()));
649
- }, c = Ot("", 400);
650
- ie(c, (E) => {
651
- d.emitter.emit("vf-toast-clear"), d.emitter.emit("vf-search-query", { newQuery: E });
657
+ i.features.includes(B.SEARCH) && (r.value = !0, ce(() => o.value.focus()));
658
+ }, c = Bt("", 400);
659
+ de(c, ($) => {
660
+ i.emitter.emit("vf-toast-clear"), i.emitter.emit("vf-search-query", { newQuery: $ });
652
661
  });
653
- const w = () => s.value.length && !r.value, k = (E, g = null) => {
654
- E.preventDefault(), y(E), g ?? (g = s.value.length - 2);
655
- let f = JSON.parse(E.dataTransfer.getData("items"));
656
- if (f.find((V) => V.storage !== d.adapter)) {
662
+ const g = () => s.value.length && !r.value, _ = ($, f = null) => {
663
+ $.preventDefault(), y($), f ?? (f = s.value.length - 2);
664
+ let h = JSON.parse($.dataTransfer.getData("items"));
665
+ if (h.find((N) => N.storage !== i.adapter)) {
657
666
  alert("Moving items between different storages is not supported yet.");
658
667
  return;
659
668
  }
660
- d.emitter.emit("vf-modal-show", {
669
+ i.emitter.emit("vf-modal-show", {
661
670
  type: "move",
662
- items: { from: f, to: s.value[g] ?? { path: d.adapter + "://" } }
671
+ items: { from: h, to: s.value[f] ?? { path: i.adapter + "://" } }
663
672
  });
664
- }, $ = (E) => {
665
- E.preventDefault(), w() ? (E.dataTransfer.dropEffect = "copy", E.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : (E.dataTransfer.dropEffect = "none", E.dataTransfer.effectAllowed = "none");
666
- }, y = (E) => {
667
- E.preventDefault(), E.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), w() && E.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
668
- }, C = () => {
669
- c.value == "" && i();
673
+ }, w = ($) => {
674
+ $.preventDefault(), g() ? ($.dataTransfer.dropEffect = "copy", $.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : ($.dataTransfer.dropEffect = "none", $.dataTransfer.effectAllowed = "none");
675
+ }, y = ($) => {
676
+ $.preventDefault(), $.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), g() && $.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
677
+ }, E = () => {
678
+ c.value == "" && d();
670
679
  };
671
- return (E, g) => (n(), v("div", Ut, [
680
+ return ($, f) => (n(), m("div", zt, [
672
681
  t("span", {
673
- "aria-label": o(u)("Go up a directory"),
682
+ "aria-label": a(u)("Go up a directory"),
674
683
  "data-microtip-position": "bottom-right",
675
684
  role: "tooltip"
676
685
  }, [
677
- (n(), v("svg", {
678
- onDragover: g[0] || (g[0] = (f) => $(f)),
679
- onDragleave: g[1] || (g[1] = (f) => y(f)),
680
- onDrop: g[2] || (g[2] = (f) => k(f)),
681
- onClick: g[3] || (g[3] = (f) => {
682
- var V;
683
- return !w() || o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: ((V = s.value[s.value.length - 2]) == null ? void 0 : V.path) ?? o(d).adapter + "://" } });
686
+ (n(), m("svg", {
687
+ onDragover: f[0] || (f[0] = (h) => w(h)),
688
+ onDragleave: f[1] || (f[1] = (h) => y(h)),
689
+ onDrop: f[2] || (f[2] = (h) => _(h)),
690
+ onClick: f[3] || (f[3] = (h) => {
691
+ var N;
692
+ return !g() || a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: ((N = s.value[s.value.length - 2]) == null ? void 0 : N.path) ?? a(i).adapter + "://" } });
684
693
  }),
685
- class: U(["h-6 w-6 p-0.5 rounded", w() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
694
+ class: z(["h-6 w-6 p-0.5 rounded", g() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
686
695
  xmlns: "http://www.w3.org/2000/svg",
687
696
  viewBox: "0 0 20 20",
688
697
  fill: "currentColor"
689
698
  }, Rt, 34))
690
- ], 8, Ht),
691
- o(d).loading ? (n(), v("span", {
699
+ ], 8, Ut),
700
+ a(i).loading ? (n(), m("span", {
692
701
  key: 1,
693
- "aria-label": o(u)("Cancel"),
702
+ "aria-label": a(u)("Cancel"),
694
703
  "data-microtip-position": "bottom-right",
695
704
  role: "tooltip"
696
705
  }, [
697
- (n(), v("svg", {
698
- onClick: g[5] || (g[5] = (f) => o(d).emitter.emit("vf-fetch-abort")),
706
+ (n(), m("svg", {
707
+ onClick: f[5] || (f[5] = (h) => a(i).emitter.emit("vf-fetch-abort")),
699
708
  xmlns: "http://www.w3.org/2000/svg",
700
709
  fill: "none",
701
710
  viewBox: "0 0 24 24",
@@ -703,15 +712,15 @@ const Je = (p, e) => {
703
712
  stroke: "currentColor",
704
713
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer"
705
714
  }, Yt))
706
- ], 8, Gt)) : (n(), v("span", {
715
+ ], 8, Wt)) : (n(), m("span", {
707
716
  key: 0,
708
- "aria-label": o(u)("Refresh"),
717
+ "aria-label": a(u)("Refresh"),
709
718
  "data-microtip-position": "bottom-right",
710
719
  role: "tooltip"
711
720
  }, [
712
- (n(), v("svg", {
713
- onClick: g[4] || (g[4] = (f) => {
714
- o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: o(d).data.dirname } });
721
+ (n(), m("svg", {
722
+ onClick: f[4] || (f[4] = (h) => {
723
+ a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: a(i).data.dirname } });
715
724
  }),
716
725
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",
717
726
  xmlns: "http://www.w3.org/2000/svg",
@@ -719,58 +728,58 @@ const Je = (p, e) => {
719
728
  fill: "currentColor"
720
729
  }, Pt))
721
730
  ], 8, qt)),
722
- r.value ? (n(), v("div", as, [
731
+ r.value ? (n(), m("div", os, [
723
732
  rs,
724
733
  q(t("input", {
725
734
  ref_key: "searchInput",
726
- ref: a,
727
- onKeydown: Q(i, ["esc"]),
728
- onBlur: C,
729
- "onUpdate:modelValue": g[10] || (g[10] = (f) => _e(c) ? c.value = f : null),
730
- placeholder: o(u)("Search anything.."),
735
+ ref: o,
736
+ onKeydown: Q(d, ["esc"]),
737
+ onBlur: E,
738
+ "onUpdate:modelValue": f[10] || (f[10] = (h) => _e(c) ? c.value = h : null),
739
+ placeholder: a(u)("Search anything.."),
731
740
  class: "w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",
732
741
  type: "text"
733
742
  }, null, 40, ns), [
734
- [Z, o(c)]
743
+ [Z, a(c)]
735
744
  ]),
736
- (n(), v("svg", {
745
+ (n(), m("svg", {
737
746
  class: "w-6 h-6 cursor-pointer",
738
- onClick: i,
747
+ onClick: d,
739
748
  xmlns: "http://www.w3.org/2000/svg",
740
749
  fill: "none",
741
750
  viewBox: "0 0 24 24",
742
751
  "stroke-width": "1.5",
743
752
  stroke: "currentColor"
744
753
  }, is))
745
- ])) : (n(), v("div", {
754
+ ])) : (n(), m("div", {
746
755
  key: 2,
747
756
  class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
748
757
  onClick: Y(l, ["self"])
749
758
  }, [
750
- (n(), v("svg", {
751
- onDragover: g[6] || (g[6] = (f) => $(f)),
752
- onDragleave: g[7] || (g[7] = (f) => y(f)),
753
- onDrop: g[8] || (g[8] = (f) => k(f, -1)),
754
- onClick: g[9] || (g[9] = (f) => o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter } })),
759
+ (n(), m("svg", {
760
+ onDragover: f[6] || (f[6] = (h) => w(h)),
761
+ onDragleave: f[7] || (f[7] = (h) => y(h)),
762
+ onDrop: f[8] || (f[8] = (h) => _(h, -1)),
763
+ onClick: f[9] || (f[9] = (h) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter } })),
755
764
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",
756
765
  xmlns: "http://www.w3.org/2000/svg",
757
766
  viewBox: "0 0 20 20",
758
767
  fill: "currentColor"
759
768
  }, Jt, 32)),
760
769
  t("div", Xt, [
761
- (n(!0), v(H, null, I(s.value, (f, V) => (n(), v("div", { key: V }, [
770
+ (n(!0), m(U, null, I(s.value, (h, N) => (n(), m("div", { key: N }, [
762
771
  Qt,
763
772
  t("span", {
764
- onDragover: (R) => V === s.value.length - 1 || $(R),
765
- onDragleave: (R) => V === s.value.length - 1 || y(R),
766
- onDrop: (R) => V === s.value.length - 1 || k(R, V),
773
+ onDragover: (R) => N === s.value.length - 1 || w(R),
774
+ onDragleave: (R) => N === s.value.length - 1 || y(R),
775
+ onDrop: (R) => N === s.value.length - 1 || _(R, N),
767
776
  class: "px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",
768
- title: f.basename,
769
- onClick: (R) => o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: f.path } })
770
- }, m(f.name), 41, Zt)
777
+ title: h.basename,
778
+ onClick: (R) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: h.path } })
779
+ }, v(h.name), 41, Zt)
771
780
  ]))), 128))
772
781
  ]),
773
- o(d).loading ? (n(), v("svg", es, os)) : M("", !0)
782
+ a(i).loading ? (n(), m("svg", es, as)) : M("", !0)
774
783
  ]))
775
784
  ]));
776
785
  }
@@ -800,45 +809,45 @@ const Je = (p, e) => {
800
809
  hs
801
810
  ], gs = {
802
811
  name: "VFSortIcon"
803
- }, re = /* @__PURE__ */ Object.assign(gs, {
812
+ }, ne = /* @__PURE__ */ Object.assign(gs, {
804
813
  props: { direction: String },
805
814
  setup(p) {
806
- return (e, s) => (n(), v("div", null, [
807
- p.direction === "down" ? (n(), v("svg", us, vs)) : M("", !0),
808
- p.direction === "up" ? (n(), v("svg", ps, fs)) : M("", !0)
815
+ return (e, s) => (n(), m("div", null, [
816
+ p.direction === "down" ? (n(), m("svg", us, vs)) : M("", !0),
817
+ p.direction === "up" ? (n(), m("svg", ps, fs)) : M("", !0)
809
818
  ]));
810
819
  }
811
820
  }), _s = ["onClick"], ks = {
812
821
  name: "VFToast.vue"
813
822
  }, bs = /* @__PURE__ */ Object.assign(ks, {
814
823
  setup(p) {
815
- const e = F("ServiceContainer"), { getStore: s } = e.storage, r = _(s("full-screen", !1)), a = _([]), d = (l) => l === "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", u = (l) => {
816
- a.value.splice(l, 1);
817
- }, i = (l) => {
818
- let c = a.value.findIndex((w) => w.id === l);
824
+ const e = F("ServiceContainer"), { getStore: s } = e.storage, r = k(s("full-screen", !1)), o = k([]), i = (l) => l === "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", u = (l) => {
825
+ o.value.splice(l, 1);
826
+ }, d = (l) => {
827
+ let c = o.value.findIndex((g) => g.id === l);
819
828
  c !== -1 && u(c);
820
829
  };
821
830
  return e.emitter.on("vf-toast-clear", () => {
822
- a.value = [];
831
+ o.value = [];
823
832
  }), e.emitter.on("vf-toast-push", (l) => {
824
833
  let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
825
- l.id = c, a.value.push(l), setTimeout(() => {
826
- i(c);
834
+ l.id = c, o.value.push(l), setTimeout(() => {
835
+ d(c);
827
836
  }, 5e3);
828
- }), (l, c) => (n(), v("div", {
829
- class: U([r.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
837
+ }), (l, c) => (n(), m("div", {
838
+ class: z([r.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
830
839
  }, [
831
- B(Ee, {
840
+ H(Ee, {
832
841
  name: "vf-toast-item",
833
842
  "leave-active-class": "transition-all duration-1000",
834
843
  "leave-to-class": "opacity-0"
835
844
  }, {
836
- default: j(() => [
837
- (n(!0), v(H, null, I(a.value, (w, k) => (n(), v("div", {
838
- onClick: ($) => u(k),
839
- key: w,
840
- class: U([d(w.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])
841
- }, m(w.label), 11, _s))), 128))
845
+ default: A(() => [
846
+ (n(!0), m(U, null, I(o.value, (g, _) => (n(), m("div", {
847
+ onClick: (w) => u(_),
848
+ key: g,
849
+ class: z([i(g.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])
850
+ }, v(g.label), 11, _s))), 128))
842
851
  ]),
843
852
  _: 1
844
853
  })
@@ -846,7 +855,7 @@ const Je = (p, e) => {
846
855
  }
847
856
  });
848
857
  function he(p, e = 14) {
849
- let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;
858
+ let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e + 1},})([\\w\\W]{8,}))`;
850
859
  return p.replace(new RegExp(s), "$2..$4");
851
860
  }
852
861
  const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
@@ -879,7 +888,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
879
888
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
880
889
  }, null, -1), As = [
881
890
  js
882
- ], Ts = {
891
+ ], Ls = {
883
892
  key: 1,
884
893
  xmlns: "http://www.w3.org/2000/svg",
885
894
  class: "h-5 w-5 text-neutral-500",
@@ -887,13 +896,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
887
896
  viewBox: "0 0 24 24",
888
897
  stroke: "currentColor",
889
898
  "stroke-width": "1"
890
- }, Ls = /* @__PURE__ */ t("path", {
899
+ }, Ts = /* @__PURE__ */ t("path", {
891
900
  "stroke-linecap": "round",
892
901
  "stroke-linejoin": "round",
893
902
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
894
903
  }, null, -1), Fs = [
895
- Ls
896
- ], Ns = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Vs = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, zs = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Os = { class: "grid grid-cols-12 items-center" }, Us = { class: "flex col-span-7 items-center" }, Hs = {
904
+ Ts
905
+ ], Os = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Vs = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ns = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Bs = { class: "grid grid-cols-12 items-center" }, zs = { class: "flex col-span-7 items-center" }, Us = {
897
906
  key: 0,
898
907
  xmlns: "http://www.w3.org/2000/svg",
899
908
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -901,12 +910,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
901
910
  viewBox: "0 0 24 24",
902
911
  stroke: "currentColor",
903
912
  "stroke-width": "1"
904
- }, Bs = /* @__PURE__ */ t("path", {
913
+ }, Hs = /* @__PURE__ */ t("path", {
905
914
  "stroke-linecap": "round",
906
915
  "stroke-linejoin": "round",
907
916
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
908
917
  }, null, -1), Rs = [
909
- Bs
918
+ Hs
910
919
  ], qs = {
911
920
  key: 1,
912
921
  xmlns: "http://www.w3.org/2000/svg",
@@ -921,7 +930,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
921
930
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
922
931
  }, null, -1), Ps = [
923
932
  Is
924
- ], Gs = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ws = { class: "col-span-2 text-center" }, Ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ks = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Js = { class: "relative" }, Xs = {
933
+ ], Ws = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Gs = { class: "col-span-2 text-center" }, Ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ks = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Js = { class: "relative" }, Xs = {
925
934
  key: 0,
926
935
  xmlns: "http://www.w3.org/2000/svg",
927
936
  class: "h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -935,7 +944,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
935
944
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
936
945
  }, null, -1), Zs = [
937
946
  Qs
938
- ], eo = ["data-src", "alt"], to = {
947
+ ], ea = ["data-src", "alt"], ta = {
939
948
  key: 2,
940
949
  xmlns: "http://www.w3.org/2000/svg",
941
950
  class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
@@ -943,25 +952,25 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
943
952
  viewBox: "0 0 24 24",
944
953
  stroke: "currentColor",
945
954
  "stroke-width": "1"
946
- }, so = /* @__PURE__ */ t("path", {
955
+ }, sa = /* @__PURE__ */ t("path", {
947
956
  "stroke-linecap": "round",
948
957
  "stroke-linejoin": "round",
949
958
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
950
- }, null, -1), oo = [
951
- so
952
- ], ao = {
959
+ }, null, -1), aa = [
960
+ sa
961
+ ], oa = {
953
962
  key: 3,
954
963
  class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
955
- }, ro = { class: "break-all" }, no = {
964
+ }, ra = { class: "break-all" }, na = {
956
965
  name: "VFExplorer"
957
- }, lo = /* @__PURE__ */ Object.assign(no, {
966
+ }, la = /* @__PURE__ */ Object.assign(na, {
958
967
  setup(p) {
959
968
  const e = F("ServiceContainer"), { t: s } = e.i18n;
960
969
  e.storage;
961
- const r = (x) => x == null ? void 0 : x.substring(0, 3), a = _(null), d = _(null), u = _(0), i = _(null), l = Math.floor(Math.random() * 2 ** 32), c = _("");
962
- let w;
970
+ const r = (x) => x == null ? void 0 : x.substring(0, 3), o = k(null), i = k(null), u = k(0), d = k(null), l = Math.floor(Math.random() * 2 ** 32), c = k("");
971
+ let g;
963
972
  e.emitter.on("vf-fullscreen-toggle", () => {
964
- a.value.style.height = null;
973
+ o.value.style.height = null;
965
974
  }), e.emitter.on("vf-search-query", ({ newQuery: x }) => {
966
975
  c.value = x, x ? e.emitter.emit("vf-fetch", {
967
976
  params: {
@@ -975,13 +984,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
975
984
  }
976
985
  }) : e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
977
986
  });
978
- let k = null;
979
- const $ = () => {
980
- k && clearTimeout(k);
981
- }, y = _(!0), C = (x) => {
982
- x.touches.length > 1 && (y.value ? (i.value.stop(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: off") })) : (i.value.start(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: on") }), e.emitter.emit("vf-explorer-update")), y.value = !y.value);
983
- }, E = (x) => {
984
- k = setTimeout(() => {
987
+ let _ = null;
988
+ const w = () => {
989
+ _ && clearTimeout(_);
990
+ }, y = k(!0), E = (x) => {
991
+ x.touches.length > 1 && (y.value ? (d.value.stop(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: off") })) : (d.value.start(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: on") }), e.emitter.emit("vf-explorer-update")), y.value = !y.value);
992
+ }, $ = (x) => {
993
+ _ = setTimeout(() => {
985
994
  const D = new MouseEvent("contextmenu", {
986
995
  bubbles: !0,
987
996
  cancelable: !1,
@@ -993,228 +1002,228 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
993
1002
  });
994
1003
  x.target.dispatchEvent(D);
995
1004
  }, 500);
996
- }, g = (x) => {
1005
+ }, f = (x) => {
997
1006
  x.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: x.path } })) : e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: x });
998
- }, f = le({ active: !1, column: "", order: "" }), V = (x = !0) => {
999
- let D = [...e.data.files], h = f.column, A = f.order == "asc" ? 1 : -1;
1007
+ }, h = ie({ active: !1, column: "", order: "" }), N = (x = !0) => {
1008
+ let D = [...e.data.files], C = h.column, j = h.order == "asc" ? 1 : -1;
1000
1009
  if (!x)
1001
1010
  return D;
1002
- const b = (S, T) => typeof S == "string" && typeof T == "string" ? S.toLowerCase().localeCompare(T.toLowerCase()) : S < T ? -1 : S > T ? 1 : 0;
1003
- return f.active && (D = D.slice().sort((S, T) => b(S[h], T[h]) * A)), D;
1011
+ const S = (b, L) => typeof b == "string" && typeof L == "string" ? b.toLowerCase().localeCompare(L.toLowerCase()) : b < L ? -1 : b > L ? 1 : 0;
1012
+ return h.active && (D = D.slice().sort((b, L) => S(b[C], L[C]) * j)), D;
1004
1013
  }, R = (x) => {
1005
- f.active && f.column == x ? (f.active = f.order == "asc", f.column = x, f.order = "desc") : (f.active = !0, f.column = x, f.order = "asc");
1006
- }, K = () => i.value.getSelection().map((x) => JSON.parse(x.dataset.item)), ee = (x, D) => {
1014
+ h.active && h.column == x ? (h.active = h.order == "asc", h.column = x, h.order = "desc") : (h.active = !0, h.column = x, h.order = "asc");
1015
+ }, K = () => d.value.getSelection().map((x) => JSON.parse(x.dataset.item)), te = (x, D) => {
1007
1016
  if (x.altKey || x.ctrlKey || x.metaKey)
1008
1017
  return x.preventDefault(), !1;
1009
- x.dataTransfer.setDragImage(d.value, 0, 15), x.dataTransfer.effectAllowed = "all", x.dataTransfer.dropEffect = "copy", x.dataTransfer.setData("items", JSON.stringify(K()));
1010
- }, te = (x, D) => {
1018
+ x.dataTransfer.setDragImage(i.value, 0, 15), x.dataTransfer.effectAllowed = "all", x.dataTransfer.dropEffect = "copy", x.dataTransfer.setData("items", JSON.stringify(K()));
1019
+ }, se = (x, D) => {
1011
1020
  x.preventDefault();
1012
- let h = JSON.parse(x.dataTransfer.getData("items"));
1013
- if (h.find((A) => A.storage !== e.adapter)) {
1021
+ let C = JSON.parse(x.dataTransfer.getData("items"));
1022
+ if (C.find((j) => j.storage !== e.adapter)) {
1014
1023
  alert("Moving items between different storages is not supported yet.");
1015
1024
  return;
1016
1025
  }
1017
- e.emitter.emit("vf-modal-show", { type: "move", items: { from: h, to: D } });
1018
- }, se = (x, D) => {
1019
- x.preventDefault(), !D || D.type !== "dir" || i.value.getSelection().find((h) => h == x.currentTarget) ? (x.dataTransfer.dropEffect = "none", x.dataTransfer.effectAllowed = "none") : x.dataTransfer.dropEffect = "copy";
1026
+ e.emitter.emit("vf-modal-show", { type: "move", items: { from: C, to: D } });
1027
+ }, ae = (x, D) => {
1028
+ x.preventDefault(), !D || D.type !== "dir" || d.value.getSelection().find((C) => C == x.currentTarget) ? (x.dataTransfer.dropEffect = "none", x.dataTransfer.effectAllowed = "none") : x.dataTransfer.dropEffect = "copy";
1020
1029
  }, oe = () => {
1021
- i.value = new Ve({
1022
- area: a.value,
1030
+ d.value = new Ve({
1031
+ area: o.value,
1023
1032
  keyboardDrag: !1,
1024
1033
  selectedClass: "vf-explorer-selected",
1025
1034
  selectorClass: "vf-explorer-selector"
1026
- }), e.emitter.on("vf-explorer-update", () => de(() => {
1027
- i.value.clearSelection(), i.value.setSettings({
1035
+ }), e.emitter.on("vf-explorer-update", () => ce(() => {
1036
+ d.value.clearSelection(), d.value.setSettings({
1028
1037
  selectables: document.getElementsByClassName("vf-item-" + l)
1029
1038
  });
1030
- })), i.value.subscribe("predragstart", ({ event: x, isDragging: D }) => {
1039
+ })), d.value.subscribe("predragstart", ({ event: x, isDragging: D }) => {
1031
1040
  if (D)
1032
- u.value = i.value.getSelection().length, i.value.break();
1041
+ u.value = d.value.getSelection().length, d.value.break();
1033
1042
  else {
1034
- const h = x.target.offsetWidth - x.offsetX, A = x.target.offsetHeight - x.offsetY;
1035
- h < 15 && A < 15 && (i.value.clearSelection(), i.value.break());
1043
+ const C = x.target.offsetWidth - x.offsetX, j = x.target.offsetHeight - x.offsetY;
1044
+ C < 15 && j < 15 && (d.value.clearSelection(), d.value.break());
1036
1045
  }
1037
- }), i.value.subscribe("predragmove", ({ isDragging: x }) => {
1038
- x && i.value.break();
1039
- }), i.value.subscribe("callback", ({ items: x, event: D, isDragging: h }) => {
1040
- e.emitter.emit("vf-nodes-selected", K()), u.value = i.value.getSelection().length;
1046
+ }), d.value.subscribe("predragmove", ({ isDragging: x }) => {
1047
+ x && d.value.break();
1048
+ }), d.value.subscribe("callback", ({ items: x, event: D, isDragging: C }) => {
1049
+ e.emitter.emit("vf-nodes-selected", K()), u.value = d.value.getSelection().length;
1041
1050
  });
1042
1051
  };
1043
1052
  return P(() => {
1044
- w = new ze(a.value), oe();
1053
+ g = new Ne(o.value), oe();
1045
1054
  }), De(() => {
1046
- i.value.Area.reset(), i.value.SelectorArea.updatePos(), w.update();
1055
+ d.value.Area.reset(), d.value.SelectorArea.updatePos(), g.update();
1047
1056
  }), P(() => {
1048
- ie(() => e.view, () => e.emitter.emit("vf-explorer-update"));
1057
+ de(() => e.view, () => e.emitter.emit("vf-explorer-update"));
1049
1058
  }), ke(() => {
1050
- w.destroy();
1051
- }), (x, D) => (n(), v("div", ys, [
1052
- o(e).view == "list" || c.value.length ? (n(), v("div", xs, [
1059
+ g.destroy();
1060
+ }), (x, D) => (n(), m("div", ys, [
1061
+ a(e).view == "list" || c.value.length ? (n(), m("div", xs, [
1053
1062
  t("div", {
1054
- onClick: D[0] || (D[0] = (h) => R("basename")),
1063
+ onClick: D[0] || (D[0] = (C) => R("basename")),
1055
1064
  class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"
1056
1065
  }, [
1057
- N(m(o(s)("Name")) + " ", 1),
1058
- q(B(re, {
1059
- direction: f.order == "asc" ? "down" : "up"
1066
+ V(v(a(s)("Name")) + " ", 1),
1067
+ q(H(ne, {
1068
+ direction: h.order == "asc" ? "down" : "up"
1060
1069
  }, null, 8, ["direction"]), [
1061
- [ae, f.active && f.column == "basename"]
1070
+ [re, h.active && h.column == "basename"]
1062
1071
  ])
1063
1072
  ]),
1064
- c.value.length ? M("", !0) : (n(), v("div", {
1073
+ c.value.length ? M("", !0) : (n(), m("div", {
1065
1074
  key: 0,
1066
- onClick: D[1] || (D[1] = (h) => R("file_size")),
1075
+ onClick: D[1] || (D[1] = (C) => R("file_size")),
1067
1076
  class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"
1068
1077
  }, [
1069
- N(m(o(s)("Size")) + " ", 1),
1070
- q(B(re, {
1071
- direction: f.order == "asc" ? "down" : "up"
1078
+ V(v(a(s)("Size")) + " ", 1),
1079
+ q(H(ne, {
1080
+ direction: h.order == "asc" ? "down" : "up"
1072
1081
  }, null, 8, ["direction"]), [
1073
- [ae, f.active && f.column == "file_size"]
1082
+ [re, h.active && h.column == "file_size"]
1074
1083
  ])
1075
1084
  ])),
1076
- c.value.length ? M("", !0) : (n(), v("div", {
1085
+ c.value.length ? M("", !0) : (n(), m("div", {
1077
1086
  key: 1,
1078
- onClick: D[2] || (D[2] = (h) => R("last_modified")),
1087
+ onClick: D[2] || (D[2] = (C) => R("last_modified")),
1079
1088
  class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"
1080
1089
  }, [
1081
- N(m(o(s)("Date")) + " ", 1),
1082
- q(B(re, {
1083
- direction: f.order == "asc" ? "down" : "up"
1090
+ V(v(a(s)("Date")) + " ", 1),
1091
+ q(H(ne, {
1092
+ direction: h.order == "asc" ? "down" : "up"
1084
1093
  }, null, 8, ["direction"]), [
1085
- [ae, f.active && f.column == "last_modified"]
1094
+ [re, h.active && h.column == "last_modified"]
1086
1095
  ])
1087
1096
  ])),
1088
- c.value.length ? (n(), v("div", {
1097
+ c.value.length ? (n(), m("div", {
1089
1098
  key: 2,
1090
- onClick: D[3] || (D[3] = (h) => R("path")),
1099
+ onClick: D[3] || (D[3] = (C) => R("path")),
1091
1100
  class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"
1092
1101
  }, [
1093
- N(m(o(s)("Filepath")) + " ", 1),
1094
- q(B(re, {
1095
- direction: f.order == "asc" ? "down" : "up"
1102
+ V(v(a(s)("Filepath")) + " ", 1),
1103
+ q(H(ne, {
1104
+ direction: h.order == "asc" ? "down" : "up"
1096
1105
  }, null, 8, ["direction"]), [
1097
- [ae, f.active && f.column == "path"]
1106
+ [re, h.active && h.column == "path"]
1098
1107
  ])
1099
1108
  ])) : M("", !0)
1100
1109
  ])) : M("", !0),
1101
1110
  t("div", ws, [
1102
1111
  t("div", {
1103
1112
  ref_key: "dragImage",
1104
- ref: d,
1113
+ ref: i,
1105
1114
  class: "absolute -z-50 -top-96"
1106
1115
  }, [
1107
1116
  $s,
1108
- t("div", Cs, m(u.value), 1)
1117
+ t("div", Cs, v(u.value), 1)
1109
1118
  ], 512)
1110
1119
  ]),
1111
1120
  t("div", {
1112
- onTouchstart: C,
1113
- onContextmenu: D[10] || (D[10] = Y((h) => o(e).emitter.emit("vf-contextmenu-show", { event: h, area: a.value, items: K() }), ["self", "prevent"])),
1114
- class: U([o(e).fullscreen ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
1121
+ onTouchstart: E,
1122
+ onContextmenu: D[10] || (D[10] = Y((C) => a(e).emitter.emit("vf-contextmenu-show", { event: C, area: o.value, items: K() }), ["self", "prevent"])),
1123
+ class: z([a(e).fullScreen ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
1115
1124
  ref_key: "selectorArea",
1116
- ref: a
1125
+ ref: o
1117
1126
  }, [
1118
- c.value.length ? (n(!0), v(H, { key: 0 }, I(V(), (h, A) => (n(), v("div", {
1119
- onDblclick: (b) => g(h),
1120
- onTouchstart: D[4] || (D[4] = (b) => E(b)),
1121
- onTouchend: D[5] || (D[5] = (b) => $()),
1122
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1123
- class: U(["vf-item-" + o(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1124
- "data-type": h.type,
1125
- "data-item": JSON.stringify(h),
1126
- "data-index": A
1127
+ c.value.length ? (n(!0), m(U, { key: 0 }, I(N(), (C, j) => (n(), m("div", {
1128
+ onDblclick: (S) => f(C),
1129
+ onTouchstart: D[4] || (D[4] = (S) => $(S)),
1130
+ onTouchend: D[5] || (D[5] = (S) => w()),
1131
+ onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
1132
+ class: z(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1133
+ "data-type": C.type,
1134
+ "data-item": JSON.stringify(C),
1135
+ "data-index": j
1127
1136
  }, [
1128
1137
  t("div", Ms, [
1129
1138
  t("div", Es, [
1130
- h.type === "dir" ? (n(), v("svg", Ds, As)) : (n(), v("svg", Ts, Fs)),
1131
- t("span", Ns, m(h.basename), 1)
1139
+ C.type === "dir" ? (n(), m("svg", Ds, As)) : (n(), m("svg", Ls, Fs)),
1140
+ t("span", Os, v(C.basename), 1)
1132
1141
  ]),
1133
- t("div", Vs, m(h.path), 1)
1142
+ t("div", Vs, v(C.path), 1)
1134
1143
  ])
1135
1144
  ], 42, Ss))), 256)) : M("", !0),
1136
- o(e).view === "list" && !c.value.length ? (n(!0), v(H, { key: 1 }, I(V(), (h, A) => (n(), v("div", {
1145
+ a(e).view === "list" && !c.value.length ? (n(!0), m(U, { key: 1 }, I(N(), (C, j) => (n(), m("div", {
1137
1146
  draggable: "true",
1138
- onDblclick: (b) => g(h),
1139
- onTouchstart: D[6] || (D[6] = (b) => E(b)),
1140
- onTouchend: D[7] || (D[7] = (b) => $()),
1141
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1142
- onDragstart: (b) => ee(b),
1143
- onDragover: (b) => se(b, h),
1144
- onDrop: (b) => te(b, h),
1145
- class: U(["vf-item-" + o(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1146
- "data-type": h.type,
1147
- "data-item": JSON.stringify(h),
1148
- "data-index": A
1147
+ onDblclick: (S) => f(C),
1148
+ onTouchstart: D[6] || (D[6] = (S) => $(S)),
1149
+ onTouchend: D[7] || (D[7] = (S) => w()),
1150
+ onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
1151
+ onDragstart: (S) => te(S),
1152
+ onDragover: (S) => ae(S, C),
1153
+ onDrop: (S) => se(S, C),
1154
+ class: z(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1155
+ "data-type": C.type,
1156
+ "data-item": JSON.stringify(C),
1157
+ "data-index": j
1149
1158
  }, [
1150
- t("div", Os, [
1151
- t("div", Us, [
1152
- h.type === "dir" ? (n(), v("svg", Hs, Rs)) : (n(), v("svg", qs, Ps)),
1153
- t("span", Gs, m(h.basename), 1)
1159
+ t("div", Bs, [
1160
+ t("div", zs, [
1161
+ C.type === "dir" ? (n(), m("svg", Us, Rs)) : (n(), m("svg", qs, Ps)),
1162
+ t("span", Ws, v(C.basename), 1)
1154
1163
  ]),
1155
- t("div", Ws, m(h.file_size ? o(e).filesize(h.file_size) : ""), 1),
1156
- t("div", Ys, m(o(we)(h.last_modified)), 1)
1164
+ t("div", Gs, v(C.file_size ? a(e).filesize(C.file_size) : ""), 1),
1165
+ t("div", Ys, v(a(we)(C.last_modified)), 1)
1157
1166
  ])
1158
- ], 42, zs))), 256)) : M("", !0),
1159
- o(e).view === "grid" && !c.value.length ? (n(!0), v(H, { key: 2 }, I(V(!1), (h, A) => (n(), v("div", {
1167
+ ], 42, Ns))), 256)) : M("", !0),
1168
+ a(e).view === "grid" && !c.value.length ? (n(!0), m(U, { key: 2 }, I(N(!1), (C, j) => (n(), m("div", {
1160
1169
  draggable: "true",
1161
- onDblclick: (b) => g(h),
1162
- onTouchstart: D[8] || (D[8] = (b) => E(b)),
1163
- onTouchend: D[9] || (D[9] = (b) => $()),
1164
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1165
- onDragstart: (b) => ee(b),
1166
- onDragover: (b) => se(b, h),
1167
- onDrop: (b) => te(b, h),
1168
- class: U(["vf-item-" + o(l), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
1169
- "data-type": h.type,
1170
- "data-item": JSON.stringify(h),
1171
- "data-index": A
1170
+ onDblclick: (S) => f(C),
1171
+ onTouchstart: D[8] || (D[8] = (S) => $(S)),
1172
+ onTouchend: D[9] || (D[9] = (S) => w()),
1173
+ onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
1174
+ onDragstart: (S) => te(S),
1175
+ onDragover: (S) => ae(S, C),
1176
+ onDrop: (S) => se(S, C),
1177
+ class: z(["vf-item-" + a(l), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
1178
+ "data-type": C.type,
1179
+ "data-item": JSON.stringify(C),
1180
+ "data-index": j
1172
1181
  }, [
1173
1182
  t("div", null, [
1174
1183
  t("div", Js, [
1175
- h.type === "dir" ? (n(), v("svg", Xs, Zs)) : (h.mime_type ?? "").startsWith("image") ? (n(), v("img", {
1184
+ C.type === "dir" ? (n(), m("svg", Xs, Zs)) : (C.mime_type ?? "").startsWith("image") ? (n(), m("img", {
1176
1185
  key: 1,
1177
1186
  class: "lazy h-10 md:h-12 m-auto",
1178
- "data-src": o(e).requester.getPreviewUrl(o(e).adapter, h),
1179
- alt: h.basename
1180
- }, null, 8, eo)) : (n(), v("svg", to, oo)),
1181
- !(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(), v("div", ao, m(r(h.extension)), 1)) : M("", !0)
1187
+ "data-src": a(e).requester.getPreviewUrl(a(e).adapter, C),
1188
+ alt: C.basename
1189
+ }, null, 8, ea)) : (n(), m("svg", ta, aa)),
1190
+ !(C.mime_type ?? "").startsWith("image") && C.type != "dir" ? (n(), m("div", oa, v(r(C.extension)), 1)) : M("", !0)
1182
1191
  ]),
1183
- t("span", ro, m(o(he)(h.basename)), 1)
1192
+ t("span", ra, v(a(he)(C.basename)), 1)
1184
1193
  ])
1185
1194
  ], 42, Ks))), 256)) : M("", !0)
1186
1195
  ], 34),
1187
- B(bs)
1196
+ H(bs)
1188
1197
  ]));
1189
1198
  }
1190
- }), io = ["onClick"], co = ["href", "download"], uo = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), mo = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), vo = {
1199
+ }), ia = ["onClick"], da = ["href", "download"], ca = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ua = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ma = {
1191
1200
  name: "VFContextMenu"
1192
- }, po = /* @__PURE__ */ Object.assign(vo, {
1201
+ }, va = /* @__PURE__ */ Object.assign(ma, {
1193
1202
  setup(p) {
1194
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = _(null), a = _([]), d = _(""), u = le({
1203
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = k(null), o = k([]), i = k(""), u = ie({
1195
1204
  active: !1,
1196
1205
  items: [],
1197
1206
  positions: {
1198
1207
  left: 0,
1199
1208
  top: 0
1200
1209
  }
1201
- }), i = ve(() => u.items.filter((k) => k.key == null || e.features.includes(k.key)));
1202
- e.emitter.on("vf-context-selected", (k) => {
1203
- a.value = k;
1210
+ }), d = ee(() => u.items.filter((_) => _.key == null || e.features.includes(_.key)));
1211
+ e.emitter.on("vf-context-selected", (_) => {
1212
+ o.value = _;
1204
1213
  });
1205
1214
  const l = {
1206
1215
  newfolder: {
1207
- key: z.NEW_FOLDER,
1216
+ key: B.NEW_FOLDER,
1208
1217
  title: () => s("New Folder"),
1209
1218
  action: () => {
1210
1219
  e.emitter.emit("vf-modal-show", { type: "new-folder" });
1211
1220
  }
1212
1221
  },
1213
1222
  delete: {
1214
- key: z.DELETE,
1223
+ key: B.DELETE,
1215
1224
  title: () => s("Delete"),
1216
1225
  action: () => {
1217
- e.emitter.emit("vf-modal-show", { type: "delete", items: a });
1226
+ e.emitter.emit("vf-modal-show", { type: "delete", items: o });
1218
1227
  }
1219
1228
  },
1220
1229
  refresh: {
@@ -1224,109 +1233,109 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1224
1233
  }
1225
1234
  },
1226
1235
  preview: {
1227
- key: z.PREVIEW,
1236
+ key: B.PREVIEW,
1228
1237
  title: () => s("Preview"),
1229
1238
  action: () => {
1230
- e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: a.value[0] });
1239
+ e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: o.value[0] });
1231
1240
  }
1232
1241
  },
1233
1242
  open: {
1234
1243
  title: () => s("Open"),
1235
1244
  action: () => {
1236
- e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: a.value[0].path } });
1245
+ e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].path } });
1237
1246
  }
1238
1247
  },
1239
1248
  openDir: {
1240
1249
  title: () => s("Open containing folder"),
1241
1250
  action: () => {
1242
- e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: a.value[0].dir } });
1251
+ e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].dir } });
1243
1252
  }
1244
1253
  },
1245
1254
  download: {
1246
- key: z.DOWNLOAD,
1247
- link: ve(() => e.requester.getDownloadUrl(e.data.adapter, a.value[0])),
1255
+ key: B.DOWNLOAD,
1256
+ link: ee(() => e.requester.getDownloadUrl(e.data.adapter, o.value[0])),
1248
1257
  title: () => s("Download"),
1249
1258
  action: () => {
1250
- const k = e.requester.getDownloadUrl(e.data.adapter, a.value[0]);
1251
- e.emitter.emit("vf-download", k);
1259
+ const _ = e.requester.getDownloadUrl(e.data.adapter, o.value[0]);
1260
+ e.emitter.emit("vf-download", _);
1252
1261
  }
1253
1262
  },
1254
1263
  archive: {
1255
- key: z.ARCHIVE,
1264
+ key: B.ARCHIVE,
1256
1265
  title: () => s("Archive"),
1257
1266
  action: () => {
1258
- e.emitter.emit("vf-modal-show", { type: "archive", items: a });
1267
+ e.emitter.emit("vf-modal-show", { type: "archive", items: o });
1259
1268
  }
1260
1269
  },
1261
1270
  unarchive: {
1262
- key: z.UNARCHIVE,
1271
+ key: B.UNARCHIVE,
1263
1272
  title: () => s("Unarchive"),
1264
1273
  action: () => {
1265
- e.emitter.emit("vf-modal-show", { type: "unarchive", items: a });
1274
+ e.emitter.emit("vf-modal-show", { type: "unarchive", items: o });
1266
1275
  }
1267
1276
  },
1268
1277
  rename: {
1269
- key: z.RENAME,
1278
+ key: B.RENAME,
1270
1279
  title: () => s("Rename"),
1271
1280
  action: () => {
1272
- e.emitter.emit("vf-modal-show", { type: "rename", items: a });
1281
+ e.emitter.emit("vf-modal-show", { type: "rename", items: o });
1273
1282
  }
1274
1283
  }
1275
- }, c = (k) => {
1276
- e.emitter.emit("vf-contextmenu-hide"), k.action();
1284
+ }, c = (_) => {
1285
+ e.emitter.emit("vf-contextmenu-hide"), _.action();
1277
1286
  };
1278
- e.emitter.on("vf-search-query", ({ newQuery: k }) => {
1279
- d.value = k;
1280
- }), e.emitter.on("vf-contextmenu-show", ({ event: k, area: $, items: y, target: C = null }) => {
1281
- if (u.items = [], d.value)
1282
- if (C)
1283
- u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [C]);
1287
+ e.emitter.on("vf-search-query", ({ newQuery: _ }) => {
1288
+ i.value = _;
1289
+ }), e.emitter.on("vf-contextmenu-show", ({ event: _, area: w, items: y, target: E = null }) => {
1290
+ if (u.items = [], i.value)
1291
+ if (E)
1292
+ u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [E]);
1284
1293
  else
1285
1294
  return;
1286
1295
  else
1287
- !C && !d.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : y.length > 1 && y.some((E) => E.path === C.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", y)) : (C.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), C.mime_type == "application/zip" ? u.items.push(l.unarchive) : u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", [C]));
1288
- w(k, $);
1296
+ !E && !i.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : y.length > 1 && y.some(($) => $.path === E.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", y)) : (E.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), E.mime_type == "application/zip" ? u.items.push(l.unarchive) : u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", [E]));
1297
+ g(_, w);
1289
1298
  }), e.emitter.on("vf-contextmenu-hide", () => {
1290
1299
  u.active = !1;
1291
1300
  });
1292
- const w = (k, $) => {
1293
- u.active = !0, de(() => {
1294
- const y = e.root.getBoundingClientRect(), C = $.getBoundingClientRect();
1295
- let E = k.pageX - y.left, g = k.pageY - y.top, f = r.value.offsetHeight, V = r.value.offsetWidth;
1296
- E = C.right - k.pageX + window.scrollX < V ? E - V : E, g = C.bottom - k.pageY + window.scrollY < f ? g - f : g, u.positions = {
1297
- left: E + "px",
1298
- top: g + "px"
1301
+ const g = (_, w) => {
1302
+ u.active = !0, ce(() => {
1303
+ const y = e.root.getBoundingClientRect(), E = w.getBoundingClientRect();
1304
+ let $ = _.pageX - y.left, f = _.pageY - y.top, h = r.value.offsetHeight, N = r.value.offsetWidth;
1305
+ $ = E.right - _.pageX + window.scrollX < N ? $ - N : $, f = E.bottom - _.pageY + window.scrollY < h ? f - h : f, u.positions = {
1306
+ left: $ + "px",
1307
+ top: f + "px"
1299
1308
  };
1300
1309
  });
1301
1310
  };
1302
- return (k, $) => u.active ? (n(), v("ul", {
1311
+ return (_, w) => u.active ? (n(), m("ul", {
1303
1312
  key: 0,
1304
1313
  class: "z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",
1305
1314
  ref_key: "contextmenu",
1306
1315
  ref: r,
1307
1316
  style: be(u.positions)
1308
1317
  }, [
1309
- (n(!0), v(H, null, I(i.value, (y) => (n(), v("li", {
1318
+ (n(!0), m(U, null, I(d.value, (y) => (n(), m("li", {
1310
1319
  class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
1311
1320
  key: y.title,
1312
- onClick: (C) => c(y)
1321
+ onClick: (E) => c(y)
1313
1322
  }, [
1314
- y.link ? (n(), v("a", {
1323
+ y.link ? (n(), m("a", {
1315
1324
  key: 0,
1316
1325
  target: "_blank",
1317
1326
  href: y.link,
1318
1327
  download: y.link
1319
1328
  }, [
1320
- uo,
1321
- t("span", null, m(y.title()), 1)
1322
- ], 8, co)) : (n(), v(H, { key: 1 }, [
1323
- mo,
1324
- t("span", null, m(y.title()), 1)
1329
+ ca,
1330
+ t("span", null, v(y.title()), 1)
1331
+ ], 8, da)) : (n(), m(U, { key: 1 }, [
1332
+ ua,
1333
+ t("span", null, v(y.title()), 1)
1325
1334
  ], 64))
1326
- ], 8, io))), 128))
1335
+ ], 8, ia))), 128))
1327
1336
  ], 4)) : M("", !0);
1328
1337
  }
1329
- }), ho = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, fo = { class: "flex leading-5 items-center" }, go = ["aria-label"], _o = /* @__PURE__ */ t("svg", {
1338
+ }), pa = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, ha = { class: "flex leading-5 items-center" }, fa = ["aria-label"], ga = /* @__PURE__ */ t("svg", {
1330
1339
  xmlns: "http://www.w3.org/2000/svg",
1331
1340
  class: "h-5 w-5",
1332
1341
  fill: "none",
@@ -1339,9 +1348,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1339
1348
  "stroke-linejoin": "round",
1340
1349
  d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
1341
1350
  })
1342
- ], -1), ko = [
1343
- _o
1344
- ], bo = ["value"], yo = { class: "ml-3" }, xo = { key: 0 }, wo = { class: "ml-1" }, $o = { class: "flex leading-5 items-center justify-end" }, Co = ["aria-label"], So = /* @__PURE__ */ t("svg", {
1351
+ ], -1), _a = [
1352
+ ga
1353
+ ], ka = ["value"], ba = { class: "ml-3" }, ya = { key: 0 }, xa = { class: "ml-1" }, wa = { class: "flex leading-5 items-center justify-end" }, $a = ["disabled"], Ca = ["aria-label"], Sa = /* @__PURE__ */ t("svg", {
1345
1354
  xmlns: "http://www.w3.org/2000/svg",
1346
1355
  class: "h-5 w-5 stroke-slate-500 cursor-pointer",
1347
1356
  fill: "none",
@@ -1354,57 +1363,68 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1354
1363
  "stroke-linejoin": "round",
1355
1364
  d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1356
1365
  })
1357
- ], -1), Mo = [
1358
- So
1359
- ], Eo = {
1366
+ ], -1), Ma = [
1367
+ Sa
1368
+ ], Ea = {
1360
1369
  name: "VFStatusbar"
1361
- }, Do = /* @__PURE__ */ Object.assign(Eo, {
1370
+ }, Da = /* @__PURE__ */ Object.assign(Ea, {
1362
1371
  setup(p) {
1363
- const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, a = _(0), d = () => {
1372
+ const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, o = k(0), i = () => {
1364
1373
  e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.adapter } }), r("adapter", e.adapter);
1365
1374
  };
1366
- e.emitter.on("vf-nodes-selected", (i) => {
1367
- a.value = i.length;
1375
+ e.emitter.on("vf-nodes-selected", (l) => {
1376
+ o.value = l.length;
1377
+ });
1378
+ const u = k("");
1379
+ e.emitter.on("vf-search-query", ({ newQuery: l }) => {
1380
+ u.value = l;
1368
1381
  });
1369
- const u = _("");
1370
- return e.emitter.on("vf-search-query", ({ newQuery: i }) => {
1371
- u.value = i;
1372
- }), (i, l) => (n(), v("div", ho, [
1373
- t("div", fo, [
1382
+ const d = ee(() => {
1383
+ const l = e.selectButton.multiple ? e.selectedItems.length > 0 : e.selectedItems.length === 1;
1384
+ return e.selectButton.active && l;
1385
+ });
1386
+ return (l, c) => (n(), m("div", pa, [
1387
+ t("div", ha, [
1374
1388
  t("div", {
1375
1389
  class: "mx-2",
1376
- "aria-label": o(s)("Storage"),
1390
+ "aria-label": a(s)("Storage"),
1377
1391
  "data-microtip-position": "top-right",
1378
1392
  role: "tooltip"
1379
- }, ko, 8, go),
1393
+ }, _a, 8, fa),
1380
1394
  q(t("select", {
1381
- "onUpdate:modelValue": l[0] || (l[0] = (c) => o(e).adapter = c),
1382
- onChange: d,
1395
+ "onUpdate:modelValue": c[0] || (c[0] = (g) => a(e).adapter = g),
1396
+ onChange: i,
1383
1397
  class: "py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"
1384
1398
  }, [
1385
- (n(!0), v(H, null, I(o(e).data.storages, (c) => (n(), v("option", { value: c }, m(c), 9, bo))), 256))
1399
+ (n(!0), m(U, null, I(a(e).data.storages, (g) => (n(), m("option", { value: g }, v(g), 9, ka))), 256))
1386
1400
  ], 544), [
1387
- [pe, o(e).adapter]
1401
+ [pe, a(e).adapter]
1388
1402
  ]),
1389
- t("div", yo, [
1390
- u.value.length ? (n(), v("span", xo, m(o(e).data.files.length) + " items found. ", 1)) : M("", !0),
1391
- t("span", wo, m(a.value > 0 ? o(s)("%s item(s) selected.", a.value) : ""), 1)
1403
+ t("div", ba, [
1404
+ u.value.length ? (n(), m("span", ya, v(a(e).data.files.length) + " items found. ", 1)) : M("", !0),
1405
+ t("span", xa, v(o.value > 0 ? a(s)("%s item(s) selected.", o.value) : ""), 1)
1392
1406
  ])
1393
1407
  ]),
1394
- t("div", $o, [
1408
+ t("div", wa, [
1409
+ a(e).selectButton.active ? (n(), m("button", {
1410
+ key: 0,
1411
+ class: z(["vf-btn py-0 vf-btn-primary", { disabled: !d.value }]),
1412
+ disabled: !d.value,
1413
+ onClick: c[1] || (c[1] = (g) => a(e).selectButton.click(a(e).selectedItems, g))
1414
+ }, v(a(s)("Select")), 11, $a)) : M("", !0),
1395
1415
  t("span", {
1396
1416
  class: "mr-1",
1397
- "aria-label": o(s)("About"),
1417
+ "aria-label": a(s)("About"),
1398
1418
  "data-microtip-position": "top-left",
1399
1419
  role: "tooltip",
1400
- onClick: l[1] || (l[1] = (c) => o(e).emitter.emit("vf-modal-show", { type: "about" }))
1401
- }, Mo, 8, Co)
1420
+ onClick: c[2] || (c[2] = (g) => a(e).emitter.emit("vf-modal-show", { type: "about" }))
1421
+ }, Ma, 8, Ca)
1402
1422
  ])
1403
1423
  ]));
1404
1424
  }
1405
- }), jo = {
1425
+ }), ja = {
1406
1426
  name: "VueFinder"
1407
- }, Ao = /* @__PURE__ */ Object.assign(jo, {
1427
+ }, Aa = /* @__PURE__ */ Object.assign(ja, {
1408
1428
  props: {
1409
1429
  id: {
1410
1430
  type: String,
@@ -1414,6 +1434,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1414
1434
  type: [String, Object],
1415
1435
  required: !0
1416
1436
  },
1437
+ persist: {
1438
+ type: Boolean,
1439
+ default: !1
1440
+ },
1441
+ path: {
1442
+ type: String,
1443
+ default: "."
1444
+ },
1417
1445
  features: {
1418
1446
  type: [Array, Boolean],
1419
1447
  default: !0
@@ -1428,7 +1456,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1428
1456
  },
1429
1457
  locale: {
1430
1458
  type: String,
1431
- default: "en"
1459
+ default: null
1432
1460
  },
1433
1461
  maxHeight: {
1434
1462
  type: String,
@@ -1437,109 +1465,129 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1437
1465
  maxFileSize: {
1438
1466
  type: String,
1439
1467
  default: "10mb"
1468
+ },
1469
+ fullScreen: {
1470
+ type: Boolean,
1471
+ default: !1
1472
+ },
1473
+ selectButton: {
1474
+ type: Object,
1475
+ default(p) {
1476
+ return {
1477
+ active: !1,
1478
+ multiple: !1,
1479
+ click: (e) => {
1480
+ },
1481
+ ...p
1482
+ };
1483
+ }
1440
1484
  }
1441
1485
  },
1442
1486
  emits: ["select"],
1443
1487
  setup(p, { emit: e }) {
1444
- const s = e, a = Je(p, F("supportedLocales"));
1445
- je("ServiceContainer", a);
1446
- const d = _(null);
1447
- a.root = d, a.i18n, a.emitter.on("vf-modal-close", () => {
1448
- a.modal.active = !1;
1449
- }), a.emitter.on("vf-modal-show", (l) => {
1450
- a.modal.active = !0, a.modal.type = l.type, a.modal.data = l;
1488
+ const s = e, o = Je(p, F("VueFinderOptions"));
1489
+ je("ServiceContainer", o);
1490
+ const { setStore: i } = o.storage, u = k(null);
1491
+ o.root = u, o.i18n, o.emitter.on("vf-modal-close", () => {
1492
+ o.modal.active = !1;
1493
+ }), o.emitter.on("vf-modal-show", (c) => {
1494
+ o.modal.active = !0, o.modal.type = c.type, o.modal.data = c;
1451
1495
  });
1452
- const u = (l) => {
1453
- Object.assign(a.data, l), a.emitter.emit("vf-nodes-selected", {}), a.emitter.emit("vf-explorer-update");
1496
+ const d = (c) => {
1497
+ Object.assign(o.data, c), o.emitter.emit("vf-nodes-selected", {}), o.emitter.emit("vf-explorer-update");
1454
1498
  };
1455
- a.emitter.on("vf-nodes-selected", (l) => {
1456
- s("select", l);
1499
+ o.emitter.on("vf-nodes-selected", (c) => {
1500
+ o.selectedItems = c, s("select", c);
1457
1501
  });
1458
- let i;
1459
- return a.emitter.on("vf-fetch-abort", () => {
1460
- i.abort(), a.loading = !1;
1461
- }), a.emitter.on("vf-fetch", ({ params: l, body: c = null, onSuccess: w = null, onError: k = null, noCloseModal: $ = !1 }) => {
1462
- ["index", "search"].includes(l.q) && (i && i.abort(), a.loading = !0), i = new AbortController();
1463
- const y = i.signal;
1464
- a.requester.send({
1502
+ let l;
1503
+ return o.emitter.on("vf-fetch-abort", () => {
1504
+ l.abort(), o.loading = !1;
1505
+ }), o.emitter.on("vf-fetch", ({ params: c, body: g = null, onSuccess: _ = null, onError: w = null, noCloseModal: y = !1 }) => {
1506
+ ["index", "search"].includes(c.q) && (l && l.abort(), o.loading = !0), l = new AbortController();
1507
+ const E = l.signal;
1508
+ o.requester.send({
1465
1509
  url: "",
1466
- method: l.m || "get",
1467
- params: l,
1468
- body: c,
1469
- abortSignal: y
1470
- }).then((C) => {
1471
- a.adapter = C.adapter, ["index", "search"].includes(l.q) && (a.loading = !1), $ || a.emitter.emit("vf-modal-close"), u(C), w && w(C);
1472
- }).catch((C) => {
1473
- console.error(C), k && k(C);
1510
+ method: c.m || "get",
1511
+ params: c,
1512
+ body: g,
1513
+ abortSignal: E
1514
+ }).then(($) => {
1515
+ o.adapter = $.adapter, o.persist && (o.path = $.dirname, i("path", o.path)), ["index", "search"].includes(c.q) && (o.loading = !1), y || o.emitter.emit("vf-modal-close"), d($), _ && _($);
1516
+ }).catch(($) => {
1517
+ console.error($), w && w($);
1474
1518
  });
1475
- }), a.emitter.on("vf-download", (l) => {
1476
- const c = document.createElement("a");
1477
- c.style.display = "none", c.target = "_blank", c.href = l, c.download = l, a.root.appendChild(c), c.click(), c.remove();
1519
+ }), o.emitter.on("vf-download", (c) => {
1520
+ const g = document.createElement("a");
1521
+ g.style.display = "none", g.target = "_blank", g.href = c, g.download = c, o.root.appendChild(g), g.click(), g.remove();
1478
1522
  }), P(() => {
1479
- a.emitter.emit("vf-fetch", { params: { q: "index", adapter: a.adapter } });
1480
- }), (l, c) => (n(), v("div", {
1523
+ let c = {};
1524
+ o.path.includes("://") && (c = {
1525
+ adapter: o.path.split("://")[0],
1526
+ path: o.path
1527
+ }), o.emitter.emit("vf-fetch", { params: { q: "index", adapter: o.adapter, ...c } });
1528
+ }), (c, g) => (n(), m("div", {
1481
1529
  class: "vuefinder",
1482
1530
  ref_key: "root",
1483
- ref: d
1531
+ ref: u
1484
1532
  }, [
1485
1533
  t("div", {
1486
- class: U(o(a).theme.actualValue === "dark" ? "dark" : "")
1534
+ class: z(a(o).theme.actualValue === "dark" ? "dark" : "")
1487
1535
  }, [
1488
1536
  t("div", {
1489
- class: U([o(a).fullscreen ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
1490
- style: be(o(a).fullscreen ? "" : "max-height: " + p.maxHeight),
1491
- onMousedown: c[0] || (c[0] = (w) => o(a).emitter.emit("vf-contextmenu-hide")),
1492
- onTouchstart: c[1] || (c[1] = (w) => o(a).emitter.emit("vf-contextmenu-hide"))
1537
+ class: z([a(o).fullScreen ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
1538
+ style: be(a(o).fullScreen ? "" : "max-height: " + p.maxHeight),
1539
+ onMousedown: g[0] || (g[0] = (_) => a(o).emitter.emit("vf-contextmenu-hide")),
1540
+ onTouchstart: g[1] || (g[1] = (_) => a(o).emitter.emit("vf-contextmenu-hide"))
1493
1541
  }, [
1494
- B(Vt),
1495
- B(cs),
1496
- B(lo),
1497
- B(Do)
1542
+ H(Vt),
1543
+ H(cs),
1544
+ H(la),
1545
+ H(Da)
1498
1546
  ], 38),
1499
- B(Ae, { name: "fade" }, {
1500
- default: j(() => [
1501
- o(a).modal.active ? (n(), L(Te("v-f-modal-" + o(a).modal.type), { key: 0 })) : M("", !0)
1547
+ H(Ae, { name: "fade" }, {
1548
+ default: A(() => [
1549
+ a(o).modal.active ? (n(), T(Le("v-f-modal-" + a(o).modal.type), { key: 0 })) : M("", !0)
1502
1550
  ]),
1503
1551
  _: 1
1504
1552
  }),
1505
- B(po)
1553
+ H(va)
1506
1554
  ], 2)
1507
1555
  ], 512));
1508
1556
  }
1509
- }), To = /* @__PURE__ */ t("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Lo = { class: "fixed z-10 inset-0 overflow-hidden" }, Fo = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, No = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Vo = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, G = {
1557
+ }), La = /* @__PURE__ */ t("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Ta = { class: "fixed z-10 inset-0 overflow-hidden" }, Fa = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, Oa = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Va = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, W = {
1510
1558
  __name: "ModalLayout",
1511
1559
  setup(p) {
1512
1560
  const e = F("ServiceContainer");
1513
1561
  return P(() => {
1514
1562
  const s = document.querySelector(".v-f-modal input");
1515
1563
  s && s.focus();
1516
- }), (s, r) => (n(), v("div", {
1564
+ }), (s, r) => (n(), m("div", {
1517
1565
  class: "v-f-modal relative z-30",
1518
1566
  "aria-labelledby": "modal-title",
1519
1567
  role: "dialog",
1520
1568
  "aria-modal": "true",
1521
- onKeyup: r[1] || (r[1] = Q((a) => o(e).emitter.emit("vf-modal-close"), ["esc"])),
1569
+ onKeyup: r[1] || (r[1] = Q((o) => a(e).emitter.emit("vf-modal-close"), ["esc"])),
1522
1570
  tabindex: "0"
1523
1571
  }, [
1524
- To,
1525
- t("div", Lo, [
1572
+ La,
1573
+ t("div", Ta, [
1526
1574
  t("div", {
1527
1575
  class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
1528
- onMousedown: r[0] || (r[0] = Y((a) => o(e).emitter.emit("vf-modal-close"), ["self"]))
1576
+ onMousedown: r[0] || (r[0] = Y((o) => a(e).emitter.emit("vf-modal-close"), ["self"]))
1529
1577
  }, [
1530
- t("div", Fo, [
1531
- t("div", No, [
1532
- ne(s.$slots, "default")
1578
+ t("div", Fa, [
1579
+ t("div", Oa, [
1580
+ le(s.$slots, "default")
1533
1581
  ]),
1534
- t("div", Vo, [
1535
- ne(s.$slots, "buttons")
1582
+ t("div", Va, [
1583
+ le(s.$slots, "buttons")
1536
1584
  ])
1537
1585
  ])
1538
1586
  ], 32)
1539
1587
  ])
1540
1588
  ], 32));
1541
1589
  }
1542
- }, zo = ["aria-label"], Oo = /* @__PURE__ */ t("svg", {
1590
+ }, Na = ["aria-label"], Ba = /* @__PURE__ */ t("svg", {
1543
1591
  xmlns: "http://www.w3.org/2000/svg",
1544
1592
  fill: "none",
1545
1593
  viewBox: "0 0 24 24",
@@ -1552,11 +1600,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1552
1600
  "stroke-linejoin": "round",
1553
1601
  d: "M6 18L18 6M6 6l12 12"
1554
1602
  })
1555
- ], -1), Uo = [
1556
- Oo
1557
- ], Ho = {
1603
+ ], -1), za = [
1604
+ Ba
1605
+ ], Ua = {
1558
1606
  name: "Message"
1559
- }, W = /* @__PURE__ */ Object.assign(Ho, {
1607
+ }, G = /* @__PURE__ */ Object.assign(Ua, {
1560
1608
  props: {
1561
1609
  error: {
1562
1610
  type: Boolean,
@@ -1566,30 +1614,30 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1566
1614
  emits: ["hidden"],
1567
1615
  setup(p, { emit: e }) {
1568
1616
  var c;
1569
- const s = e, r = F("ServiceContainer"), { t: a } = r.i18n, d = _(!1), u = _(null), i = _((c = u.value) == null ? void 0 : c.strMessage);
1570
- ie(i, () => d.value = !1);
1617
+ const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = k(!1), u = k(null), d = k((c = u.value) == null ? void 0 : c.strMessage);
1618
+ de(d, () => i.value = !1);
1571
1619
  const l = () => {
1572
- s("hidden"), d.value = !0;
1620
+ s("hidden"), i.value = !0;
1573
1621
  };
1574
- return (w, k) => (n(), v("div", null, [
1575
- d.value ? M("", !0) : (n(), v("div", {
1622
+ return (g, _) => (n(), m("div", null, [
1623
+ i.value ? M("", !0) : (n(), m("div", {
1576
1624
  key: 0,
1577
1625
  ref_key: "strMessage",
1578
1626
  ref: u,
1579
- class: U(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", p.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
1627
+ class: z(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", p.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
1580
1628
  }, [
1581
- ne(w.$slots, "default"),
1629
+ le(g.$slots, "default"),
1582
1630
  t("div", {
1583
1631
  class: "ml-auto cursor-pointer",
1584
1632
  onClick: l,
1585
- "aria-label": o(a)("Close"),
1633
+ "aria-label": a(o)("Close"),
1586
1634
  "data-microtip-position": "top-left",
1587
1635
  role: "tooltip"
1588
- }, Uo, 8, zo)
1636
+ }, za, 8, Na)
1589
1637
  ], 2))
1590
1638
  ]));
1591
1639
  }
1592
- }), Bo = { class: "sm:flex sm:items-start" }, Ro = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1640
+ }), Ha = { class: "sm:flex sm:items-start" }, Ra = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1593
1641
  /* @__PURE__ */ t("svg", {
1594
1642
  xmlns: "http://www.w3.org/2000/svg",
1595
1643
  class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
@@ -1604,13 +1652,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1604
1652
  d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
1605
1653
  })
1606
1654
  ])
1607
- ], -1), qo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Io = {
1655
+ ], -1), qa = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ia = {
1608
1656
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1609
1657
  id: "modal-title"
1610
- }, Po = { class: "mt-2" }, Go = { class: "text-sm text-gray-500" }, Wo = {
1658
+ }, Pa = { class: "mt-2" }, Wa = { class: "text-sm text-gray-500" }, Ga = {
1611
1659
  class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
1612
1660
  style: { "max-height": "200px" }
1613
- }, Yo = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ko = {
1661
+ }, Ya = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ka = {
1614
1662
  key: 0,
1615
1663
  xmlns: "http://www.w3.org/2000/svg",
1616
1664
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -1618,13 +1666,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1618
1666
  viewBox: "0 0 24 24",
1619
1667
  stroke: "currentColor",
1620
1668
  "stroke-width": "1"
1621
- }, Jo = /* @__PURE__ */ t("path", {
1669
+ }, Ja = /* @__PURE__ */ t("path", {
1622
1670
  "stroke-linecap": "round",
1623
1671
  "stroke-linejoin": "round",
1624
1672
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
1625
- }, null, -1), Xo = [
1626
- Jo
1627
- ], Qo = {
1673
+ }, null, -1), Xa = [
1674
+ Ja
1675
+ ], Qa = {
1628
1676
  key: 1,
1629
1677
  xmlns: "http://www.w3.org/2000/svg",
1630
1678
  class: "h-5 w-5 text-neutral-500",
@@ -1632,19 +1680,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1632
1680
  viewBox: "0 0 24 24",
1633
1681
  stroke: "currentColor",
1634
1682
  "stroke-width": "1"
1635
- }, Zo = /* @__PURE__ */ t("path", {
1683
+ }, Za = /* @__PURE__ */ t("path", {
1636
1684
  "stroke-linecap": "round",
1637
1685
  "stroke-linejoin": "round",
1638
1686
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
1639
- }, null, -1), ea = [
1640
- Zo
1641
- ], ta = { class: "ml-1.5" }, sa = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, oa = {
1687
+ }, null, -1), eo = [
1688
+ Za
1689
+ ], to = { class: "ml-1.5" }, so = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, ao = {
1642
1690
  name: "VFModalDelete"
1643
- }, aa = /* @__PURE__ */ Object.assign(oa, {
1691
+ }, oo = /* @__PURE__ */ Object.assign(ao, {
1644
1692
  setup(p) {
1645
1693
  const e = F("ServiceContainer");
1646
1694
  e.storage;
1647
- const { t: s } = e.i18n, r = _(e.modal.data.items), a = _(""), d = () => {
1695
+ const { t: s } = e.i18n, r = k(e.modal.data.items), o = k(""), i = () => {
1648
1696
  r.value.length && e.emitter.emit("vf-fetch", {
1649
1697
  params: {
1650
1698
  q: "delete",
@@ -1653,50 +1701,50 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1653
1701
  path: e.data.dirname
1654
1702
  },
1655
1703
  body: {
1656
- items: r.value.map(({ path: u, type: i }) => ({ path: u, type: i }))
1704
+ items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d }))
1657
1705
  },
1658
1706
  onSuccess: () => {
1659
1707
  e.emitter.emit("vf-toast-push", { label: s("Files deleted.") });
1660
1708
  },
1661
1709
  onError: (u) => {
1662
- a.value = s(u.message);
1710
+ o.value = s(u.message);
1663
1711
  }
1664
1712
  });
1665
1713
  };
1666
- return (u, i) => (n(), L(G, null, {
1667
- buttons: j(() => [
1714
+ return (u, d) => (n(), T(W, null, {
1715
+ buttons: A(() => [
1668
1716
  t("button", {
1669
1717
  type: "button",
1670
- onClick: d,
1718
+ onClick: i,
1671
1719
  class: "vf-btn vf-btn-danger"
1672
- }, m(o(s)("Yes, Delete!")), 1),
1720
+ }, v(a(s)("Yes, Delete!")), 1),
1673
1721
  t("button", {
1674
1722
  type: "button",
1675
- onClick: i[1] || (i[1] = (l) => o(e).emitter.emit("vf-modal-close")),
1723
+ onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
1676
1724
  class: "vf-btn vf-btn-secondary"
1677
- }, m(o(s)("Cancel")), 1),
1678
- t("div", sa, m(o(s)("This action cannot be undone.")), 1)
1725
+ }, v(a(s)("Cancel")), 1),
1726
+ t("div", so, v(a(s)("This action cannot be undone.")), 1)
1679
1727
  ]),
1680
- default: j(() => [
1681
- t("div", Bo, [
1682
- Ro,
1683
- t("div", qo, [
1684
- t("h3", Io, m(o(s)("Delete files")), 1),
1685
- t("div", Po, [
1686
- t("p", Go, m(o(s)("Are you sure you want to delete these files?")), 1),
1687
- t("div", Wo, [
1688
- (n(!0), v(H, null, I(r.value, (l) => (n(), v("p", Yo, [
1689
- l.type === "dir" ? (n(), v("svg", Ko, Xo)) : (n(), v("svg", Qo, ea)),
1690
- t("span", ta, m(l.basename), 1)
1728
+ default: A(() => [
1729
+ t("div", Ha, [
1730
+ Ra,
1731
+ t("div", qa, [
1732
+ t("h3", Ia, v(a(s)("Delete files")), 1),
1733
+ t("div", Pa, [
1734
+ t("p", Wa, v(a(s)("Are you sure you want to delete these files?")), 1),
1735
+ t("div", Ga, [
1736
+ (n(!0), m(U, null, I(r.value, (l) => (n(), m("p", Ya, [
1737
+ l.type === "dir" ? (n(), m("svg", Ka, Xa)) : (n(), m("svg", Qa, eo)),
1738
+ t("span", to, v(l.basename), 1)
1691
1739
  ]))), 256))
1692
1740
  ]),
1693
- a.value.length ? (n(), L(W, {
1741
+ o.value.length ? (n(), T(G, {
1694
1742
  key: 0,
1695
- onHidden: i[0] || (i[0] = (l) => a.value = ""),
1743
+ onHidden: d[0] || (d[0] = (l) => o.value = ""),
1696
1744
  error: ""
1697
1745
  }, {
1698
- default: j(() => [
1699
- N(m(a.value), 1)
1746
+ default: A(() => [
1747
+ V(v(o.value), 1)
1700
1748
  ]),
1701
1749
  _: 1
1702
1750
  })) : M("", !0)
@@ -1707,7 +1755,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1707
1755
  _: 1
1708
1756
  }));
1709
1757
  }
1710
- }), ra = { class: "sm:flex sm:items-start" }, na = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1758
+ }), ro = { class: "sm:flex sm:items-start" }, no = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1711
1759
  /* @__PURE__ */ t("svg", {
1712
1760
  xmlns: "http://www.w3.org/2000/svg",
1713
1761
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1722,31 +1770,31 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1722
1770
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1723
1771
  })
1724
1772
  ])
1725
- ], -1), la = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ia = {
1773
+ ], -1), lo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, io = {
1726
1774
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1727
1775
  id: "modal-title"
1728
- }, da = { class: "mt-2" }, ca = { class: "text-sm text-gray-500" }, ua = {
1776
+ }, co = { class: "mt-2" }, uo = { class: "text-sm text-gray-500" }, mo = {
1729
1777
  name: "VFModalMessage"
1730
- }, ma = /* @__PURE__ */ Object.assign(ua, {
1778
+ }, vo = /* @__PURE__ */ Object.assign(mo, {
1731
1779
  setup(p) {
1732
1780
  const e = F("ServiceContainer"), { t: s } = e.i18n;
1733
- return (r, a) => (n(), L(G, null, {
1734
- buttons: j(() => [
1781
+ return (r, o) => (n(), T(W, null, {
1782
+ buttons: A(() => [
1735
1783
  t("button", {
1736
1784
  type: "button",
1737
- onClick: a[0] || (a[0] = (d) => o(e).emitter.emit("vf-modal-close")),
1785
+ onClick: o[0] || (o[0] = (i) => a(e).emitter.emit("vf-modal-close")),
1738
1786
  class: "vf-btn vf-btn-secondary"
1739
- }, m(o(s)("Close")), 1)
1787
+ }, v(a(s)("Close")), 1)
1740
1788
  ]),
1741
- default: j(() => {
1742
- var d, u;
1789
+ default: A(() => {
1790
+ var i, u;
1743
1791
  return [
1744
- t("div", ra, [
1745
- na,
1746
- t("div", la, [
1747
- t("h3", ia, m(((d = o(e).modal.data) == null ? void 0 : d.title) ?? "Title"), 1),
1748
- t("div", da, [
1749
- t("p", ca, m(((u = o(e).modal.data) == null ? void 0 : u.message) ?? "Message"), 1)
1792
+ t("div", ro, [
1793
+ no,
1794
+ t("div", lo, [
1795
+ t("h3", io, v(((i = a(e).modal.data) == null ? void 0 : i.title) ?? "Title"), 1),
1796
+ t("div", co, [
1797
+ t("p", uo, v(((u = a(e).modal.data) == null ? void 0 : u.message) ?? "Message"), 1)
1750
1798
  ])
1751
1799
  ])
1752
1800
  ])
@@ -1755,7 +1803,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1755
1803
  _: 1
1756
1804
  }));
1757
1805
  }
1758
- }), va = { class: "sm:flex sm:items-start" }, pa = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1806
+ }), po = { class: "sm:flex sm:items-start" }, ho = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1759
1807
  /* @__PURE__ */ t("svg", {
1760
1808
  xmlns: "http://www.w3.org/2000/svg",
1761
1809
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1770,16 +1818,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1770
1818
  d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"
1771
1819
  })
1772
1820
  ])
1773
- ], -1), ha = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, fa = {
1821
+ ], -1), fo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, go = {
1774
1822
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1775
1823
  id: "modal-title"
1776
- }, ga = { class: "mt-2" }, _a = { class: "text-sm text-gray-500" }, ka = ["placeholder"], ba = {
1824
+ }, _o = { class: "mt-2" }, ko = { class: "text-sm text-gray-500" }, bo = ["placeholder"], yo = {
1777
1825
  name: "VFModalNewFolder"
1778
- }, ya = /* @__PURE__ */ Object.assign(ba, {
1826
+ }, xo = /* @__PURE__ */ Object.assign(yo, {
1779
1827
  setup(p) {
1780
1828
  const e = F("ServiceContainer");
1781
1829
  e.storage;
1782
- const { t: s } = e.i18n, r = _(""), a = _(""), d = () => {
1830
+ const { t: s } = e.i18n, r = k(""), o = k(""), i = () => {
1783
1831
  r.value != "" && e.emitter.emit("vf-fetch", {
1784
1832
  params: {
1785
1833
  q: "newfolder",
@@ -1794,46 +1842,46 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1794
1842
  e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
1795
1843
  },
1796
1844
  onError: (u) => {
1797
- a.value = s(u.message);
1845
+ o.value = s(u.message);
1798
1846
  }
1799
1847
  });
1800
1848
  };
1801
- return (u, i) => (n(), L(G, null, {
1802
- buttons: j(() => [
1849
+ return (u, d) => (n(), T(W, null, {
1850
+ buttons: A(() => [
1803
1851
  t("button", {
1804
1852
  type: "button",
1805
- onClick: d,
1853
+ onClick: i,
1806
1854
  class: "vf-btn vf-btn-primary"
1807
- }, m(o(s)("Create")), 1),
1855
+ }, v(a(s)("Create")), 1),
1808
1856
  t("button", {
1809
1857
  type: "button",
1810
- onClick: i[2] || (i[2] = (l) => o(e).emitter.emit("vf-modal-close")),
1858
+ onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
1811
1859
  class: "vf-btn vf-btn-secondary"
1812
- }, m(o(s)("Cancel")), 1)
1860
+ }, v(a(s)("Cancel")), 1)
1813
1861
  ]),
1814
- default: j(() => [
1815
- t("div", va, [
1816
- pa,
1817
- t("div", ha, [
1818
- t("h3", fa, m(o(s)("New Folder")), 1),
1819
- t("div", ga, [
1820
- t("p", _a, m(o(s)("Create a new folder")), 1),
1862
+ default: A(() => [
1863
+ t("div", po, [
1864
+ ho,
1865
+ t("div", fo, [
1866
+ t("h3", go, v(a(s)("New Folder")), 1),
1867
+ t("div", _o, [
1868
+ t("p", ko, v(a(s)("Create a new folder")), 1),
1821
1869
  q(t("input", {
1822
- "onUpdate:modelValue": i[0] || (i[0] = (l) => r.value = l),
1823
- onKeyup: Q(d, ["enter"]),
1870
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
1871
+ onKeyup: Q(i, ["enter"]),
1824
1872
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
1825
- placeholder: o(s)("Folder Name"),
1873
+ placeholder: a(s)("Folder Name"),
1826
1874
  type: "text"
1827
- }, null, 40, ka), [
1875
+ }, null, 40, bo), [
1828
1876
  [Z, r.value]
1829
1877
  ]),
1830
- a.value.length ? (n(), L(W, {
1878
+ o.value.length ? (n(), T(G, {
1831
1879
  key: 0,
1832
- onHidden: i[1] || (i[1] = (l) => a.value = ""),
1880
+ onHidden: d[1] || (d[1] = (l) => o.value = ""),
1833
1881
  error: ""
1834
1882
  }, {
1835
- default: j(() => [
1836
- N(m(a.value), 1)
1883
+ default: A(() => [
1884
+ V(v(o.value), 1)
1837
1885
  ]),
1838
1886
  _: 1
1839
1887
  })) : M("", !0)
@@ -1844,7 +1892,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1844
1892
  _: 1
1845
1893
  }));
1846
1894
  }
1847
- }), xa = { class: "sm:flex sm:items-start" }, wa = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1895
+ }), wo = { class: "sm:flex sm:items-start" }, $o = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1848
1896
  /* @__PURE__ */ t("svg", {
1849
1897
  xmlns: "http://www.w3.org/2000/svg",
1850
1898
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1859,16 +1907,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1859
1907
  d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
1860
1908
  })
1861
1909
  ])
1862
- ], -1), $a = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ca = {
1910
+ ], -1), Co = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, So = {
1863
1911
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1864
1912
  id: "modal-title"
1865
- }, Sa = { class: "mt-2" }, Ma = { class: "text-sm text-gray-500" }, Ea = ["placeholder"], Da = {
1913
+ }, Mo = { class: "mt-2" }, Eo = { class: "text-sm text-gray-500" }, Do = ["placeholder"], jo = {
1866
1914
  name: "VFModalNewFile"
1867
- }, ja = /* @__PURE__ */ Object.assign(Da, {
1915
+ }, Ao = /* @__PURE__ */ Object.assign(jo, {
1868
1916
  setup(p) {
1869
1917
  const e = F("ServiceContainer");
1870
1918
  e.storage;
1871
- const { t: s } = e.i18n, r = _(""), a = _(""), d = () => {
1919
+ const { t: s } = e.i18n, r = k(""), o = k(""), i = () => {
1872
1920
  r.value != "" && e.emitter.emit("vf-fetch", {
1873
1921
  params: {
1874
1922
  q: "newfile",
@@ -1883,46 +1931,46 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1883
1931
  e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
1884
1932
  },
1885
1933
  onError: (u) => {
1886
- a.value = s(u.message);
1934
+ o.value = s(u.message);
1887
1935
  }
1888
1936
  });
1889
1937
  };
1890
- return (u, i) => (n(), L(G, null, {
1891
- buttons: j(() => [
1938
+ return (u, d) => (n(), T(W, null, {
1939
+ buttons: A(() => [
1892
1940
  t("button", {
1893
1941
  type: "button",
1894
- onClick: d,
1942
+ onClick: i,
1895
1943
  class: "vf-btn vf-btn-primary"
1896
- }, m(o(s)("Create")), 1),
1944
+ }, v(a(s)("Create")), 1),
1897
1945
  t("button", {
1898
1946
  type: "button",
1899
- onClick: i[2] || (i[2] = (l) => o(e).emitter.emit("vf-modal-close")),
1947
+ onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
1900
1948
  class: "vf-btn vf-btn-secondary"
1901
- }, m(o(s)("Cancel")), 1)
1949
+ }, v(a(s)("Cancel")), 1)
1902
1950
  ]),
1903
- default: j(() => [
1904
- t("div", xa, [
1905
- wa,
1906
- t("div", $a, [
1907
- t("h3", Ca, m(o(s)("New File")), 1),
1908
- t("div", Sa, [
1909
- t("p", Ma, m(o(s)("Create a new file")), 1),
1951
+ default: A(() => [
1952
+ t("div", wo, [
1953
+ $o,
1954
+ t("div", Co, [
1955
+ t("h3", So, v(a(s)("New File")), 1),
1956
+ t("div", Mo, [
1957
+ t("p", Eo, v(a(s)("Create a new file")), 1),
1910
1958
  q(t("input", {
1911
- "onUpdate:modelValue": i[0] || (i[0] = (l) => r.value = l),
1912
- onKeyup: Q(d, ["enter"]),
1959
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
1960
+ onKeyup: Q(i, ["enter"]),
1913
1961
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
1914
- placeholder: o(s)("File Name"),
1962
+ placeholder: a(s)("File Name"),
1915
1963
  type: "text"
1916
- }, null, 40, Ea), [
1964
+ }, null, 40, Do), [
1917
1965
  [Z, r.value]
1918
1966
  ]),
1919
- a.value.length ? (n(), L(W, {
1967
+ o.value.length ? (n(), T(G, {
1920
1968
  key: 0,
1921
- onHidden: i[1] || (i[1] = (l) => a.value = ""),
1969
+ onHidden: d[1] || (d[1] = (l) => o.value = ""),
1922
1970
  error: ""
1923
1971
  }, {
1924
- default: j(() => [
1925
- N(m(a.value), 1)
1972
+ default: A(() => [
1973
+ V(v(o.value), 1)
1926
1974
  ]),
1927
1975
  _: 1
1928
1976
  })) : M("", !0)
@@ -1933,14 +1981,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1933
1981
  _: 1
1934
1982
  }));
1935
1983
  }
1936
- }), Aa = { class: "flex" }, Ta = ["aria-label"], La = { class: "ml-auto mb-2" }, Fa = {
1984
+ }), Lo = { class: "flex" }, To = ["aria-label"], Fo = { class: "ml-auto mb-2" }, Oo = {
1937
1985
  key: 0,
1938
1986
  class: "p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"
1939
- }, Na = { key: 1 }, Va = {
1987
+ }, Vo = { key: 1 }, No = {
1940
1988
  __name: "Text",
1941
1989
  emits: ["success"],
1942
1990
  setup(p, { emit: e }) {
1943
- const s = e, r = _(""), a = _(""), d = _(null), u = _(!1), i = _(""), l = _(!1), c = F("ServiceContainer"), { t: w } = c.i18n;
1991
+ const s = e, r = k(""), o = k(""), i = k(null), u = k(!1), d = k(""), l = k(!1), c = F("ServiceContainer"), { t: g } = c.i18n;
1944
1992
  P(() => {
1945
1993
  c.requester.send({
1946
1994
  url: "",
@@ -1951,12 +1999,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1951
1999
  r.value = y, s("success");
1952
2000
  });
1953
2001
  });
1954
- const k = () => {
1955
- u.value = !u.value, a.value = r.value, u.value == !0 && de(() => {
1956
- d.value.focus();
2002
+ const _ = () => {
2003
+ u.value = !u.value, o.value = r.value, u.value == !0 && ce(() => {
2004
+ i.value.focus();
1957
2005
  });
1958
- }, $ = () => {
1959
- i.value = "", l.value = !1, c.requester.send({
2006
+ }, w = () => {
2007
+ d.value = "", l.value = !1, c.requester.send({
1960
2008
  url: "",
1961
2009
  method: "post",
1962
2010
  params: {
@@ -1965,83 +2013,83 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1965
2013
  path: c.modal.data.item.path
1966
2014
  },
1967
2015
  body: {
1968
- content: a.value
2016
+ content: o.value
1969
2017
  },
1970
2018
  responseType: "text"
1971
2019
  }).then((y) => {
1972
- i.value = w("Updated."), r.value = y, s("success"), u.value = !u.value;
2020
+ d.value = g("Updated."), r.value = y, s("success"), u.value = !u.value;
1973
2021
  }).catch((y) => {
1974
- i.value = w(y.message), l.value = !0;
2022
+ d.value = g(y.message), l.value = !0;
1975
2023
  });
1976
2024
  };
1977
- return (y, C) => (n(), v(H, null, [
1978
- t("div", Aa, [
2025
+ return (y, E) => (n(), m(U, null, [
2026
+ t("div", Lo, [
1979
2027
  t("div", {
1980
2028
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1981
2029
  id: "modal-title",
1982
- "aria-label": o(c).modal.data.item.path,
2030
+ "aria-label": a(c).modal.data.item.path,
1983
2031
  "data-microtip-position": "bottom-right",
1984
2032
  role: "tooltip"
1985
- }, m(o(c).modal.data.item.basename), 9, Ta),
1986
- t("div", La, [
1987
- u.value ? (n(), v("button", {
2033
+ }, v(a(c).modal.data.item.basename), 9, To),
2034
+ t("div", Fo, [
2035
+ u.value ? (n(), m("button", {
1988
2036
  key: 0,
1989
- onClick: $,
2037
+ onClick: w,
1990
2038
  class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
1991
- }, m(o(w)("Save")), 1)) : M("", !0),
1992
- o(c).features.includes(o(z).EDIT) ? (n(), v("button", {
2039
+ }, v(a(g)("Save")), 1)) : M("", !0),
2040
+ a(c).features.includes(a(B).EDIT) ? (n(), m("button", {
1993
2041
  key: 1,
1994
2042
  class: "ml-1 px-2 py-1 text-blue-500",
1995
- onClick: C[0] || (C[0] = (E) => k())
1996
- }, m(u.value ? o(w)("Cancel") : o(w)("Edit")), 1)) : M("", !0)
2043
+ onClick: E[0] || (E[0] = ($) => _())
2044
+ }, v(u.value ? a(g)("Cancel") : a(g)("Edit")), 1)) : M("", !0)
1997
2045
  ])
1998
2046
  ]),
1999
2047
  t("div", null, [
2000
- u.value ? (n(), v("div", Na, [
2048
+ u.value ? (n(), m("div", Vo, [
2001
2049
  q(t("textarea", {
2002
2050
  ref_key: "editInput",
2003
- ref: d,
2004
- "onUpdate:modelValue": C[1] || (C[1] = (E) => a.value = E),
2051
+ ref: i,
2052
+ "onUpdate:modelValue": E[1] || (E[1] = ($) => o.value = $),
2005
2053
  class: "w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",
2006
2054
  name: "text",
2007
2055
  id: "",
2008
2056
  cols: "30",
2009
2057
  rows: "10"
2010
2058
  }, null, 512), [
2011
- [Z, a.value]
2059
+ [Z, o.value]
2012
2060
  ])
2013
- ])) : (n(), v("pre", Fa, m(r.value), 1)),
2014
- i.value.length ? (n(), L(W, {
2061
+ ])) : (n(), m("pre", Oo, v(r.value), 1)),
2062
+ d.value.length ? (n(), T(G, {
2015
2063
  key: 2,
2016
- onHidden: C[2] || (C[2] = (E) => i.value = ""),
2064
+ onHidden: E[2] || (E[2] = ($) => d.value = ""),
2017
2065
  error: l.value
2018
2066
  }, {
2019
- default: j(() => [
2020
- N(m(i.value), 1)
2067
+ default: A(() => [
2068
+ V(v(d.value), 1)
2021
2069
  ]),
2022
2070
  _: 1
2023
2071
  }, 8, ["error"])) : M("", !0)
2024
2072
  ])
2025
2073
  ], 64));
2026
2074
  }
2027
- }, za = { class: "flex" }, Oa = ["aria-label"], Ua = { class: "ml-auto mb-2" }, Ha = { class: "w-full flex justify-center" }, Ba = ["src"], Ra = {
2075
+ }, Bo = { class: "flex" }, zo = ["aria-label"], Uo = { class: "ml-auto mb-2" }, Ho = { class: "w-full flex justify-center" }, Ro = ["src"], qo = {
2028
2076
  __name: "Image",
2029
2077
  emits: ["success"],
2030
2078
  setup(p, { emit: e }) {
2031
- const s = e, r = F("ServiceContainer"), { t: a } = r.i18n, d = _(null), u = _(null), i = _(!1), l = _(""), c = _(!1), w = () => {
2032
- i.value = !i.value, i.value ? u.value = new Oe(d.value, {
2033
- crop($) {
2079
+ const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = k(null), u = k(null), d = k(!1), l = k(""), c = k(!1), g = () => {
2080
+ d.value = !d.value, d.value ? u.value = new Be(i.value, {
2081
+ crop(w) {
2034
2082
  }
2035
2083
  }) : u.value.destroy();
2036
- }, k = () => {
2084
+ }, _ = () => {
2037
2085
  u.value.getCroppedCanvas({
2038
2086
  width: 795,
2039
2087
  height: 341
2040
2088
  }).toBlob(
2041
- ($) => {
2089
+ (w) => {
2042
2090
  l.value = "", c.value = !1;
2043
2091
  const y = new FormData();
2044
- y.set("file", $), r.requester.send({
2092
+ y.set("file", w), r.requester.send({
2045
2093
  url: "",
2046
2094
  method: "post",
2047
2095
  params: {
@@ -2050,181 +2098,181 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2050
2098
  path: r.modal.data.item.path
2051
2099
  },
2052
2100
  body: y
2053
- }).then((C) => {
2054
- l.value = a("Updated."), d.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), w(), s("success");
2055
- }).catch((C) => {
2056
- l.value = a(C.message), c.value = !0;
2101
+ }).then((E) => {
2102
+ l.value = o("Updated."), i.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), g(), s("success");
2103
+ }).catch((E) => {
2104
+ l.value = o(E.message), c.value = !0;
2057
2105
  });
2058
2106
  }
2059
2107
  );
2060
2108
  };
2061
2109
  return P(() => {
2062
2110
  s("success");
2063
- }), ($, y) => (n(), v(H, null, [
2064
- t("div", za, [
2111
+ }), (w, y) => (n(), m(U, null, [
2112
+ t("div", Bo, [
2065
2113
  t("h3", {
2066
2114
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2067
2115
  id: "modal-title",
2068
- "aria-label": o(r).modal.data.item.path,
2116
+ "aria-label": a(r).modal.data.item.path,
2069
2117
  "data-microtip-position": "bottom-right",
2070
2118
  role: "tooltip"
2071
- }, m(o(r).modal.data.item.basename), 9, Oa),
2072
- t("div", Ua, [
2073
- i.value ? (n(), v("button", {
2119
+ }, v(a(r).modal.data.item.basename), 9, zo),
2120
+ t("div", Uo, [
2121
+ d.value ? (n(), m("button", {
2074
2122
  key: 0,
2075
- onClick: k,
2123
+ onClick: _,
2076
2124
  class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
2077
- }, m(o(a)("Crop")), 1)) : M("", !0),
2078
- o(r).features.includes(o(z).EDIT) ? (n(), v("button", {
2125
+ }, v(a(o)("Crop")), 1)) : M("", !0),
2126
+ a(r).features.includes(a(B).EDIT) ? (n(), m("button", {
2079
2127
  key: 1,
2080
2128
  class: "ml-1 px-2 py-1 text-blue-500",
2081
- onClick: y[0] || (y[0] = (C) => w())
2082
- }, m(i.value ? o(a)("Cancel") : o(a)("Edit")), 1)) : M("", !0)
2129
+ onClick: y[0] || (y[0] = (E) => g())
2130
+ }, v(d.value ? a(o)("Cancel") : a(o)("Edit")), 1)) : M("", !0)
2083
2131
  ])
2084
2132
  ]),
2085
- t("div", Ha, [
2133
+ t("div", Ho, [
2086
2134
  t("img", {
2087
2135
  ref_key: "image",
2088
- ref: d,
2136
+ ref: i,
2089
2137
  class: "max-w-[50vh] max-h-[50vh]",
2090
- src: o(r).requester.getPreviewUrl(o(r).modal.data.adapter, o(r).modal.data.item),
2138
+ src: a(r).requester.getPreviewUrl(a(r).modal.data.adapter, a(r).modal.data.item),
2091
2139
  alt: ""
2092
- }, null, 8, Ba)
2140
+ }, null, 8, Ro)
2093
2141
  ]),
2094
- l.value.length ? (n(), L(W, {
2142
+ l.value.length ? (n(), T(G, {
2095
2143
  key: 0,
2096
- onHidden: y[1] || (y[1] = (C) => l.value = ""),
2144
+ onHidden: y[1] || (y[1] = (E) => l.value = ""),
2097
2145
  error: c.value
2098
2146
  }, {
2099
- default: j(() => [
2100
- N(m(l.value), 1)
2147
+ default: A(() => [
2148
+ V(v(l.value), 1)
2101
2149
  ]),
2102
2150
  _: 1
2103
2151
  }, 8, ["error"])) : M("", !0)
2104
2152
  ], 64));
2105
2153
  }
2106
- }, qa = { class: "flex" }, Ia = ["aria-label"], Pa = /* @__PURE__ */ t("div", null, null, -1), Ga = {
2154
+ }, Io = { class: "flex" }, Po = ["aria-label"], Wo = /* @__PURE__ */ t("div", null, null, -1), Go = {
2107
2155
  __name: "Default",
2108
2156
  emits: ["success"],
2109
2157
  setup(p, { emit: e }) {
2110
2158
  const s = F("ServiceContainer"), r = e;
2111
2159
  return P(() => {
2112
2160
  r("success");
2113
- }), (a, d) => (n(), v(H, null, [
2114
- t("div", qa, [
2161
+ }), (o, i) => (n(), m(U, null, [
2162
+ t("div", Io, [
2115
2163
  t("h3", {
2116
2164
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2117
2165
  id: "modal-title",
2118
- "aria-label": o(s).modal.data.item.path,
2166
+ "aria-label": a(s).modal.data.item.path,
2119
2167
  "data-microtip-position": "bottom-right",
2120
2168
  role: "tooltip"
2121
- }, m(o(s).modal.data.item.basename), 9, Ia)
2169
+ }, v(a(s).modal.data.item.basename), 9, Po)
2122
2170
  ]),
2123
- Pa
2171
+ Wo
2124
2172
  ], 64));
2125
2173
  }
2126
- }, Wa = ["aria-label"], Ya = {
2174
+ }, Yo = ["aria-label"], Ko = {
2127
2175
  class: "w-full",
2128
2176
  preload: "",
2129
2177
  controls: ""
2130
- }, Ka = ["src"], Ja = {
2178
+ }, Jo = ["src"], Xo = {
2131
2179
  __name: "Video",
2132
2180
  emits: ["success"],
2133
2181
  setup(p, { emit: e }) {
2134
- const s = F("ServiceContainer"), r = e, a = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2182
+ const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2135
2183
  return P(() => {
2136
2184
  r("success");
2137
- }), (d, u) => (n(), v("div", null, [
2185
+ }), (i, u) => (n(), m("div", null, [
2138
2186
  t("h3", {
2139
2187
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2140
2188
  id: "modal-title",
2141
- "aria-label": o(s).modal.data.item.path,
2189
+ "aria-label": a(s).modal.data.item.path,
2142
2190
  "data-microtip-position": "bottom-right",
2143
2191
  role: "tooltip"
2144
- }, m(o(s).modal.data.item.basename), 9, Wa),
2192
+ }, v(a(s).modal.data.item.basename), 9, Yo),
2145
2193
  t("div", null, [
2146
- t("video", Ya, [
2194
+ t("video", Ko, [
2147
2195
  t("source", {
2148
- src: a(),
2196
+ src: o(),
2149
2197
  type: "video/mp4"
2150
- }, null, 8, Ka),
2151
- N(" Your browser does not support the video tag. ")
2198
+ }, null, 8, Jo),
2199
+ V(" Your browser does not support the video tag. ")
2152
2200
  ])
2153
2201
  ])
2154
2202
  ]));
2155
2203
  }
2156
- }, Xa = ["aria-label"], Qa = {
2204
+ }, Qo = ["aria-label"], Zo = {
2157
2205
  class: "w-full",
2158
2206
  controls: ""
2159
- }, Za = ["src"], er = {
2207
+ }, er = ["src"], tr = {
2160
2208
  __name: "Audio",
2161
2209
  emits: ["success"],
2162
2210
  setup(p, { emit: e }) {
2163
- const s = e, r = F("ServiceContainer"), a = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item);
2211
+ const s = e, r = F("ServiceContainer"), o = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item);
2164
2212
  return P(() => {
2165
2213
  s("success");
2166
- }), (d, u) => (n(), v(H, null, [
2214
+ }), (i, u) => (n(), m(U, null, [
2167
2215
  t("h3", {
2168
2216
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2169
2217
  id: "modal-title",
2170
- "aria-label": o(r).modal.data.item.path,
2218
+ "aria-label": a(r).modal.data.item.path,
2171
2219
  "data-microtip-position": "bottom-right",
2172
2220
  role: "tooltip"
2173
- }, m(o(r).modal.data.item.basename), 9, Xa),
2221
+ }, v(a(r).modal.data.item.basename), 9, Qo),
2174
2222
  t("div", null, [
2175
- t("audio", Qa, [
2223
+ t("audio", Zo, [
2176
2224
  t("source", {
2177
- src: a(),
2225
+ src: o(),
2178
2226
  type: "audio/mpeg"
2179
- }, null, 8, Za),
2180
- N(" Your browser does not support the audio element. ")
2227
+ }, null, 8, er),
2228
+ V(" Your browser does not support the audio element. ")
2181
2229
  ])
2182
2230
  ])
2183
2231
  ], 64));
2184
2232
  }
2185
- }, tr = ["aria-label"], sr = ["data"], or = ["src"], ar = /* @__PURE__ */ t("p", null, [
2186
- /* @__PURE__ */ N(" Your browser does not support PDFs. "),
2233
+ }, sr = ["aria-label"], ar = ["data"], or = ["src"], rr = /* @__PURE__ */ t("p", null, [
2234
+ /* @__PURE__ */ V(" Your browser does not support PDFs. "),
2187
2235
  /* @__PURE__ */ t("a", { href: "https://example.com/test.pdf" }, "Download the PDF"),
2188
- /* @__PURE__ */ N(" . ")
2189
- ], -1), rr = [
2190
- ar
2191
- ], nr = {
2236
+ /* @__PURE__ */ V(" . ")
2237
+ ], -1), nr = [
2238
+ rr
2239
+ ], lr = {
2192
2240
  __name: "Pdf",
2193
2241
  emits: ["success"],
2194
2242
  setup(p, { emit: e }) {
2195
- const s = F("ServiceContainer"), r = e, a = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2243
+ const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2196
2244
  return P(() => {
2197
2245
  r("success");
2198
- }), (d, u) => (n(), v(H, null, [
2246
+ }), (i, u) => (n(), m(U, null, [
2199
2247
  t("h3", {
2200
2248
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2201
2249
  id: "modal-title",
2202
- "aria-label": o(s).modal.data.item.path,
2250
+ "aria-label": a(s).modal.data.item.path,
2203
2251
  "data-microtip-position": "bottom-right",
2204
2252
  role: "tooltip"
2205
- }, m(o(s).modal.data.item.basename), 9, tr),
2253
+ }, v(a(s).modal.data.item.basename), 9, sr),
2206
2254
  t("div", null, [
2207
2255
  t("object", {
2208
2256
  class: "h-[60vh]",
2209
- data: a(),
2257
+ data: o(),
2210
2258
  type: "application/pdf",
2211
2259
  width: "100%",
2212
2260
  height: "100%"
2213
2261
  }, [
2214
2262
  t("iframe", {
2215
2263
  class: "border-0",
2216
- src: a(),
2264
+ src: o(),
2217
2265
  width: "100%",
2218
2266
  height: "100%"
2219
- }, rr, 8, or)
2220
- ], 8, sr)
2267
+ }, nr, 8, or)
2268
+ ], 8, ar)
2221
2269
  ])
2222
2270
  ], 64));
2223
2271
  }
2224
- }, lr = { class: "sm:flex sm:items-start" }, ir = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, dr = { key: 0 }, cr = { class: "text-gray-700 dark:text-gray-200 text-sm" }, ur = {
2272
+ }, ir = { class: "sm:flex sm:items-start" }, dr = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, cr = { key: 0 }, ur = { class: "text-gray-700 dark:text-gray-200 text-sm" }, mr = {
2225
2273
  key: 0,
2226
2274
  class: "flex leading-5"
2227
- }, mr = /* @__PURE__ */ t("svg", {
2275
+ }, vr = /* @__PURE__ */ t("svg", {
2228
2276
  class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
2229
2277
  xmlns: "http://www.w3.org/2000/svg",
2230
2278
  fill: "none",
@@ -2243,79 +2291,79 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2243
2291
  fill: "currentColor",
2244
2292
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2245
2293
  })
2246
- ], -1), vr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, pr = { class: "font-bold" }, hr = { class: "font-bold pl-2" }, fr = {
2294
+ ], -1), pr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, hr = { class: "font-bold" }, fr = { class: "font-bold pl-2" }, gr = {
2247
2295
  key: 0,
2248
- class: "text-xs"
2249
- }, gr = ["download", "href"], _r = {
2296
+ class: "text-xs text-gray-600 dark:text-gray-400"
2297
+ }, _r = ["download", "href"], kr = {
2250
2298
  name: "VFModalPreview"
2251
- }, kr = /* @__PURE__ */ Object.assign(_r, {
2299
+ }, br = /* @__PURE__ */ Object.assign(kr, {
2252
2300
  setup(p) {
2253
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = _(!1), a = (u) => (e.modal.data.item.mime_type ?? "").startsWith(u), d = e.features.includes(z.PREVIEW);
2254
- return d || (r.value = !0), (u, i) => (n(), L(G, null, {
2255
- buttons: j(() => [
2301
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = k(!1), o = (u) => (e.modal.data.item.mime_type ?? "").startsWith(u), i = e.features.includes(B.PREVIEW);
2302
+ return i || (r.value = !0), (u, d) => (n(), T(W, null, {
2303
+ buttons: A(() => [
2256
2304
  t("button", {
2257
2305
  type: "button",
2258
- onClick: i[6] || (i[6] = (l) => o(e).emitter.emit("vf-modal-close")),
2306
+ onClick: d[6] || (d[6] = (l) => a(e).emitter.emit("vf-modal-close")),
2259
2307
  class: "vf-btn vf-btn-secondary"
2260
- }, m(o(s)("Close")), 1),
2261
- o(e).features.includes(o(z).DOWNLOAD) ? (n(), v("a", {
2308
+ }, v(a(s)("Close")), 1),
2309
+ a(e).features.includes(a(B).DOWNLOAD) ? (n(), m("a", {
2262
2310
  key: 0,
2263
2311
  target: "_blank",
2264
2312
  class: "vf-btn vf-btn-primary",
2265
- download: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item),
2266
- href: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item)
2267
- }, m(o(s)("Download")), 9, gr)) : M("", !0)
2313
+ download: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item),
2314
+ href: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item)
2315
+ }, v(a(s)("Download")), 9, _r)) : M("", !0)
2268
2316
  ]),
2269
- default: j(() => [
2270
- t("div", lr, [
2271
- t("div", ir, [
2272
- o(d) ? (n(), v("div", dr, [
2273
- a("text") ? (n(), L(Va, {
2317
+ default: A(() => [
2318
+ t("div", ir, [
2319
+ t("div", dr, [
2320
+ a(i) ? (n(), m("div", cr, [
2321
+ o("text") ? (n(), T(No, {
2274
2322
  key: 0,
2275
- onSuccess: i[0] || (i[0] = (l) => r.value = !0)
2276
- })) : a("image") ? (n(), L(Ra, {
2323
+ onSuccess: d[0] || (d[0] = (l) => r.value = !0)
2324
+ })) : o("image") ? (n(), T(qo, {
2277
2325
  key: 1,
2278
- onSuccess: i[1] || (i[1] = (l) => r.value = !0)
2279
- })) : a("video") ? (n(), L(Ja, {
2326
+ onSuccess: d[1] || (d[1] = (l) => r.value = !0)
2327
+ })) : o("video") ? (n(), T(Xo, {
2280
2328
  key: 2,
2281
- onSuccess: i[2] || (i[2] = (l) => r.value = !0)
2282
- })) : a("audio") ? (n(), L(er, {
2329
+ onSuccess: d[2] || (d[2] = (l) => r.value = !0)
2330
+ })) : o("audio") ? (n(), T(tr, {
2283
2331
  key: 3,
2284
- onSuccess: i[3] || (i[3] = (l) => r.value = !0)
2285
- })) : a("application/pdf") ? (n(), L(nr, {
2332
+ onSuccess: d[3] || (d[3] = (l) => r.value = !0)
2333
+ })) : o("application/pdf") ? (n(), T(lr, {
2286
2334
  key: 4,
2287
- onSuccess: i[4] || (i[4] = (l) => r.value = !0)
2288
- })) : (n(), L(Ga, {
2335
+ onSuccess: d[4] || (d[4] = (l) => r.value = !0)
2336
+ })) : (n(), T(Go, {
2289
2337
  key: 5,
2290
- onSuccess: i[5] || (i[5] = (l) => r.value = !0)
2338
+ onSuccess: d[5] || (d[5] = (l) => r.value = !0)
2291
2339
  }))
2292
2340
  ])) : M("", !0),
2293
- t("div", cr, [
2294
- r.value === !1 ? (n(), v("div", ur, [
2295
- mr,
2296
- t("span", null, m(o(s)("Loading")), 1)
2341
+ t("div", ur, [
2342
+ r.value === !1 ? (n(), m("div", mr, [
2343
+ vr,
2344
+ t("span", null, v(a(s)("Loading")), 1)
2297
2345
  ])) : M("", !0)
2298
2346
  ])
2299
2347
  ])
2300
2348
  ]),
2301
- t("div", vr, [
2349
+ t("div", pr, [
2302
2350
  t("div", null, [
2303
- t("span", pr, m(o(s)("File Size")) + ": ", 1),
2304
- N(m(o(e).filesize(o(e).modal.data.item.file_size)), 1)
2351
+ t("span", hr, v(a(s)("File Size")) + ": ", 1),
2352
+ V(v(a(e).filesize(a(e).modal.data.item.file_size)), 1)
2305
2353
  ]),
2306
2354
  t("div", null, [
2307
- t("span", hr, m(o(s)("Last Modified")) + ": ", 1),
2308
- N(" " + m(o(we)(o(e).modal.data.item.last_modified)), 1)
2355
+ t("span", fr, v(a(s)("Last Modified")) + ": ", 1),
2356
+ V(" " + v(a(we)(a(e).modal.data.item.last_modified)), 1)
2309
2357
  ])
2310
2358
  ]),
2311
- o(e).features.includes(o(z).DOWNLOAD) ? (n(), v("div", fr, [
2312
- t("span", null, m(o(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1)
2359
+ a(e).features.includes(a(B).DOWNLOAD) ? (n(), m("div", gr, [
2360
+ t("span", null, v(a(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1)
2313
2361
  ])) : M("", !0)
2314
2362
  ]),
2315
2363
  _: 1
2316
2364
  }));
2317
2365
  }
2318
- }), br = { class: "sm:flex sm:items-start" }, yr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2366
+ }), yr = { class: "sm:flex sm:items-start" }, xr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2319
2367
  /* @__PURE__ */ t("svg", {
2320
2368
  xmlns: "http://www.w3.org/2000/svg",
2321
2369
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2330,10 +2378,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2330
2378
  d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
2331
2379
  })
2332
2380
  ])
2333
- ], -1), xr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, wr = {
2381
+ ], -1), wr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = {
2334
2382
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2335
2383
  id: "modal-title"
2336
- }, $r = { class: "mt-2" }, Cr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Sr = {
2384
+ }, Cr = { class: "mt-2" }, Sr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mr = {
2337
2385
  key: 0,
2338
2386
  xmlns: "http://www.w3.org/2000/svg",
2339
2387
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2341,13 +2389,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2341
2389
  viewBox: "0 0 24 24",
2342
2390
  stroke: "currentColor",
2343
2391
  "stroke-width": "1"
2344
- }, Mr = /* @__PURE__ */ t("path", {
2392
+ }, Er = /* @__PURE__ */ t("path", {
2345
2393
  "stroke-linecap": "round",
2346
2394
  "stroke-linejoin": "round",
2347
2395
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2348
- }, null, -1), Er = [
2349
- Mr
2350
- ], Dr = {
2396
+ }, null, -1), Dr = [
2397
+ Er
2398
+ ], jr = {
2351
2399
  key: 1,
2352
2400
  xmlns: "http://www.w3.org/2000/svg",
2353
2401
  class: "h-5 w-5 text-neutral-500",
@@ -2355,20 +2403,20 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2355
2403
  viewBox: "0 0 24 24",
2356
2404
  stroke: "currentColor",
2357
2405
  "stroke-width": "1"
2358
- }, jr = /* @__PURE__ */ t("path", {
2406
+ }, Ar = /* @__PURE__ */ t("path", {
2359
2407
  "stroke-linecap": "round",
2360
2408
  "stroke-linejoin": "round",
2361
2409
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2362
- }, null, -1), Ar = [
2363
- jr
2364
- ], Tr = { class: "ml-1.5" }, Lr = {
2410
+ }, null, -1), Lr = [
2411
+ Ar
2412
+ ], Tr = { class: "ml-1.5" }, Fr = {
2365
2413
  name: "VFModalRename"
2366
- }, Fr = /* @__PURE__ */ Object.assign(Lr, {
2414
+ }, Or = /* @__PURE__ */ Object.assign(Fr, {
2367
2415
  setup(p) {
2368
2416
  const e = F("ServiceContainer");
2369
2417
  e.storage;
2370
- const { t: s } = e.i18n, r = _(e.modal.data.items[0]), a = _(e.modal.data.items[0].basename), d = _(""), u = () => {
2371
- a.value != "" && e.emitter.emit("vf-fetch", {
2418
+ const { t: s } = e.i18n, r = k(e.modal.data.items[0]), o = k(e.modal.data.items[0].basename), i = k(""), u = () => {
2419
+ o.value != "" && e.emitter.emit("vf-fetch", {
2372
2420
  params: {
2373
2421
  q: "rename",
2374
2422
  m: "post",
@@ -2377,55 +2425,55 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2377
2425
  },
2378
2426
  body: {
2379
2427
  item: r.value.path,
2380
- name: a.value
2428
+ name: o.value
2381
2429
  },
2382
2430
  onSuccess: () => {
2383
- e.emitter.emit("vf-toast-push", { label: s("%s is renamed.", a.value) });
2431
+ e.emitter.emit("vf-toast-push", { label: s("%s is renamed.", o.value) });
2384
2432
  },
2385
- onError: (i) => {
2386
- d.value = s(i.message);
2433
+ onError: (d) => {
2434
+ i.value = s(d.message);
2387
2435
  }
2388
2436
  });
2389
2437
  };
2390
- return (i, l) => (n(), L(G, null, {
2391
- buttons: j(() => [
2438
+ return (d, l) => (n(), T(W, null, {
2439
+ buttons: A(() => [
2392
2440
  t("button", {
2393
2441
  type: "button",
2394
2442
  onClick: u,
2395
2443
  class: "vf-btn vf-btn-primary"
2396
- }, m(o(s)("Rename")), 1),
2444
+ }, v(a(s)("Rename")), 1),
2397
2445
  t("button", {
2398
2446
  type: "button",
2399
- onClick: l[2] || (l[2] = (c) => o(e).emitter.emit("vf-modal-close")),
2447
+ onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
2400
2448
  class: "vf-btn vf-btn-secondary"
2401
- }, m(o(s)("Cancel")), 1)
2449
+ }, v(a(s)("Cancel")), 1)
2402
2450
  ]),
2403
- default: j(() => [
2404
- t("div", br, [
2405
- yr,
2406
- t("div", xr, [
2407
- t("h3", wr, m(o(s)("Rename")), 1),
2408
- t("div", $r, [
2409
- t("p", Cr, [
2410
- r.value.type === "dir" ? (n(), v("svg", Sr, Er)) : (n(), v("svg", Dr, Ar)),
2411
- t("span", Tr, m(r.value.basename), 1)
2451
+ default: A(() => [
2452
+ t("div", yr, [
2453
+ xr,
2454
+ t("div", wr, [
2455
+ t("h3", $r, v(a(s)("Rename")), 1),
2456
+ t("div", Cr, [
2457
+ t("p", Sr, [
2458
+ r.value.type === "dir" ? (n(), m("svg", Mr, Dr)) : (n(), m("svg", jr, Lr)),
2459
+ t("span", Tr, v(r.value.basename), 1)
2412
2460
  ]),
2413
2461
  q(t("input", {
2414
- "onUpdate:modelValue": l[0] || (l[0] = (c) => a.value = c),
2462
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
2415
2463
  onKeyup: Q(u, ["enter"]),
2416
2464
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
2417
2465
  placeholder: "Name",
2418
2466
  type: "text"
2419
2467
  }, null, 544), [
2420
- [Z, a.value]
2468
+ [Z, o.value]
2421
2469
  ]),
2422
- d.value.length ? (n(), L(W, {
2470
+ i.value.length ? (n(), T(G, {
2423
2471
  key: 0,
2424
- onHidden: l[1] || (l[1] = (c) => d.value = ""),
2472
+ onHidden: l[1] || (l[1] = (c) => i.value = ""),
2425
2473
  error: ""
2426
2474
  }, {
2427
- default: j(() => [
2428
- N(m(d.value), 1)
2475
+ default: A(() => [
2476
+ V(v(i.value), 1)
2429
2477
  ]),
2430
2478
  _: 1
2431
2479
  })) : M("", !0)
@@ -2436,7 +2484,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2436
2484
  _: 1
2437
2485
  }));
2438
2486
  }
2439
- }), Nr = { class: "sm:flex sm:items-start" }, Vr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2487
+ }), Vr = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2440
2488
  /* @__PURE__ */ t("svg", {
2441
2489
  xmlns: "http://www.w3.org/2000/svg",
2442
2490
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2451,19 +2499,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2451
2499
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
2452
2500
  })
2453
2501
  ])
2454
- ], -1), zr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Or = {
2502
+ ], -1), Br = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, zr = {
2455
2503
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2456
2504
  id: "modal-title"
2457
2505
  }, Ur = { class: "mt-2" }, Hr = {
2458
2506
  key: 0,
2459
2507
  class: "pointer-events-none"
2460
- }, Br = {
2508
+ }, Rr = {
2461
2509
  key: 1,
2462
2510
  class: "pointer-events-none"
2463
- }, Rr = ["disabled"], qr = ["disabled"], Ir = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Wr = { class: "ml-1 w-full h-fit" }, Yr = { class: "text-left hidden md:block" }, Kr = { class: "text-left md:hidden" }, Jr = {
2511
+ }, qr = ["disabled"], Ir = ["disabled"], Pr = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Wr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Yr = { class: "ml-1 w-full h-fit" }, Kr = { class: "text-left hidden md:block" }, Jr = { class: "text-left md:hidden" }, Xr = {
2464
2512
  key: 0,
2465
2513
  class: "ml-auto"
2466
- }, Xr = ["title", "disabled", "onClick"], Qr = /* @__PURE__ */ t("svg", {
2514
+ }, Qr = ["title", "disabled", "onClick"], Zr = /* @__PURE__ */ t("svg", {
2467
2515
  xmlns: "http://www.w3.org/2000/svg",
2468
2516
  fill: "none",
2469
2517
  viewBox: "0 0 24 24",
@@ -2476,98 +2524,105 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2476
2524
  "stroke-linejoin": "round",
2477
2525
  d: "M6 18L18 6M6 6l12 12"
2478
2526
  })
2479
- ], -1), Zr = [
2480
- Qr
2481
- ], en = {
2527
+ ], -1), en = [
2528
+ Zr
2529
+ ], tn = {
2482
2530
  key: 0,
2483
2531
  class: "py-2"
2484
- }, tn = ["disabled"], sn = {
2532
+ }, sn = ["disabled"], an = {
2485
2533
  name: "VFModalUpload"
2486
- }, on = /* @__PURE__ */ Object.assign(sn, {
2534
+ }, on = /* @__PURE__ */ Object.assign(an, {
2487
2535
  setup(p) {
2488
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), a = {
2536
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), o = {
2489
2537
  PENDING: 0,
2490
2538
  CANCELED: 1,
2491
2539
  UPLOADING: 2,
2492
2540
  ERROR: 3,
2493
2541
  DONE: 10
2494
- }, d = _({ QUEUE_ENTRY_STATUS: a }), u = _(null), i = _(null), l = _(null), c = _(null), w = _(null), k = _(null), $ = _([]), y = _(""), C = _(!1), E = _(!1);
2495
- let g;
2496
- function f(h) {
2497
- return $.value.findIndex((A) => A.id === h);
2542
+ }, i = k({ QUEUE_ENTRY_STATUS: o }), u = k(null), d = k(null), l = k(null), c = k(null), g = k(null), _ = k(null), w = k([]), y = k(""), E = k(!1), $ = k(!1);
2543
+ let f;
2544
+ function h(j) {
2545
+ return w.value.findIndex((S) => S.id === j);
2498
2546
  }
2499
- function V(h, A = null) {
2500
- A = A ?? (h.webkitRelativePath || h.name), g.addFile({
2501
- name: A,
2502
- type: h.type,
2503
- data: h,
2547
+ function N(j, S = null) {
2548
+ S = S ?? (j.webkitRelativePath || j.name), f.addFile({
2549
+ name: S,
2550
+ type: j.type,
2551
+ data: j,
2504
2552
  source: "Local"
2505
2553
  });
2506
2554
  }
2507
- function R(h) {
2508
- switch (h.status) {
2509
- case a.DONE:
2555
+ function R(j) {
2556
+ switch (j.status) {
2557
+ case o.DONE:
2510
2558
  return "text-green-600";
2511
- case a.ERROR:
2559
+ case o.ERROR:
2512
2560
  return "text-red-600";
2513
- case a.CANCELED:
2561
+ case o.CANCELED:
2514
2562
  return "text-red-600";
2515
- case a.PENDING:
2563
+ case o.PENDING:
2516
2564
  default:
2517
2565
  return "";
2518
2566
  }
2519
2567
  }
2520
- const K = (h) => {
2521
- switch (h.status) {
2522
- case a.DONE:
2568
+ const K = (j) => {
2569
+ switch (j.status) {
2570
+ case o.DONE:
2523
2571
  return "✓";
2524
- case a.ERROR:
2525
- case a.CANCELED:
2572
+ case o.ERROR:
2573
+ case o.CANCELED:
2526
2574
  return "!";
2527
- case a.PENDING:
2575
+ case o.PENDING:
2528
2576
  default:
2529
2577
  return "...";
2530
2578
  }
2531
2579
  };
2532
- function ee() {
2580
+ function te() {
2533
2581
  c.value.click();
2534
2582
  }
2535
- function te() {
2536
- if (!C.value) {
2537
- if (!$.value.filter((h) => h.status !== a.DONE).length) {
2583
+ function se() {
2584
+ if (!E.value) {
2585
+ if (!w.value.filter((j) => j.status !== o.DONE).length) {
2538
2586
  y.value = s("Please select file to upload first.");
2539
2587
  return;
2540
2588
  }
2541
- y.value = "", g.retryAll(), g.upload();
2589
+ y.value = "", f.retryAll(), f.upload();
2542
2590
  }
2543
2591
  }
2544
- function se() {
2545
- g.cancelAll({ reason: "user" }), $.value.forEach((h) => {
2546
- h.status !== a.DONE && (h.status = a.CANCELED, h.statusName = s("Canceled"));
2547
- }), C.value = !1;
2592
+ function ae() {
2593
+ f.cancelAll({ reason: "user" }), w.value.forEach((j) => {
2594
+ j.status !== o.DONE && (j.status = o.CANCELED, j.statusName = s("Canceled"));
2595
+ }), E.value = !1;
2548
2596
  }
2549
- function oe(h) {
2550
- C.value || (g.removeFile(h.id, "removed-by-user"), $.value.splice(f(h.id), 1));
2597
+ function oe(j) {
2598
+ E.value || (f.removeFile(j.id, "removed-by-user"), w.value.splice(h(j.id), 1));
2551
2599
  }
2552
- function x(h) {
2553
- if (!C.value) {
2554
- if (g.cancelAll({ reason: "user" }), h) {
2555
- const A = [];
2556
- $.value.forEach((b) => {
2557
- b.status !== a.DONE && A.push(b);
2558
- }), $.value = [], A.forEach((b) => {
2559
- V(b.originalFile, b.name);
2600
+ function x(j) {
2601
+ if (!E.value) {
2602
+ if (f.cancelAll({ reason: "user" }), j) {
2603
+ const S = [];
2604
+ w.value.forEach((b) => {
2605
+ b.status !== o.DONE && S.push(b);
2606
+ }), w.value = [], S.forEach((b) => {
2607
+ N(b.originalFile, b.name);
2560
2608
  });
2561
2609
  return;
2562
2610
  }
2563
- $.value.splice(0);
2611
+ w.value.splice(0);
2564
2612
  }
2565
2613
  }
2566
2614
  function D() {
2567
2615
  e.emitter.emit("vf-modal-close");
2568
2616
  }
2617
+ function C() {
2618
+ return e.requester.transformRequestParams({
2619
+ url: "",
2620
+ method: "post",
2621
+ params: { q: "upload", adapter: e.data.adapter, path: e.data.dirname }
2622
+ });
2623
+ }
2569
2624
  return P(async () => {
2570
- g = new Ue({
2625
+ f = new ze({
2571
2626
  debug: e.debug,
2572
2627
  restrictions: {
2573
2628
  maxFileSize: Ye(e.maxFileSize)
@@ -2575,137 +2630,131 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2575
2630
  //allowedFileTypes
2576
2631
  },
2577
2632
  locale: r,
2578
- onBeforeFileAdded(S, T) {
2579
- if (T[S.id] != null) {
2580
- const X = f(S.id);
2581
- $.value[X].status === a.PENDING && (y.value = g.i18n("noDuplicates", { fileName: S.name })), $.value = $.value.filter((ce) => ce.id !== S.id);
2633
+ onBeforeFileAdded(b, L) {
2634
+ if (L[b.id] != null) {
2635
+ const X = h(b.id);
2636
+ w.value[X].status === o.PENDING && (y.value = f.i18n("noDuplicates", { fileName: b.name })), w.value = w.value.filter((ue) => ue.id !== b.id);
2582
2637
  }
2583
- return $.value.push({
2584
- id: S.id,
2585
- name: S.name,
2586
- size: e.filesize(S.size),
2587
- status: a.PENDING,
2638
+ return w.value.push({
2639
+ id: b.id,
2640
+ name: b.name,
2641
+ size: e.filesize(b.size),
2642
+ status: o.PENDING,
2588
2643
  statusName: s("Pending upload"),
2589
2644
  percent: null,
2590
- originalFile: S.data
2645
+ originalFile: b.data
2591
2646
  }), !0;
2592
2647
  }
2593
- });
2594
- const h = e.requester.transformRequestParams({
2595
- url: "",
2596
- method: "post",
2597
- params: { q: "upload", adapter: e.data.adapter, path: e.data.dirname }
2598
- });
2599
- e.debug && h.body != null && (h.body instanceof FormData || Object.keys(h.body).length > 0) && console.warn(`Cannot set body on upload, make sure request.transformRequest didn't set body when upload.
2600
- Will ignore for now.`), g.use(He, {
2601
- method: h.method,
2602
- endpoint: h.url + "?" + new URLSearchParams(h.params),
2603
- headers: h.headers,
2648
+ }), f.use(Ue, {
2649
+ endpoint: "WILL_BE_REPLACED_BEFORE_UPLOAD",
2604
2650
  limit: 5,
2605
2651
  timeout: 0,
2606
- getResponseError(S, T) {
2652
+ getResponseError(b, L) {
2607
2653
  let O;
2608
2654
  try {
2609
- O = JSON.parse(S).message;
2655
+ O = JSON.parse(b).message;
2610
2656
  } catch {
2611
2657
  O = s("Cannot parse server response.");
2612
2658
  }
2613
2659
  return new Error(O);
2614
2660
  }
2615
- }), g.on("restriction-failed", (S, T) => {
2616
- const O = $.value[f(S.id)];
2617
- oe(O), y.value = T.message;
2618
- }), g.on("upload", () => {
2619
- C.value = !0, $.value.forEach((S) => {
2620
- S.status !== a.DONE && (S.percent = null, S.status = a.UPLOADING, S.statusName = s("Pending upload"));
2661
+ }), f.on("restriction-failed", (b, L) => {
2662
+ const O = w.value[h(b.id)];
2663
+ oe(O), y.value = L.message;
2664
+ }), f.on("upload", () => {
2665
+ const b = C();
2666
+ f.setMeta({ ...b.body });
2667
+ const L = f.getPlugin("XHRUpload");
2668
+ L.opts.method = b.method, L.opts.endpoint = b.url + "?" + new URLSearchParams(b.params), L.opts.headers = b.headers, E.value = !0, w.value.forEach((O) => {
2669
+ O.status !== o.DONE && (O.percent = null, O.status = o.UPLOADING, O.statusName = s("Pending upload"));
2621
2670
  });
2622
- }), g.on("upload-progress", (S, T) => {
2623
- const O = Math.floor(T.bytesUploaded / T.bytesTotal * 100);
2624
- $.value[f(S.id)].percent = `${O}%`;
2625
- }), g.on("upload-success", (S) => {
2626
- const T = $.value[f(S.id)];
2627
- T.status = a.DONE, T.statusName = s("Done");
2628
- }), g.on("upload-error", (S, T) => {
2629
- const O = $.value[f(S.id)];
2630
- O.percent = null, O.status = a.ERROR, T.isNetworkError ? O.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : O.statusName = T ? T.message : s("Unknown Error");
2631
- }), g.on("error", (S) => {
2632
- y.value = S.message, C.value = !1, e.emitter.emit("vf-fetch", {
2671
+ }), f.on("upload-progress", (b, L) => {
2672
+ const O = Math.floor(L.bytesUploaded / L.bytesTotal * 100);
2673
+ w.value[h(b.id)].percent = `${O}%`;
2674
+ }), f.on("upload-success", (b) => {
2675
+ const L = w.value[h(b.id)];
2676
+ L.status = o.DONE, L.statusName = s("Done");
2677
+ }), f.on("upload-error", (b, L) => {
2678
+ const O = w.value[h(b.id)];
2679
+ O.percent = null, O.status = o.ERROR, L.isNetworkError ? O.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : O.statusName = L ? L.message : s("Unknown Error");
2680
+ }), f.on("error", (b) => {
2681
+ y.value = b.message, E.value = !1, e.emitter.emit("vf-fetch", {
2633
2682
  params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
2634
2683
  noCloseModal: !0
2635
2684
  });
2636
- }), g.on("complete", () => {
2637
- C.value = !1, e.emitter.emit("vf-fetch", {
2685
+ }), f.on("complete", () => {
2686
+ E.value = !1, e.emitter.emit("vf-fetch", {
2638
2687
  params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
2639
2688
  noCloseModal: !0
2640
2689
  });
2641
2690
  }), c.value.addEventListener("click", () => {
2642
- i.value.click();
2643
- }), w.value.addEventListener("click", () => {
2691
+ d.value.click();
2692
+ }), g.value.addEventListener("click", () => {
2644
2693
  l.value.click();
2645
- }), k.value.addEventListener("dragover", (S) => {
2646
- S.preventDefault(), E.value = !0;
2647
- }), k.value.addEventListener("dragleave", (S) => {
2648
- S.preventDefault(), E.value = !1;
2694
+ }), _.value.addEventListener("dragover", (b) => {
2695
+ b.preventDefault(), $.value = !0;
2696
+ }), _.value.addEventListener("dragleave", (b) => {
2697
+ b.preventDefault(), $.value = !1;
2649
2698
  });
2650
- function A(S, T) {
2651
- T.isFile && T.file((O) => S(T, O)), T.isDirectory && T.createReader().readEntries((O) => {
2699
+ function j(b, L) {
2700
+ L.isFile && L.file((O) => b(L, O)), L.isDirectory && L.createReader().readEntries((O) => {
2652
2701
  O.forEach((X) => {
2653
- A(S, X);
2702
+ j(b, X);
2654
2703
  });
2655
2704
  });
2656
2705
  }
2657
- k.value.addEventListener("drop", (S) => {
2658
- S.preventDefault(), E.value = !1;
2659
- const T = /^[/\\](.+)/;
2660
- [...S.dataTransfer.items].forEach((O) => {
2661
- O.kind === "file" && A((X, ce) => {
2662
- const $e = T.exec(X.fullPath);
2663
- V(ce, $e[1]);
2706
+ _.value.addEventListener("drop", (b) => {
2707
+ b.preventDefault(), $.value = !1;
2708
+ const L = /^[/\\](.+)/;
2709
+ [...b.dataTransfer.items].forEach((O) => {
2710
+ O.kind === "file" && j((X, ue) => {
2711
+ const $e = L.exec(X.fullPath);
2712
+ N(ue, $e[1]);
2664
2713
  }, O.webkitGetAsEntry());
2665
2714
  });
2666
2715
  });
2667
- const b = ({ target: S }) => {
2668
- const T = S.files;
2669
- for (const O of T)
2670
- V(O);
2671
- S.value = "";
2716
+ const S = ({ target: b }) => {
2717
+ const L = b.files;
2718
+ for (const O of L)
2719
+ N(O);
2720
+ b.value = "";
2672
2721
  };
2673
- i.value.addEventListener("change", b), l.value.addEventListener("change", b);
2722
+ d.value.addEventListener("change", S), l.value.addEventListener("change", S);
2674
2723
  }), ke(() => {
2675
- g == null || g.close({ reason: "unmount" });
2676
- }), (h, A) => (n(), L(G, null, {
2677
- buttons: j(() => [
2724
+ f == null || f.close({ reason: "unmount" });
2725
+ }), (j, S) => (n(), T(W, null, {
2726
+ buttons: A(() => [
2678
2727
  t("button", {
2679
2728
  type: "button",
2680
- class: U(["vf-btn vf-btn-primary", C.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),
2681
- disabled: C.value,
2682
- onClick: Y(te, ["prevent"])
2683
- }, m(o(s)("Upload")), 11, tn),
2684
- C.value ? (n(), v("button", {
2729
+ class: z(["vf-btn vf-btn-primary", E.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),
2730
+ disabled: E.value,
2731
+ onClick: Y(se, ["prevent"])
2732
+ }, v(a(s)("Upload")), 11, sn),
2733
+ E.value ? (n(), m("button", {
2685
2734
  key: 0,
2686
2735
  type: "button",
2687
2736
  class: "vf-btn vf-btn-secondary",
2688
- onClick: Y(se, ["prevent"])
2689
- }, m(o(s)("Cancel")), 1)) : (n(), v("button", {
2737
+ onClick: Y(ae, ["prevent"])
2738
+ }, v(a(s)("Cancel")), 1)) : (n(), m("button", {
2690
2739
  key: 1,
2691
2740
  type: "button",
2692
2741
  class: "vf-btn vf-btn-secondary",
2693
2742
  onClick: Y(D, ["prevent"])
2694
- }, m(o(s)("Close")), 1))
2743
+ }, v(a(s)("Close")), 1))
2695
2744
  ]),
2696
- default: j(() => [
2697
- t("div", Nr, [
2698
- Vr,
2699
- t("div", zr, [
2700
- t("h3", Or, m(o(s)("Upload Files")), 1),
2745
+ default: A(() => [
2746
+ t("div", Vr, [
2747
+ Nr,
2748
+ t("div", Br, [
2749
+ t("h3", zr, v(a(s)("Upload Files")), 1),
2701
2750
  t("div", Ur, [
2702
2751
  t("div", {
2703
2752
  ref_key: "dropArea",
2704
- ref: k,
2753
+ ref: _,
2705
2754
  class: "flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",
2706
- onClick: ee
2755
+ onClick: te
2707
2756
  }, [
2708
- E.value ? (n(), v("div", Hr, m(o(s)("Release to drop these files.")), 1)) : (n(), v("div", Br, m(o(s)("Drag and drop the files/folders to here or click here.")), 1))
2757
+ $.value ? (n(), m("div", Hr, v(a(s)("Release to drop these files.")), 1)) : (n(), m("div", Rr, v(a(s)("Drag and drop the files/folders to here or click here.")), 1))
2709
2758
  ], 512),
2710
2759
  t("div", {
2711
2760
  ref_key: "container",
@@ -2717,64 +2766,64 @@ Will ignore for now.`), g.use(He, {
2717
2766
  ref: c,
2718
2767
  type: "button",
2719
2768
  class: "vf-btn vf-btn-secondary"
2720
- }, m(o(s)("Select Files")), 513),
2769
+ }, v(a(s)("Select Files")), 513),
2721
2770
  t("button", {
2722
2771
  ref_key: "pickFolders",
2723
- ref: w,
2772
+ ref: g,
2724
2773
  type: "button",
2725
2774
  class: "vf-btn vf-btn-secondary"
2726
- }, m(o(s)("Select Folders")), 513),
2775
+ }, v(a(s)("Select Folders")), 513),
2727
2776
  t("button", {
2728
2777
  type: "button",
2729
2778
  class: "vf-btn vf-btn-secondary",
2730
- disabled: C.value,
2731
- onClick: A[0] || (A[0] = (b) => x(!1))
2732
- }, m(o(s)("Clear all")), 9, Rr),
2779
+ disabled: E.value,
2780
+ onClick: S[0] || (S[0] = (b) => x(!1))
2781
+ }, v(a(s)("Clear all")), 9, qr),
2733
2782
  t("button", {
2734
2783
  type: "button",
2735
2784
  class: "vf-btn vf-btn-secondary",
2736
- disabled: C.value,
2737
- onClick: A[1] || (A[1] = (b) => x(!0))
2738
- }, m(o(s)("Clear only successful")), 9, qr)
2785
+ disabled: E.value,
2786
+ onClick: S[1] || (S[1] = (b) => x(!0))
2787
+ }, v(a(s)("Clear only successful")), 9, Ir)
2739
2788
  ], 512),
2740
- t("div", Ir, [
2741
- (n(!0), v(H, null, I($.value, (b) => (n(), v("div", {
2789
+ t("div", Pr, [
2790
+ (n(!0), m(U, null, I(w.value, (b) => (n(), m("div", {
2742
2791
  class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
2743
2792
  key: b.id
2744
2793
  }, [
2745
- t("span", Pr, [
2794
+ t("span", Wr, [
2746
2795
  t("span", {
2747
- class: U(["text-base m-auto", R(b)]),
2748
- textContent: m(K(b))
2796
+ class: z(["text-base m-auto", R(b)]),
2797
+ textContent: v(K(b))
2749
2798
  }, null, 10, Gr)
2750
2799
  ]),
2751
- t("div", Wr, [
2752
- t("div", Yr, m(o(he)(b.name, 40)) + " (" + m(b.size) + ")", 1),
2753
- t("div", Kr, m(o(he)(b.name, 16)) + " (" + m(b.size) + ")", 1),
2800
+ t("div", Yr, [
2801
+ t("div", Kr, v(a(he)(b.name, 40)) + " (" + v(b.size) + ")", 1),
2802
+ t("div", Jr, v(a(he)(b.name, 16)) + " (" + v(b.size) + ")", 1),
2754
2803
  t("div", {
2755
- class: U(["flex break-all text-left", R(b)])
2804
+ class: z(["flex break-all text-left", R(b)])
2756
2805
  }, [
2757
- N(m(b.statusName) + " ", 1),
2758
- b.status === d.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), v("b", Jr, m(b.percent), 1)) : M("", !0)
2806
+ V(v(b.statusName) + " ", 1),
2807
+ b.status === i.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), m("b", Xr, v(b.percent), 1)) : M("", !0)
2759
2808
  ], 2)
2760
2809
  ]),
2761
2810
  t("button", {
2762
2811
  type: "button",
2763
- class: U(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", C.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
2764
- title: o(s)("Delete"),
2765
- disabled: C.value,
2766
- onClick: (S) => oe(b)
2767
- }, Zr, 10, Xr)
2812
+ class: z(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", E.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
2813
+ title: a(s)("Delete"),
2814
+ disabled: E.value,
2815
+ onClick: (L) => oe(b)
2816
+ }, en, 10, Qr)
2768
2817
  ]))), 128)),
2769
- $.value.length ? M("", !0) : (n(), v("div", en, m(o(s)("No files selected!")), 1))
2818
+ w.value.length ? M("", !0) : (n(), m("div", tn, v(a(s)("No files selected!")), 1))
2770
2819
  ]),
2771
- y.value.length ? (n(), L(W, {
2820
+ y.value.length ? (n(), T(G, {
2772
2821
  key: 0,
2773
- onHidden: A[2] || (A[2] = (b) => y.value = ""),
2822
+ onHidden: S[2] || (S[2] = (b) => y.value = ""),
2774
2823
  error: ""
2775
2824
  }, {
2776
- default: j(() => [
2777
- N(m(y.value), 1)
2825
+ default: A(() => [
2826
+ V(v(y.value), 1)
2778
2827
  ]),
2779
2828
  _: 1
2780
2829
  })) : M("", !0)
@@ -2783,7 +2832,7 @@ Will ignore for now.`), g.use(He, {
2783
2832
  ]),
2784
2833
  t("input", {
2785
2834
  ref_key: "internalFileInput",
2786
- ref: i,
2835
+ ref: d,
2787
2836
  type: "file",
2788
2837
  multiple: "",
2789
2838
  class: "hidden"
@@ -2800,7 +2849,7 @@ Will ignore for now.`), g.use(He, {
2800
2849
  _: 1
2801
2850
  }));
2802
2851
  }
2803
- }), an = { class: "sm:flex sm:items-start" }, rn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2852
+ }), rn = { class: "sm:flex sm:items-start" }, nn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2804
2853
  /* @__PURE__ */ t("svg", {
2805
2854
  xmlns: "http://www.w3.org/2000/svg",
2806
2855
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2815,13 +2864,13 @@ Will ignore for now.`), g.use(He, {
2815
2864
  d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
2816
2865
  })
2817
2866
  ])
2818
- ], -1), nn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ln = {
2867
+ ], -1), ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, dn = {
2819
2868
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2820
2869
  id: "modal-title"
2821
- }, dn = { class: "mt-2" }, cn = {
2870
+ }, cn = { class: "mt-2" }, un = {
2822
2871
  class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
2823
2872
  style: { "max-height": "200px" }
2824
- }, un = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, mn = {
2873
+ }, mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vn = {
2825
2874
  key: 0,
2826
2875
  xmlns: "http://www.w3.org/2000/svg",
2827
2876
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2829,13 +2878,13 @@ Will ignore for now.`), g.use(He, {
2829
2878
  viewBox: "0 0 24 24",
2830
2879
  stroke: "currentColor",
2831
2880
  "stroke-width": "1"
2832
- }, vn = /* @__PURE__ */ t("path", {
2881
+ }, pn = /* @__PURE__ */ t("path", {
2833
2882
  "stroke-linecap": "round",
2834
2883
  "stroke-linejoin": "round",
2835
2884
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2836
- }, null, -1), pn = [
2837
- vn
2838
- ], hn = {
2885
+ }, null, -1), hn = [
2886
+ pn
2887
+ ], fn = {
2839
2888
  key: 1,
2840
2889
  xmlns: "http://www.w3.org/2000/svg",
2841
2890
  class: "h-5 w-5 text-neutral-500",
@@ -2843,20 +2892,20 @@ Will ignore for now.`), g.use(He, {
2843
2892
  viewBox: "0 0 24 24",
2844
2893
  stroke: "currentColor",
2845
2894
  "stroke-width": "1"
2846
- }, fn = /* @__PURE__ */ t("path", {
2895
+ }, gn = /* @__PURE__ */ t("path", {
2847
2896
  "stroke-linecap": "round",
2848
2897
  "stroke-linejoin": "round",
2849
2898
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2850
- }, null, -1), gn = [
2851
- fn
2852
- ], _n = { class: "ml-1.5" }, kn = ["placeholder"], bn = {
2899
+ }, null, -1), _n = [
2900
+ gn
2901
+ ], kn = { class: "ml-1.5" }, bn = ["placeholder"], yn = {
2853
2902
  name: "VFModalArchive"
2854
- }, yn = /* @__PURE__ */ Object.assign(bn, {
2903
+ }, xn = /* @__PURE__ */ Object.assign(yn, {
2855
2904
  setup(p) {
2856
2905
  const e = F("ServiceContainer");
2857
2906
  e.storage;
2858
- const { t: s } = e.i18n, r = _(""), a = _(""), d = _(e.modal.data.items), u = () => {
2859
- d.value.length && e.emitter.emit("vf-fetch", {
2907
+ const { t: s } = e.i18n, r = k(""), o = k(""), i = k(e.modal.data.items), u = () => {
2908
+ i.value.length && e.emitter.emit("vf-fetch", {
2860
2909
  params: {
2861
2910
  q: "archive",
2862
2911
  m: "post",
@@ -2864,58 +2913,58 @@ Will ignore for now.`), g.use(He, {
2864
2913
  path: e.data.dirname
2865
2914
  },
2866
2915
  body: {
2867
- items: d.value.map(({ path: i, type: l }) => ({ path: i, type: l })),
2916
+ items: i.value.map(({ path: d, type: l }) => ({ path: d, type: l })),
2868
2917
  name: r.value
2869
2918
  },
2870
2919
  onSuccess: () => {
2871
2920
  e.emitter.emit("vf-toast-push", { label: s("The file(s) archived.") });
2872
2921
  },
2873
- onError: (i) => {
2874
- a.value = s(i.message);
2922
+ onError: (d) => {
2923
+ o.value = s(d.message);
2875
2924
  }
2876
2925
  });
2877
2926
  };
2878
- return (i, l) => (n(), L(G, null, {
2879
- buttons: j(() => [
2927
+ return (d, l) => (n(), T(W, null, {
2928
+ buttons: A(() => [
2880
2929
  t("button", {
2881
2930
  type: "button",
2882
2931
  onClick: u,
2883
2932
  class: "vf-btn vf-btn-primary"
2884
- }, m(o(s)("Archive")), 1),
2933
+ }, v(a(s)("Archive")), 1),
2885
2934
  t("button", {
2886
2935
  type: "button",
2887
- onClick: l[2] || (l[2] = (c) => o(e).emitter.emit("vf-modal-close")),
2936
+ onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
2888
2937
  class: "vf-btn vf-btn-secondary"
2889
- }, m(o(s)("Cancel")), 1)
2938
+ }, v(a(s)("Cancel")), 1)
2890
2939
  ]),
2891
- default: j(() => [
2892
- t("div", an, [
2893
- rn,
2894
- t("div", nn, [
2895
- t("h3", ln, m(o(s)("Archive the files")), 1),
2896
- t("div", dn, [
2897
- t("div", cn, [
2898
- (n(!0), v(H, null, I(d.value, (c) => (n(), v("p", un, [
2899
- c.type === "dir" ? (n(), v("svg", mn, pn)) : (n(), v("svg", hn, gn)),
2900
- t("span", _n, m(c.basename), 1)
2940
+ default: A(() => [
2941
+ t("div", rn, [
2942
+ nn,
2943
+ t("div", ln, [
2944
+ t("h3", dn, v(a(s)("Archive the files")), 1),
2945
+ t("div", cn, [
2946
+ t("div", un, [
2947
+ (n(!0), m(U, null, I(i.value, (c) => (n(), m("p", mn, [
2948
+ c.type === "dir" ? (n(), m("svg", vn, hn)) : (n(), m("svg", fn, _n)),
2949
+ t("span", kn, v(c.basename), 1)
2901
2950
  ]))), 256))
2902
2951
  ]),
2903
2952
  q(t("input", {
2904
2953
  "onUpdate:modelValue": l[0] || (l[0] = (c) => r.value = c),
2905
2954
  onKeyup: Q(u, ["enter"]),
2906
2955
  class: "my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
2907
- placeholder: o(s)("Archive name. (.zip file will be created)"),
2956
+ placeholder: a(s)("Archive name. (.zip file will be created)"),
2908
2957
  type: "text"
2909
- }, null, 40, kn), [
2958
+ }, null, 40, bn), [
2910
2959
  [Z, r.value]
2911
2960
  ]),
2912
- a.value.length ? (n(), L(W, {
2961
+ o.value.length ? (n(), T(G, {
2913
2962
  key: 0,
2914
- onHidden: l[1] || (l[1] = (c) => a.value = ""),
2963
+ onHidden: l[1] || (l[1] = (c) => o.value = ""),
2915
2964
  error: ""
2916
2965
  }, {
2917
- default: j(() => [
2918
- N(m(a.value), 1)
2966
+ default: A(() => [
2967
+ V(v(o.value), 1)
2919
2968
  ]),
2920
2969
  _: 1
2921
2970
  })) : M("", !0)
@@ -2926,7 +2975,7 @@ Will ignore for now.`), g.use(He, {
2926
2975
  _: 1
2927
2976
  }));
2928
2977
  }
2929
- }), xn = { class: "sm:flex sm:items-start" }, wn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2978
+ }), wn = { class: "sm:flex sm:items-start" }, $n = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2930
2979
  /* @__PURE__ */ t("svg", {
2931
2980
  xmlns: "http://www.w3.org/2000/svg",
2932
2981
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2941,10 +2990,10 @@ Will ignore for now.`), g.use(He, {
2941
2990
  d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
2942
2991
  })
2943
2992
  ])
2944
- ], -1), $n = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Cn = {
2993
+ ], -1), Cn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Sn = {
2945
2994
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2946
2995
  id: "modal-title"
2947
- }, Sn = { class: "mt-2" }, Mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, En = {
2996
+ }, Mn = { class: "mt-2" }, En = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Dn = {
2948
2997
  key: 0,
2949
2998
  xmlns: "http://www.w3.org/2000/svg",
2950
2999
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2952,13 +3001,13 @@ Will ignore for now.`), g.use(He, {
2952
3001
  viewBox: "0 0 24 24",
2953
3002
  stroke: "currentColor",
2954
3003
  "stroke-width": "1"
2955
- }, Dn = /* @__PURE__ */ t("path", {
3004
+ }, jn = /* @__PURE__ */ t("path", {
2956
3005
  "stroke-linecap": "round",
2957
3006
  "stroke-linejoin": "round",
2958
3007
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2959
- }, null, -1), jn = [
2960
- Dn
2961
- ], An = {
3008
+ }, null, -1), An = [
3009
+ jn
3010
+ ], Ln = {
2962
3011
  key: 1,
2963
3012
  xmlns: "http://www.w3.org/2000/svg",
2964
3013
  class: "h-5 w-5 text-neutral-500",
@@ -2970,17 +3019,17 @@ Will ignore for now.`), g.use(He, {
2970
3019
  "stroke-linecap": "round",
2971
3020
  "stroke-linejoin": "round",
2972
3021
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2973
- }, null, -1), Ln = [
3022
+ }, null, -1), Fn = [
2974
3023
  Tn
2975
- ], Fn = { class: "ml-1.5" }, Nn = { class: "my-1 text-sm text-gray-500" }, Vn = {
3024
+ ], On = { class: "ml-1.5" }, Vn = { class: "my-1 text-sm text-gray-500" }, Nn = {
2976
3025
  name: "VFModalUnarchive"
2977
- }, zn = /* @__PURE__ */ Object.assign(Vn, {
3026
+ }, Bn = /* @__PURE__ */ Object.assign(Nn, {
2978
3027
  setup(p) {
2979
3028
  const e = F("ServiceContainer");
2980
3029
  e.storage;
2981
3030
  const { t: s } = e.i18n;
2982
- _("");
2983
- const r = _(e.modal.data.items[0]), a = _(""), d = _([]), u = () => {
3031
+ k("");
3032
+ const r = k(e.modal.data.items[0]), o = k(""), i = k([]), u = () => {
2984
3033
  e.emitter.emit("vf-fetch", {
2985
3034
  params: {
2986
3035
  q: "unarchive",
@@ -2994,42 +3043,42 @@ Will ignore for now.`), g.use(He, {
2994
3043
  onSuccess: () => {
2995
3044
  e.emitter.emit("vf-toast-push", { label: s("The file unarchived.") });
2996
3045
  },
2997
- onError: (i) => {
2998
- a.value = s(i.message);
3046
+ onError: (d) => {
3047
+ o.value = s(d.message);
2999
3048
  }
3000
3049
  });
3001
3050
  };
3002
- return (i, l) => (n(), L(G, null, {
3003
- buttons: j(() => [
3051
+ return (d, l) => (n(), T(W, null, {
3052
+ buttons: A(() => [
3004
3053
  t("button", {
3005
3054
  type: "button",
3006
3055
  onClick: u,
3007
3056
  class: "vf-btn vf-btn-primary"
3008
- }, m(o(s)("Unarchive")), 1),
3057
+ }, v(a(s)("Unarchive")), 1),
3009
3058
  t("button", {
3010
3059
  type: "button",
3011
- onClick: l[1] || (l[1] = (c) => o(e).emitter.emit("vf-modal-close")),
3060
+ onClick: l[1] || (l[1] = (c) => a(e).emitter.emit("vf-modal-close")),
3012
3061
  class: "vf-btn vf-btn-secondary"
3013
- }, m(o(s)("Cancel")), 1)
3062
+ }, v(a(s)("Cancel")), 1)
3014
3063
  ]),
3015
- default: j(() => [
3016
- t("div", xn, [
3017
- wn,
3018
- t("div", $n, [
3019
- t("h3", Cn, m(o(s)("Unarchive")), 1),
3020
- t("div", Sn, [
3021
- (n(!0), v(H, null, I(d.value, (c) => (n(), v("p", Mn, [
3022
- c.type === "dir" ? (n(), v("svg", En, jn)) : (n(), v("svg", An, Ln)),
3023
- t("span", Fn, m(c.basename), 1)
3064
+ default: A(() => [
3065
+ t("div", wn, [
3066
+ $n,
3067
+ t("div", Cn, [
3068
+ t("h3", Sn, v(a(s)("Unarchive")), 1),
3069
+ t("div", Mn, [
3070
+ (n(!0), m(U, null, I(i.value, (c) => (n(), m("p", En, [
3071
+ c.type === "dir" ? (n(), m("svg", Dn, An)) : (n(), m("svg", Ln, Fn)),
3072
+ t("span", On, v(c.basename), 1)
3024
3073
  ]))), 256)),
3025
- t("p", Nn, m(o(s)("The archive will be unarchived at")) + " (" + m(i.current.dirname) + ")", 1),
3026
- a.value.length ? (n(), L(W, {
3074
+ t("p", Vn, v(a(s)("The archive will be unarchived at")) + " (" + v(d.current.dirname) + ")", 1),
3075
+ o.value.length ? (n(), T(G, {
3027
3076
  key: 0,
3028
- onHidden: l[0] || (l[0] = (c) => a.value = ""),
3077
+ onHidden: l[0] || (l[0] = (c) => o.value = ""),
3029
3078
  error: ""
3030
3079
  }, {
3031
- default: j(() => [
3032
- N(m(a.value), 1)
3080
+ default: A(() => [
3081
+ V(v(o.value), 1)
3033
3082
  ]),
3034
3083
  _: 1
3035
3084
  })) : M("", !0)
@@ -3040,7 +3089,7 @@ Will ignore for now.`), g.use(He, {
3040
3089
  _: 1
3041
3090
  }));
3042
3091
  }
3043
- }), On = { class: "sm:flex sm:items-start" }, Un = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3092
+ }), zn = { class: "sm:flex sm:items-start" }, Un = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3044
3093
  /* @__PURE__ */ t("svg", {
3045
3094
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
3046
3095
  xmlns: "http://www.w3.org/2000/svg",
@@ -3056,10 +3105,10 @@ Will ignore for now.`), g.use(He, {
3056
3105
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
3057
3106
  })
3058
3107
  ])
3059
- ], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Bn = {
3108
+ ], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Rn = {
3060
3109
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
3061
3110
  id: "modal-title"
3062
- }, Rn = { class: "text-sm text-gray-500 pb-1" }, qn = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, In = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Pn = {
3111
+ }, qn = { class: "text-sm text-gray-500 pb-1" }, In = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, Pn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Wn = {
3063
3112
  key: 0,
3064
3113
  xmlns: "http://www.w3.org/2000/svg",
3065
3114
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -3071,9 +3120,9 @@ Will ignore for now.`), g.use(He, {
3071
3120
  "stroke-linecap": "round",
3072
3121
  "stroke-linejoin": "round",
3073
3122
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
3074
- }, null, -1), Wn = [
3123
+ }, null, -1), Yn = [
3075
3124
  Gn
3076
- ], Yn = {
3125
+ ], Kn = {
3077
3126
  key: 1,
3078
3127
  xmlns: "http://www.w3.org/2000/svg",
3079
3128
  class: "h-5 w-5 text-neutral-500",
@@ -3081,13 +3130,13 @@ Will ignore for now.`), g.use(He, {
3081
3130
  viewBox: "0 0 24 24",
3082
3131
  stroke: "currentColor",
3083
3132
  "stroke-width": "1"
3084
- }, Kn = /* @__PURE__ */ t("path", {
3133
+ }, Jn = /* @__PURE__ */ t("path", {
3085
3134
  "stroke-linecap": "round",
3086
3135
  "stroke-linejoin": "round",
3087
3136
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
3088
- }, null, -1), Jn = [
3089
- Kn
3090
- ], Xn = { class: "ml-1.5" }, Qn = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, Zn = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, el = /* @__PURE__ */ t("svg", {
3137
+ }, null, -1), Xn = [
3138
+ Jn
3139
+ ], Qn = { class: "ml-1.5" }, Zn = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, el = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, tl = /* @__PURE__ */ t("svg", {
3091
3140
  xmlns: "http://www.w3.org/2000/svg",
3092
3141
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
3093
3142
  fill: "none",
@@ -3100,13 +3149,13 @@ Will ignore for now.`), g.use(He, {
3100
3149
  "stroke-linejoin": "round",
3101
3150
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
3102
3151
  })
3103
- ], -1), tl = { class: "ml-1.5 overflow-auto" }, sl = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, ol = {
3152
+ ], -1), sl = { class: "ml-1.5 overflow-auto" }, al = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, ol = {
3104
3153
  name: "VFModalMove"
3105
- }, al = /* @__PURE__ */ Object.assign(ol, {
3154
+ }, rl = /* @__PURE__ */ Object.assign(ol, {
3106
3155
  setup(p) {
3107
3156
  const e = F("ServiceContainer"), { t: s } = e.i18n;
3108
3157
  e.storage;
3109
- const r = _(e.modal.data.items.from), a = _(""), d = () => {
3158
+ const r = k(e.modal.data.items.from), o = k(""), i = () => {
3110
3159
  r.value.length && e.emitter.emit("vf-fetch", {
3111
3160
  params: {
3112
3161
  q: "move",
@@ -3115,57 +3164,57 @@ Will ignore for now.`), g.use(He, {
3115
3164
  path: e.data.dirname
3116
3165
  },
3117
3166
  body: {
3118
- items: r.value.map(({ path: u, type: i }) => ({ path: u, type: i })),
3167
+ items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d })),
3119
3168
  item: e.modal.data.items.to.path
3120
3169
  },
3121
3170
  onSuccess: () => {
3122
3171
  e.emitter.emit("vf-toast-push", { label: s("Files moved.", e.modal.data.items.to.name) });
3123
3172
  },
3124
3173
  onError: (u) => {
3125
- a.value = s(u.message);
3174
+ o.value = s(u.message);
3126
3175
  }
3127
3176
  });
3128
3177
  };
3129
- return (u, i) => (n(), L(G, null, {
3130
- buttons: j(() => [
3178
+ return (u, d) => (n(), T(W, null, {
3179
+ buttons: A(() => [
3131
3180
  t("button", {
3132
3181
  type: "button",
3133
- onClick: d,
3182
+ onClick: i,
3134
3183
  class: "vf-btn vf-btn-primary"
3135
- }, m(o(s)("Yes, Move!")), 1),
3184
+ }, v(a(s)("Yes, Move!")), 1),
3136
3185
  t("button", {
3137
3186
  type: "button",
3138
- onClick: i[1] || (i[1] = (l) => o(e).emitter.emit("vf-modal-close")),
3187
+ onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
3139
3188
  class: "vf-btn vf-btn-secondary"
3140
- }, m(o(s)("Cancel")), 1),
3141
- t("div", sl, m(o(s)("%s item(s) selected.", r.value.length)), 1)
3189
+ }, v(a(s)("Cancel")), 1),
3190
+ t("div", al, v(a(s)("%s item(s) selected.", r.value.length)), 1)
3142
3191
  ]),
3143
- default: j(() => [
3144
- t("div", On, [
3192
+ default: A(() => [
3193
+ t("div", zn, [
3145
3194
  Un,
3146
3195
  t("div", Hn, [
3147
- t("h3", Bn, m(o(s)("Move files")), 1),
3148
- t("p", Rn, m(o(s)("Are you sure you want to move these files?")), 1),
3149
- t("div", qn, [
3150
- (n(!0), v(H, null, I(r.value, (l) => (n(), v("div", In, [
3196
+ t("h3", Rn, v(a(s)("Move files")), 1),
3197
+ t("p", qn, v(a(s)("Are you sure you want to move these files?")), 1),
3198
+ t("div", In, [
3199
+ (n(!0), m(U, null, I(r.value, (l) => (n(), m("div", Pn, [
3151
3200
  t("div", null, [
3152
- l.type === "dir" ? (n(), v("svg", Pn, Wn)) : (n(), v("svg", Yn, Jn))
3201
+ l.type === "dir" ? (n(), m("svg", Wn, Yn)) : (n(), m("svg", Kn, Xn))
3153
3202
  ]),
3154
- t("div", Xn, m(l.path), 1)
3203
+ t("div", Qn, v(l.path), 1)
3155
3204
  ]))), 256))
3156
3205
  ]),
3157
- t("h4", Qn, m(o(s)("Target Directory")), 1),
3158
- t("p", Zn, [
3159
- el,
3160
- t("span", tl, m(o(e).modal.data.items.to.path), 1)
3206
+ t("h4", Zn, v(a(s)("Target Directory")), 1),
3207
+ t("p", el, [
3208
+ tl,
3209
+ t("span", sl, v(a(e).modal.data.items.to.path), 1)
3161
3210
  ]),
3162
- a.value.length ? (n(), L(W, {
3211
+ o.value.length ? (n(), T(G, {
3163
3212
  key: 0,
3164
- onHidden: i[0] || (i[0] = (l) => a.value = ""),
3213
+ onHidden: d[0] || (d[0] = (l) => o.value = ""),
3165
3214
  error: ""
3166
3215
  }, {
3167
- default: j(() => [
3168
- N(m(a.value), 1)
3216
+ default: A(() => [
3217
+ V(v(o.value), 1)
3169
3218
  ]),
3170
3219
  _: 1
3171
3220
  })) : M("", !0)
@@ -3175,41 +3224,41 @@ Will ignore for now.`), g.use(He, {
3175
3224
  _: 1
3176
3225
  }));
3177
3226
  }
3178
- }), rl = (p, e) => {
3227
+ }), nl = (p, e) => {
3179
3228
  const s = p.__vccOpts || p;
3180
- for (const [r, a] of e)
3181
- s[r] = a;
3229
+ for (const [r, o] of e)
3230
+ s[r] = o;
3182
3231
  return s;
3183
- }, nl = {
3232
+ }, ll = {
3184
3233
  props: {
3185
3234
  on: { type: String, required: !0 }
3186
3235
  },
3187
3236
  setup(p, { emit: e, slots: s }) {
3188
- const r = F("ServiceContainer"), a = _(!1), { t: d } = r.i18n;
3237
+ const r = F("ServiceContainer"), o = k(!1), { t: i } = r.i18n;
3189
3238
  let u = null;
3190
- const i = () => {
3191
- clearTimeout(u), a.value = !0, u = setTimeout(() => {
3192
- a.value = !1;
3239
+ const d = () => {
3240
+ clearTimeout(u), o.value = !0, u = setTimeout(() => {
3241
+ o.value = !1;
3193
3242
  }, 2e3);
3194
3243
  };
3195
3244
  return P(() => {
3196
- r.emitter.on(p.on, i);
3197
- }), Le(() => {
3245
+ r.emitter.on(p.on, d);
3246
+ }), Te(() => {
3198
3247
  clearTimeout(u);
3199
3248
  }), {
3200
- shown: a,
3201
- t: d
3249
+ shown: o,
3250
+ t: i
3202
3251
  };
3203
3252
  }
3204
- }, ll = { key: 1 };
3205
- function il(p, e, s, r, a, d) {
3206
- return n(), v("div", {
3207
- class: U(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !r.shown }]])
3253
+ }, il = { key: 1 };
3254
+ function dl(p, e, s, r, o, i) {
3255
+ return n(), m("div", {
3256
+ class: z(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !r.shown }]])
3208
3257
  }, [
3209
- p.$slots.default ? ne(p.$slots, "default", { key: 0 }) : (n(), v("span", ll, m(r.t("Saved.")), 1))
3258
+ p.$slots.default ? le(p.$slots, "default", { key: 0 }) : (n(), m("span", il, v(r.t("Saved.")), 1))
3210
3259
  ], 2);
3211
3260
  }
3212
- const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:items-start" }, cl = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3261
+ const ve = /* @__PURE__ */ nl(ll, [["render", dl]]), cl = { class: "sm:flex sm:items-start" }, ul = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3213
3262
  /* @__PURE__ */ t("svg", {
3214
3263
  xmlns: "http://www.w3.org/2000/svg",
3215
3264
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -3229,34 +3278,34 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3229
3278
  d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
3230
3279
  })
3231
3280
  ])
3232
- ], -1), ul = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ml = {
3281
+ ], -1), ml = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, vl = {
3233
3282
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
3234
3283
  id: "modal-title"
3235
- }, vl = { class: "mt-2" }, pl = { class: "text-sm text-gray-500" }, hl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, fl = { class: "mt-3 text-left" }, gl = { class: "space-y-2" }, _l = { class: "flex relative gap-x-3" }, kl = { class: "h-6 items-center" }, bl = { class: "flex-1 block text-sm" }, yl = {
3284
+ }, pl = { class: "mt-2" }, hl = { class: "text-sm text-gray-500" }, fl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, gl = { class: "mt-3 text-left" }, _l = { class: "space-y-2" }, kl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, yl = { class: "flex-1 block text-sm" }, xl = {
3236
3285
  for: "metric_unit",
3237
3286
  class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
3238
- }, xl = { class: "flex relative gap-x-3" }, wl = { class: "h-6 items-center" }, $l = {
3287
+ }, wl = { class: "flex relative gap-x-3" }, $l = { class: "h-6 items-center" }, Cl = {
3239
3288
  for: "theme",
3240
3289
  class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
3241
- }, Cl = { class: "flex text-sm" }, Sl = ["label"], Ml = ["value"], El = {
3290
+ }, Sl = { class: "flex text-sm" }, Ml = ["label"], El = ["value"], Dl = {
3242
3291
  key: 0,
3243
3292
  class: "flex relative gap-x-3"
3244
- }, Dl = { class: "h-6 items-center" }, jl = {
3293
+ }, jl = { class: "h-6 items-center" }, Al = {
3245
3294
  for: "language",
3246
- class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
3247
- }, Al = { class: "flex text-sm" }, Tl = ["label"], Ll = ["value"], Fl = {
3295
+ class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"
3296
+ }, Ll = { class: "flex text-sm" }, Tl = ["label"], Fl = ["value"], Ol = {
3248
3297
  name: "VFModalAbout"
3249
- }, Nl = /* @__PURE__ */ Object.assign(Fl, {
3298
+ }, Vl = /* @__PURE__ */ Object.assign(Ol, {
3250
3299
  setup(p) {
3251
- const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore: a } = e.storage, { t: d, changeLocale: u, locale: i } = e.i18n;
3252
- _(""), _("");
3300
+ const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore: o } = e.storage, { t: i, changeLocale: u, locale: d } = e.i18n;
3301
+ k(""), k("");
3253
3302
  const l = async () => {
3254
- a(), location.reload();
3255
- }, c = (E) => {
3256
- e.theme.set(E), e.emitter.emit("vf-theme-saved");
3257
- }, w = () => {
3303
+ o(), location.reload();
3304
+ }, c = ($) => {
3305
+ e.theme.set($), e.emitter.emit("vf-theme-saved");
3306
+ }, g = () => {
3258
3307
  e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? xe : ye, r("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved");
3259
- }, k = F("supportedLocales"), y = Object.fromEntries(
3308
+ }, { i18n: _ } = F("VueFinderOptions"), y = Object.fromEntries(
3260
3309
  Object.entries({
3261
3310
  en: "English",
3262
3311
  fr: "French (Français)",
@@ -3269,116 +3318,116 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3269
3318
  tr: "Turkish (Türkçe)",
3270
3319
  zhCN: "Simplified Chinese (简体中文)",
3271
3320
  zhTW: "Traditional Chinese (繁體中文)"
3272
- }).filter(([E]) => Object.keys(k).includes(E))
3273
- ), C = {
3274
- system: d("System"),
3275
- light: d("Light"),
3276
- dark: d("Dark")
3277
- };
3278
- return (E, g) => (n(), L(G, null, {
3279
- buttons: j(() => [
3321
+ }).filter(([$]) => Object.keys(_).includes($))
3322
+ ), E = ee(() => ({
3323
+ system: i("System"),
3324
+ light: i("Light"),
3325
+ dark: i("Dark")
3326
+ }));
3327
+ return ($, f) => (n(), T(W, null, {
3328
+ buttons: A(() => [
3280
3329
  t("button", {
3281
3330
  type: "button",
3282
- onClick: g[5] || (g[5] = (f) => o(e).emitter.emit("vf-modal-close")),
3331
+ onClick: f[5] || (f[5] = (h) => a(e).emitter.emit("vf-modal-close")),
3283
3332
  class: "vf-btn vf-btn-secondary"
3284
- }, m(o(d)("Close")), 1)
3333
+ }, v(a(i)("Close")), 1)
3285
3334
  ]),
3286
- default: j(() => [
3287
- t("div", dl, [
3288
- cl,
3289
- t("div", ul, [
3290
- t("h3", ml, m(o(d)("About %s", "Vuefinder " + o(e).version)), 1),
3291
- t("div", vl, [
3292
- t("p", pl, m(o(d)("Vuefinder is a file manager component for vue 3.")), 1),
3335
+ default: A(() => [
3336
+ t("div", cl, [
3337
+ ul,
3338
+ t("div", ml, [
3339
+ t("h3", vl, v(a(i)("About %s", "Vuefinder " + a(e).version)), 1),
3340
+ t("div", pl, [
3341
+ t("p", hl, v(a(i)("Vuefinder is a file manager component for vue 3.")), 1),
3293
3342
  t("div", null, [
3294
- t("h3", hl, m(o(d)("Settings")), 1)
3343
+ t("h3", fl, v(a(i)("Settings")), 1)
3295
3344
  ]),
3296
- t("div", fl, [
3345
+ t("div", gl, [
3297
3346
  t("fieldset", null, [
3298
- t("div", gl, [
3299
- t("div", _l, [
3300
- t("div", kl, [
3347
+ t("div", _l, [
3348
+ t("div", kl, [
3349
+ t("div", bl, [
3301
3350
  q(t("input", {
3302
3351
  id: "metric_unit",
3303
3352
  name: "metric_unit",
3304
3353
  type: "checkbox",
3305
- "onUpdate:modelValue": g[0] || (g[0] = (f) => o(e).metricUnits = f),
3306
- onClick: w,
3354
+ "onUpdate:modelValue": f[0] || (f[0] = (h) => a(e).metricUnits = h),
3355
+ onClick: g,
3307
3356
  class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
3308
3357
  }, null, 512), [
3309
- [Fe, o(e).metricUnits]
3358
+ [Fe, a(e).metricUnits]
3310
3359
  ])
3311
3360
  ]),
3312
- t("div", bl, [
3313
- t("label", yl, [
3314
- N(m(o(d)("Use Metric Units")) + " ", 1),
3315
- B(me, {
3361
+ t("div", yl, [
3362
+ t("label", xl, [
3363
+ V(v(a(i)("Use Metric Units")) + " ", 1),
3364
+ H(ve, {
3316
3365
  class: "ms-3",
3317
3366
  on: "vf-metric-units-saved"
3318
3367
  }, {
3319
- default: j(() => [
3320
- N(m(o(d)("Saved.")), 1)
3368
+ default: A(() => [
3369
+ V(v(a(i)("Saved.")), 1)
3321
3370
  ]),
3322
3371
  _: 1
3323
3372
  })
3324
3373
  ])
3325
3374
  ])
3326
3375
  ]),
3327
- t("div", xl, [
3328
- t("div", wl, [
3329
- t("label", $l, m(o(d)("Theme")), 1)
3376
+ t("div", wl, [
3377
+ t("div", $l, [
3378
+ t("label", Cl, v(a(i)("Theme")), 1)
3330
3379
  ]),
3331
- t("div", Cl, [
3380
+ t("div", Sl, [
3332
3381
  q(t("select", {
3333
3382
  id: "theme",
3334
- "onUpdate:modelValue": g[1] || (g[1] = (f) => o(e).theme.value = f),
3335
- onChange: g[2] || (g[2] = (f) => c(f.target.value)),
3383
+ "onUpdate:modelValue": f[1] || (f[1] = (h) => a(e).theme.value = h),
3384
+ onChange: f[2] || (f[2] = (h) => c(h.target.value)),
3336
3385
  class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3337
3386
  }, [
3338
3387
  t("optgroup", {
3339
- label: o(d)("Theme")
3388
+ label: a(i)("Theme")
3340
3389
  }, [
3341
- (n(), v(H, null, I(C, (f, V) => t("option", { value: V }, m(f), 9, Ml)), 64))
3342
- ], 8, Sl)
3390
+ (n(!0), m(U, null, I(E.value, (h, N) => (n(), m("option", { value: N }, v(h), 9, El))), 256))
3391
+ ], 8, Ml)
3343
3392
  ], 544), [
3344
- [pe, o(e).theme.value]
3393
+ [pe, a(e).theme.value]
3345
3394
  ]),
3346
- B(me, {
3395
+ H(ve, {
3347
3396
  class: "ms-3 flex-shrink-0 flex-grow basis-full",
3348
3397
  on: "vf-theme-saved"
3349
3398
  }, {
3350
- default: j(() => [
3351
- N(m(o(d)("Saved.")), 1)
3399
+ default: A(() => [
3400
+ V(v(a(i)("Saved.")), 1)
3352
3401
  ]),
3353
3402
  _: 1
3354
3403
  })
3355
3404
  ])
3356
3405
  ]),
3357
- o(e).features.includes(o(z).LANGUAGE) ? (n(), v("div", El, [
3358
- t("div", Dl, [
3359
- t("label", jl, m(o(d)("Language")), 1)
3406
+ a(e).features.includes(a(B).LANGUAGE) && Object.keys(a(y)).length > 1 ? (n(), m("div", Dl, [
3407
+ t("div", jl, [
3408
+ t("label", Al, v(a(i)("Language")), 1)
3360
3409
  ]),
3361
- t("div", Al, [
3410
+ t("div", Ll, [
3362
3411
  q(t("select", {
3363
3412
  id: "language",
3364
- "onUpdate:modelValue": g[3] || (g[3] = (f) => _e(i) ? i.value = f : null),
3365
- onChange: g[4] || (g[4] = (f) => o(u)(f.target.value)),
3366
- class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3413
+ "onUpdate:modelValue": f[3] || (f[3] = (h) => _e(d) ? d.value = h : null),
3414
+ onChange: f[4] || (f[4] = (h) => a(u)(h.target.value)),
3415
+ class: "flex-shrink-0 w-1/2 sm:w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3367
3416
  }, [
3368
3417
  t("optgroup", {
3369
- label: o(d)("Language")
3418
+ label: a(i)("Language")
3370
3419
  }, [
3371
- (n(!0), v(H, null, I(o(y), (f, V) => (n(), v("option", { value: V }, m(f), 9, Ll))), 256))
3420
+ (n(!0), m(U, null, I(a(y), (h, N) => (n(), m("option", { value: N }, v(h), 9, Fl))), 256))
3372
3421
  ], 8, Tl)
3373
3422
  ], 544), [
3374
- [pe, o(i)]
3423
+ [pe, a(d)]
3375
3424
  ]),
3376
- B(me, {
3425
+ H(ve, {
3377
3426
  class: "ms-3 flex-shrink-0 flex-grow basis-full",
3378
3427
  on: "vf-language-saved"
3379
3428
  }, {
3380
- default: j(() => [
3381
- N(m(o(d)("Saved.")), 1)
3429
+ default: A(() => [
3430
+ V(v(a(i)("Saved.")), 1)
3382
3431
  ]),
3383
3432
  _: 1
3384
3433
  })
@@ -3388,7 +3437,7 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3388
3437
  onClick: l,
3389
3438
  type: "button",
3390
3439
  class: "vf-btn vf-btn-secondary"
3391
- }, m(o(d)("Reset Settings")), 1)
3440
+ }, v(a(i)("Reset Settings")), 1)
3392
3441
  ])
3393
3442
  ])
3394
3443
  ])
@@ -3399,30 +3448,32 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3399
3448
  _: 1
3400
3449
  }));
3401
3450
  }
3402
- }), Vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3451
+ }), Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3403
3452
  __proto__: null,
3404
- ModalAbout: Nl,
3405
- ModalArchive: yn,
3406
- ModalDelete: aa,
3407
- ModalMessage: ma,
3408
- ModalMove: al,
3409
- ModalNewFile: ja,
3410
- ModalNewFolder: ya,
3411
- ModalPreview: kr,
3412
- ModalRename: Fr,
3413
- ModalUnarchive: zn,
3453
+ ModalAbout: Vl,
3454
+ ModalArchive: xn,
3455
+ ModalDelete: oo,
3456
+ ModalMessage: vo,
3457
+ ModalMove: rl,
3458
+ ModalNewFile: Ao,
3459
+ ModalNewFolder: xo,
3460
+ ModalPreview: br,
3461
+ ModalRename: Or,
3462
+ ModalUnarchive: Bn,
3414
3463
  ModalUpload: on
3415
- }, Symbol.toStringTag, { value: "Module" })), Wl = {
3464
+ }, Symbol.toStringTag, { value: "Module" })), Yl = {
3416
3465
  /** @param {import('vue').App} app
3417
3466
  * @param options
3418
3467
  */
3419
3468
  install(p, e = {}) {
3420
- p.component("VueFinder", Ao);
3421
- for (const s of Object.values(Vl))
3422
- p.component(s.name, s);
3423
- p.provide("supportedLocales", e.i18n ?? {});
3469
+ p.component("VueFinder", Aa);
3470
+ for (const r of Object.values(Nl))
3471
+ p.component(r.name, r);
3472
+ e.i18n = e.i18n ?? {};
3473
+ let [s] = Object.keys(e.i18n);
3474
+ e.locale = e.locale ?? s ?? "en", p.provide("VueFinderOptions", e);
3424
3475
  }
3425
3476
  };
3426
3477
  export {
3427
- Wl as default
3478
+ Yl as default
3428
3479
  };