@burdenoff/microfe-files 2026.527.3 → 2026.527.4

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.
@@ -44,27 +44,27 @@ import { nativeImpact as Fe, nativeNotify as Ie, nativeOpenUrl as Le } from "../
44
44
  import { emitFilesEvent as Re } from "../utils/events.js";
45
45
  import { useEffect as ze, useMemo as Be, useState as o } from "react";
46
46
  import { FolderPlus as Ve, FolderUp as He, FolderX as Ue, Grid3x3 as We, Home as Ge, List as Ke, Loader2 as s, Search as qe, Trash2 as Je, Upload as Ye, X as Xe } from "lucide-react";
47
- import { useFeatureFlagDetails as Ze } from "@burdenoff/fe-libs/shared/feature-flags";
48
47
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
49
- import { useNavigate as Qe, useParams as $e } from "react-router-dom";
50
- import { useI18n as et } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
48
+ import { useNavigate as Ze, useParams as Qe } from "react-router-dom";
49
+ import { useI18n as $e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
51
50
  //#region src/files/pages/BrowserPage.tsx
52
51
  function d() {
53
- let { t: d } = et(), { folderId: f } = $e(), p = Qe(), tt = e(), { workspaceId: m } = tt, { viewMode: nt, setViewMode: rt, breadcrumbs: it, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, at] = o("all"), ot = Ze("files.starred"), st = Ze("files.bin"), ct = ot ? !!ot.value : !1, lt = st ? !!st.value : !1, ut = Be(() => {
54
- let e = ["all", "recent"];
55
- return ct && e.push("starred"), lt && e.push("bin"), e;
56
- }, [ct, lt]);
52
+ let { t: d } = $e(), { folderId: f } = Qe(), p = Ze(), et = e(), { workspaceId: m } = et, { viewMode: tt, setViewMode: nt, breadcrumbs: rt, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, it] = o("all"), at = Be(() => [
53
+ "all",
54
+ "recent",
55
+ "starred"
56
+ ], []);
57
57
  ze(() => {
58
- ut.includes(v) || at("all");
59
- }, [ut, v]);
60
- let [dt, ft] = o(""), [pt, mt] = o(), y = dt.trim().length >= 2, [ht, gt] = o(null), [b, _t] = o(null), x = be(), S = r({
58
+ at.includes(v) || it("all");
59
+ }, [at, v]);
60
+ let [y, ot] = o(""), [st, ct] = o(), b = y.trim().length >= 2, [lt, ut] = o(null), [x, dt] = o(null), S = be(), C = r({
61
61
  folderId: f || void 0,
62
62
  pageSize: 100,
63
- skip: v !== "all" || y
64
- }), C = i({ skip: v !== "recent" || y }), w = ee({ skip: v !== "starred" || y || !ct }), T = te({ skip: v !== "bin" || y || !lt }), E = ye(dt, y, pt);
63
+ skip: v !== "all" || b
64
+ }), w = i({ skip: v !== "recent" || b }), T = ee({ skip: v !== "starred" || b }), ft = te({ skip: v !== "bin" || b }), E = ye(y, b, st);
65
65
  ze(() => {
66
- if (f && S.data?.folderPath && S.data?.currentFolder) {
67
- let e = S.data.folderPath.folders || [], n = S.data.currentFolder, r = [...e.map((e) => ({
66
+ if (f && C.data?.folderPath && C.data?.currentFolder) {
67
+ let e = C.data.folderPath.folders || [], n = C.data.currentFolder, r = [...e.map((e) => ({
68
68
  id: e.id,
69
69
  name: e.name
70
70
  })), {
@@ -73,26 +73,26 @@ function d() {
73
73
  }];
74
74
  t.getState().setBreadcrumbs(r);
75
75
  } else t.getState().setBreadcrumbs([]);
76
- }, [f, S.data]);
76
+ }, [f, C.data]);
77
77
  let D = [], O = [], k = !1, A = null, j = !1;
78
- if (y && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
78
+ if (b && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
79
79
  else switch (v) {
80
80
  case "all":
81
- D = S.data?.filesList?.files || [], O = S.data?.foldersList?.folders || [], k = S.loading, A = S.error || null, j = !1;
81
+ D = C.data?.filesList?.files || [], O = C.data?.foldersList?.folders || [], k = C.loading, A = C.error || null, j = !1;
82
82
  break;
83
83
  case "recent":
84
- D = C.files || [], O = C.folders || [], k = C.isLoading, A = C.error || null, j = !0;
84
+ D = w.files || [], O = w.folders || [], k = w.isLoading, A = w.error || null, j = !0;
85
85
  break;
86
86
  case "starred":
87
- D = w.files, O = w.folders, k = w.isLoading, A = w.error || null, j = !0;
87
+ D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
88
88
  break;
89
89
  case "bin":
90
- D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
90
+ D = ft.files, O = ft.folders, k = ft.isLoading, A = ft.error || null, j = !0;
91
91
  break;
92
92
  }
93
- let vt = v === "all" ? (S.data?.filesList?.total ?? D.length) + (S.data?.foldersList?.total ?? O.length) : null, M = h.size + g.size, [yt, N] = o(!1), [bt, xt] = o(!1), [St, P] = o(!1), [Ct, F] = o(!1), [wt, I] = o(!1), [Tt, Et] = o(!1), [Dt, L] = o(null), [R, z] = o(null), [B, Ot] = o(null), [V, H] = o(null), [U, W] = o(""), [G, K] = o(""), [kt, q] = o(!1), [At, J] = o([]), [jt, Y] = o(!1), [X, Z] = o(null), Q = (e, t) => {
94
- Re(tt, e, t);
95
- }, Mt = async () => {
93
+ let pt = v === "all" ? (C.data?.filesList?.total ?? D.length) + (C.data?.foldersList?.total ?? O.length) : null, M = h.size + g.size, [mt, N] = o(!1), [ht, gt] = o(!1), [_t, P] = o(!1), [vt, F] = o(!1), [yt, I] = o(!1), [bt, xt] = o(!1), [St, L] = o(null), [R, z] = o(null), [B, Ct] = o(null), [V, H] = o(null), [U, W] = o(""), [G, K] = o(""), [wt, q] = o(!1), [Tt, J] = o([]), [Et, Y] = o(!1), [X, Z] = o(null), Q = (e, t) => {
94
+ Re(et, e, t);
95
+ }, Dt = async () => {
96
96
  if (!X || X.loading) return;
97
97
  let e = X.onConfirm;
98
98
  Z({
@@ -110,7 +110,7 @@ function d() {
110
110
  loading: !1
111
111
  });
112
112
  }
113
- }, $ = ne(), Nt = re(), Pt = ie(), Ft = ae(), It = oe(), Lt = se(), Rt = ce(), zt = le(), Bt = ue(), Vt = de(), Ht = fe(), Ut = pe(), Wt = me(), Gt = he(), Kt = ge(), qt = _e(), Jt = ve(), Yt = () => {
113
+ }, $ = ne(), Ot = re(), kt = ie(), At = ae(), jt = oe(), Mt = se(), Nt = ce(), Pt = le(), Ft = ue(), It = de(), Lt = fe(), Rt = pe(), zt = me(), Bt = he(), Vt = ge(), Ht = _e(), Ut = ve(), Wt = () => {
114
114
  let e = document.createElement("input");
115
115
  e.type = "file", e.multiple = !0, e.onchange = async (e) => {
116
116
  let t = e.target.files;
@@ -127,11 +127,11 @@ function d() {
127
127
  };
128
128
  }));
129
129
  J((t) => [...t, ...e]), Y(!0), q(!0);
130
- for (let t of e) await Xt(t);
130
+ for (let t of e) await Gt(t);
131
131
  q(!1);
132
132
  }
133
133
  }, e.click();
134
- }, Xt = async (e) => {
134
+ }, Gt = async (e) => {
135
135
  let t = (t) => {
136
136
  J((n) => n.map((n) => n.id === e.id ? {
137
137
  ...n,
@@ -140,7 +140,7 @@ function d() {
140
140
  };
141
141
  t({ status: "uploading" });
142
142
  try {
143
- let n = await Nt.mutateAsync({
143
+ let n = await Ot.mutateAsync({
144
144
  file: e.file,
145
145
  folderId: e.folderId,
146
146
  onProgress: (e) => {
@@ -160,7 +160,7 @@ function d() {
160
160
  r === "Upload paused" ? t({ status: "paused" }) : r === "QUOTA_EXHAUSTED" ? (t({
161
161
  status: "failed",
162
162
  error: a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
163
- }), x.error(a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded. Please upgrade your plan or delete files."))) : (t({
163
+ }), S.error(a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded. Please upgrade your plan or delete files."))) : (t({
164
164
  status: "failed",
165
165
  error: r
166
166
  }), Q("files.api.failed", {
@@ -169,30 +169,30 @@ function d() {
169
169
  message: r
170
170
  }));
171
171
  }
172
- }, Zt = (e) => {
173
- Nt.pause(), J((t) => t.map((t) => t.id === e ? {
172
+ }, Kt = (e) => {
173
+ Ot.pause(), J((t) => t.map((t) => t.id === e ? {
174
174
  ...t,
175
175
  status: "paused"
176
176
  } : t));
177
- }, Qt = (e) => {
178
- let t = At.find((t) => t.id === e);
179
- t && Xt(t);
180
- }, $t = (e) => {
181
- let t = At.find((t) => t.id === e);
177
+ }, qt = (e) => {
178
+ let t = Tt.find((t) => t.id === e);
179
+ t && Gt(t);
180
+ }, Jt = (e) => {
181
+ let t = Tt.find((t) => t.id === e);
182
182
  t && (J((t) => t.map((t) => t.id === e ? {
183
183
  ...t,
184
184
  status: "pending",
185
185
  progress: 0,
186
186
  error: void 0
187
- } : t)), Xt(t));
188
- }, en = (e) => {
187
+ } : t)), Gt(t));
188
+ }, Yt = (e) => {
189
189
  J((t) => {
190
190
  let n = t.filter((t) => t.id !== e);
191
191
  return n.length === 0 && (Y(!1), q(!1)), n;
192
192
  });
193
- }, tn = () => {
193
+ }, Xt = () => {
194
194
  if (!m) {
195
- x.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
195
+ S.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
196
196
  return;
197
197
  }
198
198
  let e = document.createElement("input");
@@ -233,23 +233,23 @@ function d() {
233
233
  }
234
234
  }
235
235
  J((e) => [...e, ...i]), Y(!0), q(!0);
236
- for (let e of i) await Xt(e);
237
- q(!1), x.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
236
+ for (let e of i) await Gt(e);
237
+ q(!1), S.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
238
238
  count: i.length,
239
239
  plural: i.length > 1 ? "s" : ""
240
240
  }));
241
241
  }
242
242
  }, e.click();
243
- }, nn = () => {
243
+ }, Zt = () => {
244
244
  N(!0);
245
- }, rn = async () => {
245
+ }, Qt = async () => {
246
246
  if (G.trim() && m) {
247
247
  let { data: e, error: t } = await $.mutateAsync({
248
248
  name: G,
249
249
  parentFolderId: f
250
250
  });
251
251
  if (t) {
252
- Pe(t) ? (N(!1), K(""), xt(!0)) : (x.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), Q("files.api.failed", {
252
+ Pe(t) ? (N(!1), K(""), gt(!0)) : (S.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), Q("files.api.failed", {
253
253
  action: "createFolder",
254
254
  message: t instanceof Error ? t.message : "Folder creation failed"
255
255
  }));
@@ -260,13 +260,13 @@ function d() {
260
260
  parentFolderId: f
261
261
  }));
262
262
  }
263
- }, an = (e) => {
264
- _t(e);
265
- }, on = (e) => {
263
+ }, $t = (e) => {
264
+ dt(e);
265
+ }, en = (e) => {
266
266
  L(e), F(!0);
267
- }, sn = (e) => {
267
+ }, tn = (e) => {
268
268
  L(e), F(!0);
269
- }, cn = async (e) => {
269
+ }, nn = async (e) => {
270
270
  if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
271
271
  let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
272
272
  if (e.fileId) {
@@ -279,7 +279,7 @@ function d() {
279
279
  shareType: t,
280
280
  accessLevel: "DOWNLOAD"
281
281
  };
282
- n = (await Ut.mutateAsync(r))?.token ?? "", Q("files.share.created", {
282
+ n = (await Rt.mutateAsync(r))?.token ?? "", Q("files.share.created", {
283
283
  entityType: "file",
284
284
  fileId: e.fileId,
285
285
  shareType: t
@@ -294,7 +294,7 @@ function d() {
294
294
  shareType: t,
295
295
  accessLevel: "DOWNLOAD"
296
296
  };
297
- n = (await Wt.mutateAsync(r))?.createFolderShare?.token ?? "", Q("files.share.created", {
297
+ n = (await zt.mutateAsync(r))?.createFolderShare?.token ?? "", Q("files.share.created", {
298
298
  entityType: "folder",
299
299
  folderId: e.folderId,
300
300
  shareType: t
@@ -304,7 +304,7 @@ function d() {
304
304
  publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
305
305
  token: n
306
306
  };
307
- }, ln = async (e) => {
307
+ }, rn = async (e) => {
308
308
  Fe("medium"), Z({
309
309
  title: a(d, "files.confirm.deleteFile.title", "Delete file"),
310
310
  description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
@@ -312,13 +312,13 @@ function d() {
312
312
  variant: "danger",
313
313
  onConfirm: async () => {
314
314
  try {
315
- await Pt.mutateAsync({ id: e.id }), Ie("success"), x.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.file.deleted", {
315
+ await kt.mutateAsync({ id: e.id }), Ie("success"), S.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.file.deleted", {
316
316
  fileId: e.id,
317
317
  fileName: e.name,
318
318
  permanent: !1
319
319
  });
320
320
  } catch (t) {
321
- x.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Ie("error"), Q("files.api.failed", {
321
+ S.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Ie("error"), Q("files.api.failed", {
322
322
  action: "deleteFile",
323
323
  fileId: e.id,
324
324
  message: t instanceof Error ? t.message : "Failed to delete file"
@@ -326,16 +326,16 @@ function d() {
326
326
  }
327
327
  }
328
328
  });
329
- }, un = async (e) => {
329
+ }, an = async (e) => {
330
330
  try {
331
- await It.mutateAsync({ id: e.id }), x.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.file.restored", {
331
+ await jt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.file.restored", {
332
332
  fileId: e.id,
333
333
  fileName: e.name
334
334
  });
335
335
  } catch (e) {
336
- x.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
336
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
337
337
  }
338
- }, dn = async (e) => {
338
+ }, on = async (e) => {
339
339
  Fe("heavy"), Z({
340
340
  title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
341
341
  description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
@@ -343,19 +343,19 @@ function d() {
343
343
  variant: "danger",
344
344
  onConfirm: async () => {
345
345
  try {
346
- await Rt.mutateAsync({ id: e.id }), x.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.file.deleted", {
346
+ await Nt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.file.deleted", {
347
347
  fileId: e.id,
348
348
  fileName: e.name,
349
349
  permanent: !0
350
350
  });
351
351
  } catch (e) {
352
- x.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
352
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
353
353
  }
354
354
  }
355
355
  });
356
- }, fn = async (e) => {
356
+ }, sn = async (e) => {
357
357
  try {
358
- await Bt.mutateAsync({
358
+ await Ft.mutateAsync({
359
359
  id: e.id,
360
360
  type: "file"
361
361
  }), Q("files.file.starred", {
@@ -364,47 +364,47 @@ function d() {
364
364
  starred: !e.starred
365
365
  });
366
366
  } catch {
367
- x.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
367
+ S.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
368
368
  action: "toggleFileStar",
369
369
  fileId: e.id
370
370
  });
371
371
  }
372
- }, pn = (e) => {
372
+ }, cn = (e) => {
373
373
  H({
374
374
  id: e.id,
375
375
  name: e.name,
376
376
  type: "file"
377
377
  }), W(e.name), P(!0);
378
- }, mn = async (e) => {
378
+ }, ln = async (e) => {
379
379
  try {
380
380
  let t = e.downloadUrl || e.url;
381
381
  if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
382
382
  let n = document.createElement("a");
383
- n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), x.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Q("files.file.downloaded", {
383
+ n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), S.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Q("files.file.downloaded", {
384
384
  fileId: e.id,
385
385
  fileName: e.name
386
386
  });
387
387
  } catch (e) {
388
- x.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
388
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
389
389
  }
390
- }, hn = (e) => {
391
- Ot({
390
+ }, un = (e) => {
391
+ Ct({
392
392
  item: e,
393
393
  type: "file"
394
- }), Et(!0);
395
- }, gn = (e) => {
394
+ }), xt(!0);
395
+ }, dn = (e) => {
396
396
  z({
397
397
  item: e,
398
398
  type: "file"
399
399
  }), I(!0);
400
- }, _n = (e) => {
401
- gt({
400
+ }, fn = (e) => {
401
+ ut({
402
402
  item: e,
403
403
  type: "file"
404
404
  });
405
- }, vn = (e) => {
405
+ }, pn = (e) => {
406
406
  p(`/files/browse/${e.id}`);
407
- }, yn = async (e) => {
407
+ }, mn = async (e) => {
408
408
  Fe("medium"), Z({
409
409
  title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
410
410
  description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
@@ -412,29 +412,29 @@ function d() {
412
412
  variant: "danger",
413
413
  onConfirm: async () => {
414
414
  try {
415
- await Ft.mutateAsync({
415
+ await At.mutateAsync({
416
416
  id: e.id,
417
417
  recursive: !0
418
- }), x.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.folder.deleted", {
418
+ }), S.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.folder.deleted", {
419
419
  folderId: e.id,
420
420
  folderName: e.name,
421
421
  permanent: !1
422
422
  });
423
423
  } catch (e) {
424
- x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
424
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
425
425
  }
426
426
  }
427
427
  });
428
- }, bn = async (e) => {
428
+ }, hn = async (e) => {
429
429
  try {
430
- await Lt.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.folder.restored", {
430
+ await Mt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.folder.restored", {
431
431
  folderId: e.id,
432
432
  folderName: e.name
433
433
  });
434
434
  } catch (e) {
435
- x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
435
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
436
436
  }
437
- }, xn = async (e) => {
437
+ }, gn = async (e) => {
438
438
  Z({
439
439
  title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
440
440
  description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
@@ -442,30 +442,30 @@ function d() {
442
442
  variant: "danger",
443
443
  onConfirm: async () => {
444
444
  try {
445
- await zt.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.folder.deleted", {
445
+ await Pt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.folder.deleted", {
446
446
  folderId: e.id,
447
447
  folderName: e.name,
448
448
  permanent: !0
449
449
  });
450
450
  } catch (e) {
451
- x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
451
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
452
452
  }
453
453
  }
454
454
  });
455
- }, Sn = (e) => {
455
+ }, _n = (e) => {
456
456
  H({
457
457
  id: e.id,
458
458
  name: e.name,
459
459
  type: "folder"
460
460
  }), W(e.name), P(!0);
461
- }, Cn = (e) => {
461
+ }, vn = (e) => {
462
462
  z({
463
463
  item: e,
464
464
  type: "folder"
465
465
  }), I(!0);
466
- }, wn = async (e) => {
466
+ }, yn = async (e) => {
467
467
  try {
468
- await Bt.mutateAsync({
468
+ await Ft.mutateAsync({
469
469
  id: e.id,
470
470
  type: "folder"
471
471
  }), Q("files.folder.starred", {
@@ -474,80 +474,80 @@ function d() {
474
474
  starred: !e.starred
475
475
  });
476
476
  } catch {
477
- x.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
477
+ S.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
478
478
  action: "toggleFolderStar",
479
479
  folderId: e.id
480
480
  });
481
481
  }
482
- }, Tn = (e) => {
483
- gt({
482
+ }, bn = (e) => {
483
+ ut({
484
484
  item: e,
485
485
  type: "folder"
486
486
  });
487
- }, En = async (e) => {
487
+ }, xn = async (e) => {
488
488
  if (R) try {
489
- R.type === "file" ? (await Kt.mutateAsync({
489
+ R.type === "file" ? (await Vt.mutateAsync({
490
490
  fileId: R.item.id,
491
491
  targetFolderId: e || null
492
- }), x.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.file.moved", {
492
+ }), S.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.file.moved", {
493
493
  fileId: R.item.id,
494
494
  fileName: R.item.name,
495
495
  destinationFolderId: e
496
- })) : (await qt.mutateAsync({
496
+ })) : (await Ht.mutateAsync({
497
497
  folderId: R.item.id,
498
498
  targetParentFolderId: e
499
- }), x.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.folder.moved", {
499
+ }), S.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.folder.moved", {
500
500
  folderId: R.item.id,
501
501
  folderName: R.item.name,
502
502
  destinationFolderId: e
503
503
  })), I(!1), z(null);
504
504
  } catch (e) {
505
- x.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Q("files.api.failed", {
505
+ S.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Q("files.api.failed", {
506
506
  action: R.type === "file" ? "moveFile" : "moveFolder",
507
507
  itemId: R.item.id,
508
508
  itemType: R.type,
509
509
  message: e instanceof Error ? e.message : void 0
510
510
  });
511
511
  }
512
- }, Dn = async (e, t) => {
512
+ }, Sn = async (e, t) => {
513
513
  if (B) try {
514
514
  if (B.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
515
- await Gt.mutateAsync({
515
+ await Bt.mutateAsync({
516
516
  id: B.item.id,
517
517
  newName: t || `Copy of ${B.item.name}`,
518
518
  targetFolderId: e || void 0
519
- }), x.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: B.item.name })), Q("files.file.copied", {
519
+ }), S.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: B.item.name })), Q("files.file.copied", {
520
520
  fileId: B.item.id,
521
521
  fileName: B.item.name,
522
522
  destinationFolderId: e
523
- }), Et(!1), Ot(null);
523
+ }), xt(!1), Ct(null);
524
524
  } catch (e) {
525
- x.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: B.item.name })), Q("files.api.failed", {
525
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: B.item.name })), Q("files.api.failed", {
526
526
  action: "copyFile",
527
527
  fileId: B.item.id,
528
528
  message: e instanceof Error ? e.message : void 0
529
529
  });
530
530
  }
531
- }, On = async () => {
531
+ }, Cn = async () => {
532
532
  if (!(!V || !U.trim())) try {
533
533
  let e = V.name, t = U.trim();
534
- V.type === "file" ? (await Vt.mutateAsync({
534
+ V.type === "file" ? (await It.mutateAsync({
535
535
  fileId: V.id,
536
536
  newName: t
537
- }), x.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.file.renamed", {
537
+ }), S.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.file.renamed", {
538
538
  fileId: V.id,
539
539
  previousName: e,
540
540
  name: t
541
- })) : (await Ht.mutateAsync({
541
+ })) : (await Lt.mutateAsync({
542
542
  folderId: V.id,
543
543
  newName: t
544
- }), x.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.folder.renamed", {
544
+ }), S.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.folder.renamed", {
545
545
  folderId: V.id,
546
546
  previousName: e,
547
547
  name: t
548
548
  })), P(!1), H(null), W("");
549
549
  } catch (e) {
550
- x.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: V.type })), Q("files.api.failed", {
550
+ S.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: V.type })), Q("files.api.failed", {
551
551
  action: V.type === "file" ? "renameFile" : "renameFolder",
552
552
  itemId: V.id,
553
553
  itemType: V.type,
@@ -558,10 +558,10 @@ function d() {
558
558
  return n({
559
559
  files: D,
560
560
  folders: O,
561
- onFilePreview: an,
562
- onFileDelete: ln,
563
- onFolderOpen: vn,
564
- onFolderDelete: yn,
561
+ onFilePreview: $t,
562
+ onFileDelete: rn,
563
+ onFolderOpen: pn,
564
+ onFolderDelete: mn,
565
565
  activeTab: v
566
566
  }), m === void 0 ? /* @__PURE__ */ u("div", {
567
567
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
@@ -593,7 +593,7 @@ function d() {
593
593
  className: "hidden sm:inline",
594
594
  children: a(d, "files.browser.rootLabel", "My Drive")
595
595
  })]
596
- }), it.map((e, t) => /* @__PURE__ */ u("div", {
596
+ }), rt.map((e, t) => /* @__PURE__ */ u("div", {
597
597
  className: "flex items-center gap-1 sm:gap-2",
598
598
  children: [/* @__PURE__ */ l("span", {
599
599
  className: "text-text-tertiary",
@@ -601,7 +601,7 @@ function d() {
601
601
  }), /* @__PURE__ */ l("button", {
602
602
  type: "button",
603
603
  onClick: () => p(`/files/browse/${e.id}`),
604
- className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === it.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
604
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === rt.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
605
605
  title: `Go to ${e.name}`,
606
606
  children: e.name
607
607
  })]
@@ -611,8 +611,8 @@ function d() {
611
611
  }),
612
612
  /* @__PURE__ */ l(Ce, {
613
613
  activeTab: v,
614
- onTabChange: at,
615
- tabs: ut
614
+ onTabChange: it,
615
+ tabs: at
616
616
  }),
617
617
  /* @__PURE__ */ u("div", {
618
618
  className: "bg-bg-surface border-b border-border-default px-4 py-2 sm:px-6 sm:py-3",
@@ -625,17 +625,17 @@ function d() {
625
625
  className: "relative w-full max-w-2xl",
626
626
  children: /* @__PURE__ */ l(ke, {
627
627
  onSearch: (e, t) => {
628
- ft(e), mt(t);
628
+ ot(e), ct(t);
629
629
  },
630
630
  placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
631
- initialQuery: dt,
631
+ initialQuery: y,
632
632
  showFilters: !0
633
633
  })
634
634
  })
635
635
  }), /* @__PURE__ */ u("div", {
636
636
  className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
637
637
  children: [
638
- !y && (D.length > 0 || O.length > 0) && /* @__PURE__ */ l("button", {
638
+ !b && (D.length > 0 || O.length > 0) && /* @__PURE__ */ l("button", {
639
639
  type: "button",
640
640
  onClick: () => {
641
641
  let e = D.map((e) => e.id), n = O.map((e) => e.id);
@@ -644,10 +644,10 @@ function d() {
644
644
  className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200",
645
645
  children: a(d, "files.browser.actions.selectAll", "Select All")
646
646
  }),
647
- !y && /* @__PURE__ */ u(c, { children: [
647
+ !b && /* @__PURE__ */ u(c, { children: [
648
648
  /* @__PURE__ */ u("button", {
649
649
  type: "button",
650
- onClick: nn,
650
+ onClick: Zt,
651
651
  className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm",
652
652
  children: [/* @__PURE__ */ l(Ve, { className: "size-4" }), /* @__PURE__ */ l("span", {
653
653
  className: "hidden sm:inline",
@@ -656,10 +656,10 @@ function d() {
656
656
  }),
657
657
  /* @__PURE__ */ l("button", {
658
658
  type: "button",
659
- onClick: Yt,
660
- disabled: kt,
659
+ onClick: Wt,
660
+ disabled: wt,
661
661
  className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
662
- children: kt ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), /* @__PURE__ */ l("span", {
662
+ children: wt ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), /* @__PURE__ */ l("span", {
663
663
  className: "hidden sm:inline",
664
664
  children: a(d, "files.browser.upload.uploading", "Uploading...")
665
665
  })] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ye, { className: "size-4" }), /* @__PURE__ */ l("span", {
@@ -669,8 +669,8 @@ function d() {
669
669
  }),
670
670
  /* @__PURE__ */ u("button", {
671
671
  type: "button",
672
- onClick: tn,
673
- disabled: kt,
672
+ onClick: Xt,
673
+ disabled: wt,
674
674
  className: "hidden sm:flex items-center gap-2 px-4 py-2.5 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
675
675
  title: a(d, "files.browser.actions.uploadFolderTitle", "Upload entire folder with structure"),
676
676
  children: [/* @__PURE__ */ l(He, { className: "size-4" }), a(d, "files.browser.actions.uploadFolder", "Upload Folder")]
@@ -680,14 +680,14 @@ function d() {
680
680
  className: "flex items-center border border-border-default rounded-lg overflow-hidden",
681
681
  children: [/* @__PURE__ */ l("button", {
682
682
  type: "button",
683
- onClick: () => rt("grid"),
684
- className: `p-2 transition-colors duration-200 ${nt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
683
+ onClick: () => nt("grid"),
684
+ className: `p-2 transition-colors duration-200 ${tt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
685
685
  "aria-label": a(d, "files.browser.view.grid", "Grid view"),
686
686
  children: /* @__PURE__ */ l(We, { className: "size-5" })
687
687
  }), /* @__PURE__ */ l("button", {
688
688
  type: "button",
689
- onClick: () => rt("list"),
690
- className: `p-2 transition-colors duration-200 ${nt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
689
+ onClick: () => nt("list"),
690
+ className: `p-2 transition-colors duration-200 ${tt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
691
691
  "aria-label": a(d, "files.browser.view.list", "List view"),
692
692
  children: /* @__PURE__ */ l(Ke, { className: "size-5" })
693
693
  })]
@@ -695,14 +695,14 @@ function d() {
695
695
  ]
696
696
  })]
697
697
  }),
698
- y && /* @__PURE__ */ u("div", {
698
+ b && /* @__PURE__ */ u("div", {
699
699
  className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
700
700
  children: [/* @__PURE__ */ u("span", {
701
701
  className: "text-sm font-medium text-status-success-text",
702
- children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: dt }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
702
+ children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: y }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
703
703
  }), /* @__PURE__ */ u("button", {
704
704
  type: "button",
705
- onClick: () => ft(""),
705
+ onClick: () => ot(""),
706
706
  className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
707
707
  children: [/* @__PURE__ */ l(Xe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
708
708
  })]
@@ -723,9 +723,9 @@ function d() {
723
723
  type: "button",
724
724
  onClick: async () => {
725
725
  try {
726
- await Promise.all([...Array.from(h).map((e) => It.mutateAsync({ id: e })), ...Array.from(g).map((e) => Lt.mutateAsync({ id: e }))]), _(), x.success(`${M} item${M > 1 ? "s" : ""} restored`);
726
+ await Promise.all([...Array.from(h).map((e) => jt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Mt.mutateAsync({ id: e }))]), _(), S.success(`${M} item${M > 1 ? "s" : ""} restored`);
727
727
  } catch (e) {
728
- x.error(e instanceof Error ? e.message : "Failed to restore some items");
728
+ S.error(e instanceof Error ? e.message : "Failed to restore some items");
729
729
  }
730
730
  },
731
731
  className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
@@ -743,12 +743,12 @@ function d() {
743
743
  variant: "danger",
744
744
  onConfirm: async () => {
745
745
  try {
746
- await Promise.all([...Array.from(h).map((e) => Rt.mutateAsync({ id: e })), ...Array.from(g).map((e) => zt.mutateAsync({ id: e }))]), _(), x.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
746
+ await Promise.all([...Array.from(h).map((e) => Nt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Pt.mutateAsync({ id: e }))]), _(), S.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
747
747
  count: M,
748
748
  plural: M > 1 ? "s" : ""
749
749
  }));
750
750
  } catch (e) {
751
- x.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
751
+ S.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
752
752
  }
753
753
  }
754
754
  });
@@ -769,15 +769,15 @@ function d() {
769
769
  onConfirm: async () => {
770
770
  try {
771
771
  let e = Array.from(h), t = Array.from(g);
772
- e.length > 0 && await Jt.mutateAsync(e), await Promise.all(t.map((e) => Ft.mutateAsync({
772
+ e.length > 0 && await Ut.mutateAsync(e), await Promise.all(t.map((e) => At.mutateAsync({
773
773
  id: e,
774
774
  recursive: !0
775
- }))), _(), x.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
775
+ }))), _(), S.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
776
776
  count: M,
777
777
  plural: M > 1 ? "s" : ""
778
778
  }));
779
779
  } catch (e) {
780
- x.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
780
+ S.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
781
781
  }
782
782
  }
783
783
  });
@@ -803,30 +803,30 @@ function d() {
803
803
  loading: k,
804
804
  error: A,
805
805
  preserveSortOrder: j,
806
- onFilePreview: an,
807
- onFileShare: v === "bin" ? void 0 : on,
808
- onFileDelete: v === "bin" ? dn : ln,
809
- onFileRestore: v === "bin" ? un : void 0,
810
- onFileFavorite: v === "bin" ? void 0 : fn,
811
- onFileRename: v === "bin" ? void 0 : pn,
812
- onFileDownload: mn,
813
- onFileCopy: v === "bin" ? void 0 : hn,
814
- onFileMove: v === "bin" ? void 0 : gn,
815
- onFileInfo: _n,
816
- onFolderOpen: vn,
817
- onFolderShare: v === "bin" ? void 0 : sn,
818
- onFolderDelete: v === "bin" ? xn : yn,
819
- onFolderRestore: v === "bin" ? bn : void 0,
820
- onFolderRename: v === "bin" ? void 0 : Sn,
821
- onFolderFavorite: v === "bin" ? void 0 : wn,
822
- onFolderMove: v === "bin" ? void 0 : Cn,
823
- onFolderInfo: Tn
806
+ onFilePreview: $t,
807
+ onFileShare: v === "bin" ? void 0 : en,
808
+ onFileDelete: v === "bin" ? on : rn,
809
+ onFileRestore: v === "bin" ? an : void 0,
810
+ onFileFavorite: v === "bin" ? void 0 : sn,
811
+ onFileRename: v === "bin" ? void 0 : cn,
812
+ onFileDownload: ln,
813
+ onFileCopy: v === "bin" ? void 0 : un,
814
+ onFileMove: v === "bin" ? void 0 : dn,
815
+ onFileInfo: fn,
816
+ onFolderOpen: pn,
817
+ onFolderShare: v === "bin" ? void 0 : tn,
818
+ onFolderDelete: v === "bin" ? gn : mn,
819
+ onFolderRestore: v === "bin" ? hn : void 0,
820
+ onFolderRename: v === "bin" ? void 0 : _n,
821
+ onFolderFavorite: v === "bin" ? void 0 : yn,
822
+ onFolderMove: v === "bin" ? void 0 : vn,
823
+ onFolderInfo: bn
824
824
  }), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
825
825
  className: "mt-4 px-2 text-sm text-text-secondary",
826
- children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y && v === "all" && vt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: vt })}`]
826
+ children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !b && v === "all" && pt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: pt })}`]
827
827
  })]
828
828
  }),
829
- yt && /* @__PURE__ */ l("div", {
829
+ mt && /* @__PURE__ */ l("div", {
830
830
  className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
831
831
  role: "dialog",
832
832
  "aria-modal": "true",
@@ -844,7 +844,7 @@ function d() {
844
844
  value: G,
845
845
  onChange: (e) => K(e.target.value),
846
846
  onKeyDown: (e) => {
847
- e.key === "Enter" && rn(), e.key === "Escape" && (N(!1), K(""));
847
+ e.key === "Enter" && Qt(), e.key === "Escape" && (N(!1), K(""));
848
848
  },
849
849
  "aria-label": a(d, "files.browser.newFolderDialog.title", "New folder"),
850
850
  placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name"),
@@ -861,7 +861,7 @@ function d() {
861
861
  children: a(d, "files.common.actions.cancel", "Cancel")
862
862
  }), /* @__PURE__ */ u("button", {
863
863
  type: "button",
864
- onClick: rn,
864
+ onClick: Qt,
865
865
  disabled: !G.trim() || $.isPending,
866
866
  className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
867
867
  children: [$.isPending && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), $.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
@@ -870,7 +870,7 @@ function d() {
870
870
  ]
871
871
  })
872
872
  }),
873
- St && V && /* @__PURE__ */ l("div", {
873
+ _t && V && /* @__PURE__ */ l("div", {
874
874
  className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
875
875
  role: "dialog",
876
876
  "aria-modal": "true",
@@ -888,7 +888,7 @@ function d() {
888
888
  value: U,
889
889
  onChange: (e) => W(e.target.value),
890
890
  onKeyDown: (e) => {
891
- e.key === "Enter" && On(), e.key === "Escape" && (P(!1), H(null), W(""));
891
+ e.key === "Enter" && Cn(), e.key === "Escape" && (P(!1), H(null), W(""));
892
892
  },
893
893
  "aria-label": a(d, "files.browser.renameDialog.title", "Rename"),
894
894
  placeholder: a(d, "files.browser.renameDialog.placeholder", "New name"),
@@ -905,23 +905,23 @@ function d() {
905
905
  children: a(d, "files.common.actions.cancel", "Cancel")
906
906
  }), /* @__PURE__ */ u("button", {
907
907
  type: "button",
908
- onClick: On,
909
- disabled: !U.trim() || U.trim() === V.name || Vt.isPending || Ht.isPending,
908
+ onClick: Cn,
909
+ disabled: !U.trim() || U.trim() === V.name || It.isPending || Lt.isPending,
910
910
  className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
911
- children: [(Vt.isPending || Ht.isPending) && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), Vt.isPending || Ht.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
911
+ children: [(It.isPending || Lt.isPending) && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), It.isPending || Lt.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
912
912
  })]
913
913
  })
914
914
  ]
915
915
  })
916
916
  }),
917
- Ct && Dt && /* @__PURE__ */ l(we, {
918
- item: Dt,
919
- itemType: "mimeType" in Dt ? "file" : "folder",
917
+ vt && St && /* @__PURE__ */ l(we, {
918
+ item: St,
919
+ itemType: "mimeType" in St ? "file" : "folder",
920
920
  onClose: () => {
921
921
  F(!1), L(null);
922
922
  },
923
- onCreateShare: cn,
924
- isLoading: Ut.isPending
923
+ onCreateShare: nn,
924
+ isLoading: Rt.isPending
925
925
  }),
926
926
  X && /* @__PURE__ */ l(Me, {
927
927
  title: X.title,
@@ -930,72 +930,72 @@ function d() {
930
930
  cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
931
931
  variant: X.variant,
932
932
  loading: X.loading,
933
- onConfirm: Mt,
933
+ onConfirm: Dt,
934
934
  onCancel: () => {
935
935
  X.loading || Z(null);
936
936
  }
937
937
  }),
938
- bt && /* @__PURE__ */ l(Me, {
938
+ ht && /* @__PURE__ */ l(Me, {
939
939
  title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
940
940
  description: a(d, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
941
941
  confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
942
942
  cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
943
943
  onConfirm: () => {
944
- xt(!1), p("/billing");
944
+ gt(!1), p("/billing");
945
945
  },
946
- onCancel: () => xt(!1)
946
+ onCancel: () => gt(!1)
947
947
  }),
948
- wt && R && /* @__PURE__ */ l(Ae, {
948
+ yt && R && /* @__PURE__ */ l(Ae, {
949
949
  item: R.item,
950
950
  type: R.type,
951
951
  onClose: () => {
952
952
  I(!1), z(null);
953
953
  },
954
- onMove: En,
955
- isLoading: Kt.isPending || qt.isPending
954
+ onMove: xn,
955
+ isLoading: Vt.isPending || Ht.isPending
956
956
  }),
957
- Tt && B && /* @__PURE__ */ l(je, {
957
+ bt && B && /* @__PURE__ */ l(je, {
958
958
  item: B.item,
959
959
  type: B.type,
960
960
  onClose: () => {
961
- Et(!1), Ot(null);
961
+ xt(!1), Ct(null);
962
962
  },
963
- onCopy: Dn,
964
- isLoading: Gt.isPending
963
+ onCopy: Sn,
964
+ isLoading: Bt.isPending
965
965
  }),
966
- b && /* @__PURE__ */ l(Te, {
967
- file: b,
968
- onClose: () => _t(null),
966
+ x && /* @__PURE__ */ l(Te, {
967
+ file: x,
968
+ onClose: () => dt(null),
969
969
  onDownload: () => {
970
- Le(b.downloadUrl || b.url);
970
+ Le(x.downloadUrl || x.url);
971
971
  },
972
972
  onShare: v === "bin" ? void 0 : () => {
973
- L(b), F(!0);
973
+ L(x), F(!0);
974
974
  },
975
- onStar: v === "bin" ? void 0 : () => fn(b),
976
- onDelete: () => v === "bin" ? dn(b) : ln(b)
975
+ onStar: v === "bin" ? void 0 : () => sn(x),
976
+ onDelete: () => v === "bin" ? on(x) : rn(x)
977
977
  }),
978
- ht && /* @__PURE__ */ l(Ee, {
979
- item: ht.item,
980
- type: ht.type,
981
- onClose: () => gt(null)
978
+ lt && /* @__PURE__ */ l(Ee, {
979
+ item: lt.item,
980
+ type: lt.type,
981
+ onClose: () => ut(null)
982
982
  }),
983
983
  /* @__PURE__ */ l(Ne, {
984
- items: At,
985
- isOpen: jt,
984
+ items: Tt,
985
+ isOpen: Et,
986
986
  onClose: () => Y(!1),
987
- onPause: Zt,
988
- onResume: Qt,
989
- onRetry: $t,
990
- onCancel: en
987
+ onPause: Kt,
988
+ onResume: qt,
989
+ onRetry: Jt,
990
+ onCancel: Yt
991
991
  }),
992
992
  /* @__PURE__ */ l(Oe, {
993
- toasts: x.toasts,
994
- onClose: x.removeToast
993
+ toasts: S.toasts,
994
+ onClose: S.removeToast
995
995
  }),
996
996
  !k && D.length === 0 && O.length === 0 && /* @__PURE__ */ l("div", {
997
997
  className: "px-6 py-12",
998
- children: y ? /* @__PURE__ */ u("div", {
998
+ children: b ? /* @__PURE__ */ u("div", {
999
999
  className: "text-center animate-in fade-in duration-300",
1000
1000
  children: [
1001
1001
  /* @__PURE__ */ l("div", {
@@ -1013,7 +1013,7 @@ function d() {
1013
1013
  /* @__PURE__ */ l("button", {
1014
1014
  type: "button",
1015
1015
  onClick: () => {
1016
- ft(""), mt(void 0);
1016
+ ot(""), ct(void 0);
1017
1017
  },
1018
1018
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover transition-colors duration-200",
1019
1019
  children: a(d, "files.browser.search.clear", "Clear search")
@@ -1021,8 +1021,8 @@ function d() {
1021
1021
  ]
1022
1022
  }) : /* @__PURE__ */ l(De, {
1023
1023
  type: v,
1024
- onUpload: v === "all" ? Yt : void 0,
1025
- onNewFolder: v === "all" ? nn : void 0
1024
+ onUpload: v === "all" ? Wt : void 0,
1025
+ onNewFolder: v === "all" ? Zt : void 0
1026
1026
  })
1027
1027
  })
1028
1028
  ]