@cubone/react-file-manager 1.18.0 → 1.19.0

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.
@@ -1,5 +1,5 @@
1
1
  import * as De from "react";
2
- import Pe, { useState as L, useRef as de, useEffect as se, createContext as Ie, useContext as $e, useCallback as fr, useLayoutEffect as un, useMemo as yt } from "react";
2
+ import Pe, { useState as L, useRef as de, useEffect as te, createContext as Ie, useContext as $e, useCallback as fr, useLayoutEffect as un, useMemo as yt } from "react";
3
3
  function dn(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
5
  }
@@ -41,28 +41,28 @@ var Nt;
41
41
  function hn() {
42
42
  return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && function() {
43
43
  var e = Pe, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, z = "@@iterator";
44
- function D(o) {
44
+ function A(o) {
45
45
  if (o === null || typeof o != "object")
46
46
  return null;
47
- var v = M && o[M] || o[z];
48
- return typeof v == "function" ? v : null;
47
+ var m = M && o[M] || o[z];
48
+ return typeof m == "function" ? m : null;
49
49
  }
50
50
  var C = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
51
  function j(o) {
52
52
  {
53
- for (var v = arguments.length, T = new Array(v > 1 ? v - 1 : 0), B = 1; B < v; B++)
53
+ for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0), B = 1; B < m; B++)
54
54
  T[B - 1] = arguments[B];
55
55
  y("error", o, T);
56
56
  }
57
57
  }
58
- function y(o, v, T) {
58
+ function y(o, m, T) {
59
59
  {
60
- var B = C.ReactDebugCurrentFrame, te = B.getStackAddendum();
61
- te !== "" && (v += "%s", T = T.concat([te]));
60
+ var B = C.ReactDebugCurrentFrame, re = B.getStackAddendum();
61
+ re !== "" && (m += "%s", T = T.concat([re]));
62
62
  var ie = T.map(function(ee) {
63
63
  return String(ee);
64
64
  });
65
- ie.unshift("Warning: " + v), Function.prototype.apply.call(console[o], console, ie);
65
+ ie.unshift("Warning: " + m), Function.prototype.apply.call(console[o], console, ie);
66
66
  }
67
67
  }
68
68
  var b = !1, u = !1, g = !1, _ = !1, x = !1, R;
@@ -74,17 +74,17 @@ function hn() {
74
74
  // with.
75
75
  o.$$typeof === R || o.getModuleId !== void 0));
76
76
  }
77
- function A(o, v, T) {
77
+ function D(o, m, T) {
78
78
  var B = o.displayName;
79
79
  if (B)
80
80
  return B;
81
- var te = v.displayName || v.name || "";
82
- return te !== "" ? T + "(" + te + ")" : T;
81
+ var re = m.displayName || m.name || "";
82
+ return re !== "" ? T + "(" + re + ")" : T;
83
83
  }
84
- function N(o) {
84
+ function k(o) {
85
85
  return o.displayName || "Context";
86
86
  }
87
- function k(o) {
87
+ function N(o) {
88
88
  if (o == null)
89
89
  return null;
90
90
  if (typeof o.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
@@ -108,20 +108,20 @@ function hn() {
108
108
  if (typeof o == "object")
109
109
  switch (o.$$typeof) {
110
110
  case l:
111
- var v = o;
112
- return N(v) + ".Consumer";
111
+ var m = o;
112
+ return k(m) + ".Consumer";
113
113
  case c:
114
114
  var T = o;
115
- return N(T._context) + ".Provider";
115
+ return k(T._context) + ".Provider";
116
116
  case d:
117
- return A(o, o.render, "ForwardRef");
117
+ return D(o, o.render, "ForwardRef");
118
118
  case h:
119
119
  var B = o.displayName || null;
120
- return B !== null ? B : k(o.type) || "Memo";
120
+ return B !== null ? B : N(o.type) || "Memo";
121
121
  case w: {
122
- var te = o, ie = te._payload, ee = te._init;
122
+ var re = o, ie = re._payload, ee = re._init;
123
123
  try {
124
- return k(ee(ie));
124
+ return N(ee(ie));
125
125
  } catch {
126
126
  return null;
127
127
  }
@@ -129,14 +129,14 @@ function hn() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var X = Object.assign, oe = 0, ae, Q, he, xe, m, P, V;
132
+ var K = Object.assign, oe = 0, ae, Q, he, xe, v, P, V;
133
133
  function W() {
134
134
  }
135
135
  W.__reactDisabledLog = !0;
136
136
  function I() {
137
137
  {
138
138
  if (oe === 0) {
139
- ae = console.log, Q = console.info, he = console.warn, xe = console.error, m = console.group, P = console.groupCollapsed, V = console.groupEnd;
139
+ ae = console.log, Q = console.info, he = console.warn, xe = console.error, v = console.group, P = console.groupCollapsed, V = console.groupEnd;
140
140
  var o = {
141
141
  configurable: !0,
142
142
  enumerable: !0,
@@ -156,7 +156,7 @@ function hn() {
156
156
  oe++;
157
157
  }
158
158
  }
159
- function K() {
159
+ function X() {
160
160
  {
161
161
  if (oe--, oe === 0) {
162
162
  var o = {
@@ -165,25 +165,25 @@ function hn() {
165
165
  writable: !0
166
166
  };
167
167
  Object.defineProperties(console, {
168
- log: X({}, o, {
168
+ log: K({}, o, {
169
169
  value: ae
170
170
  }),
171
- info: X({}, o, {
171
+ info: K({}, o, {
172
172
  value: Q
173
173
  }),
174
- warn: X({}, o, {
174
+ warn: K({}, o, {
175
175
  value: he
176
176
  }),
177
- error: X({}, o, {
177
+ error: K({}, o, {
178
178
  value: xe
179
179
  }),
180
- group: X({}, o, {
181
- value: m
180
+ group: K({}, o, {
181
+ value: v
182
182
  }),
183
- groupCollapsed: X({}, o, {
183
+ groupCollapsed: K({}, o, {
184
184
  value: P
185
185
  }),
186
- groupEnd: X({}, o, {
186
+ groupEnd: K({}, o, {
187
187
  value: V
188
188
  })
189
189
  });
@@ -192,13 +192,13 @@ function hn() {
192
192
  }
193
193
  }
194
194
  var O = C.ReactCurrentDispatcher, $;
195
- function U(o, v, T) {
195
+ function U(o, m, T) {
196
196
  {
197
197
  if ($ === void 0)
198
198
  try {
199
199
  throw Error();
200
- } catch (te) {
201
- var B = te.stack.trim().match(/\n( *(at )?)/);
200
+ } catch (re) {
201
+ var B = re.stack.trim().match(/\n( *(at )?)/);
202
202
  $ = B && B[1] || "";
203
203
  }
204
204
  return `
@@ -210,7 +210,7 @@ function hn() {
210
210
  var fe = typeof WeakMap == "function" ? WeakMap : Map;
211
211
  q = new fe();
212
212
  }
213
- function E(o, v) {
213
+ function E(o, m) {
214
214
  if (!o || Z)
215
215
  return "";
216
216
  {
@@ -220,12 +220,12 @@ function hn() {
220
220
  }
221
221
  var B;
222
222
  Z = !0;
223
- var te = Error.prepareStackTrace;
223
+ var re = Error.prepareStackTrace;
224
224
  Error.prepareStackTrace = void 0;
225
225
  var ie;
226
226
  ie = O.current, O.current = null, I();
227
227
  try {
228
- if (v) {
228
+ if (m) {
229
229
  var ee = function() {
230
230
  throw Error();
231
231
  };
@@ -276,19 +276,19 @@ function hn() {
276
276
  }
277
277
  }
278
278
  } finally {
279
- Z = !1, O.current = ie, K(), Error.prepareStackTrace = te;
279
+ Z = !1, O.current = ie, X(), Error.prepareStackTrace = re;
280
280
  }
281
281
  var ke = o ? o.displayName || o.name : "", Me = ke ? U(ke) : "";
282
282
  return typeof o == "function" && q.set(o, Me), Me;
283
283
  }
284
- function ve(o, v, T) {
284
+ function ve(o, m, T) {
285
285
  return E(o, !1);
286
286
  }
287
287
  function Te(o) {
288
- var v = o.prototype;
289
- return !!(v && v.isReactComponent);
288
+ var m = o.prototype;
289
+ return !!(m && m.isReactComponent);
290
290
  }
291
- function Y(o, v, T) {
291
+ function Y(o, m, T) {
292
292
  if (o == null)
293
293
  return "";
294
294
  if (typeof o == "function")
@@ -306,11 +306,11 @@ function hn() {
306
306
  case d:
307
307
  return ve(o.render);
308
308
  case h:
309
- return Y(o.type, v, T);
309
+ return Y(o.type, m, T);
310
310
  case w: {
311
- var B = o, te = B._payload, ie = B._init;
311
+ var B = o, re = B._payload, ie = B._init;
312
312
  try {
313
- return Y(ie(te), v, T);
313
+ return Y(ie(re), m, T);
314
314
  } catch {
315
315
  }
316
316
  }
@@ -320,12 +320,12 @@ function hn() {
320
320
  var le = Object.prototype.hasOwnProperty, je = {}, Re = C.ReactDebugCurrentFrame;
321
321
  function we(o) {
322
322
  if (o) {
323
- var v = o._owner, T = Y(o.type, o._source, v ? v.type : null);
323
+ var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
324
324
  Re.setExtraStackFrame(T);
325
325
  } else
326
326
  Re.setExtraStackFrame(null);
327
327
  }
328
- function He(o, v, T, B, te) {
328
+ function He(o, m, T, B, re) {
329
329
  {
330
330
  var ie = Function.call.bind(le);
331
331
  for (var ee in o)
@@ -336,11 +336,11 @@ function hn() {
336
336
  var me = Error((B || "React class") + ": " + T + " type `" + ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
337
  throw me.name = "Invariant Violation", me;
338
338
  }
339
- J = o[ee](v, ee, B, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
+ J = o[ee](m, ee, B, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
340
  } catch (ce) {
341
341
  J = ce;
342
342
  }
343
- J && !(J instanceof Error) && (we(te), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", T, ee, typeof J), we(null)), J instanceof Error && !(J.message in je) && (je[J.message] = !0, we(te), j("Failed %s type: %s", T, J.message), we(null));
343
+ J && !(J instanceof Error) && (we(re), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", T, ee, typeof J), we(null)), J instanceof Error && !(J.message in je) && (je[J.message] = !0, we(re), j("Failed %s type: %s", T, J.message), we(null));
344
344
  }
345
345
  }
346
346
  }
@@ -350,7 +350,7 @@ function hn() {
350
350
  }
351
351
  function Wr(o) {
352
352
  {
353
- var v = typeof Symbol == "function" && Symbol.toStringTag, T = v && o[Symbol.toStringTag] || o.constructor.name || "Object";
353
+ var m = typeof Symbol == "function" && Symbol.toStringTag, T = m && o[Symbol.toStringTag] || o.constructor.name || "Object";
354
354
  return T;
355
355
  }
356
356
  }
@@ -376,27 +376,27 @@ function hn() {
376
376
  }, Rt, Pt;
377
377
  function Ur(o) {
378
378
  if (le.call(o, "ref")) {
379
- var v = Object.getOwnPropertyDescriptor(o, "ref").get;
380
- if (v && v.isReactWarning)
379
+ var m = Object.getOwnPropertyDescriptor(o, "ref").get;
380
+ if (m && m.isReactWarning)
381
381
  return !1;
382
382
  }
383
383
  return o.ref !== void 0;
384
384
  }
385
385
  function qr(o) {
386
386
  if (le.call(o, "key")) {
387
- var v = Object.getOwnPropertyDescriptor(o, "key").get;
388
- if (v && v.isReactWarning)
387
+ var m = Object.getOwnPropertyDescriptor(o, "key").get;
388
+ if (m && m.isReactWarning)
389
389
  return !1;
390
390
  }
391
391
  return o.key !== void 0;
392
392
  }
393
- function Kr(o, v) {
393
+ function Kr(o, m) {
394
394
  typeof o.ref == "string" && Et.current;
395
395
  }
396
- function Xr(o, v) {
396
+ function Xr(o, m) {
397
397
  {
398
398
  var T = function() {
399
- Rt || (Rt = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
399
+ Rt || (Rt = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
400
400
  };
401
401
  T.isReactWarning = !0, Object.defineProperty(o, "key", {
402
402
  get: T,
@@ -404,10 +404,10 @@ function hn() {
404
404
  });
405
405
  }
406
406
  }
407
- function Gr(o, v) {
407
+ function Gr(o, m) {
408
408
  {
409
409
  var T = function() {
410
- Pt || (Pt = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
410
+ Pt || (Pt = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
411
411
  };
412
412
  T.isReactWarning = !0, Object.defineProperty(o, "ref", {
413
413
  get: T,
@@ -415,13 +415,13 @@ function hn() {
415
415
  });
416
416
  }
417
417
  }
418
- var Jr = function(o, v, T, B, te, ie, ee) {
418
+ var Jr = function(o, m, T, B, re, ie, ee) {
419
419
  var J = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: r,
422
422
  // Built-in properties that belong on the element
423
423
  type: o,
424
- key: v,
424
+ key: m,
425
425
  ref: T,
426
426
  props: ee,
427
427
  // Record the component responsible for creating this element.
@@ -441,15 +441,15 @@ function hn() {
441
441
  configurable: !1,
442
442
  enumerable: !1,
443
443
  writable: !1,
444
- value: te
444
+ value: re
445
445
  }), Object.freeze && (Object.freeze(J.props), Object.freeze(J)), J;
446
446
  };
447
- function Zr(o, v, T, B, te) {
447
+ function Zr(o, m, T, B, re) {
448
448
  {
449
449
  var ie, ee = {}, J = null, me = null;
450
- T !== void 0 && (wt(T), J = "" + T), qr(v) && (wt(v.key), J = "" + v.key), Ur(v) && (me = v.ref, Kr(v, te));
451
- for (ie in v)
452
- le.call(v, ie) && !Yr.hasOwnProperty(ie) && (ee[ie] = v[ie]);
450
+ T !== void 0 && (wt(T), J = "" + T), qr(m) && (wt(m.key), J = "" + m.key), Ur(m) && (me = m.ref, Kr(m, re));
451
+ for (ie in m)
452
+ le.call(m, ie) && !Yr.hasOwnProperty(ie) && (ee[ie] = m[ie]);
453
453
  if (o && o.defaultProps) {
454
454
  var ce = o.defaultProps;
455
455
  for (ie in ce)
@@ -459,13 +459,13 @@ function hn() {
459
459
  var ue = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
460
460
  J && Xr(ee, ue), me && Gr(ee, ue);
461
461
  }
462
- return Jr(o, J, me, te, B, Et.current, ee);
462
+ return Jr(o, J, me, re, B, Et.current, ee);
463
463
  }
464
464
  }
465
465
  var tt = C.ReactCurrentOwner, Tt = C.ReactDebugCurrentFrame;
466
466
  function Oe(o) {
467
467
  if (o) {
468
- var v = o._owner, T = Y(o.type, o._source, v ? v.type : null);
468
+ var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
469
469
  Tt.setExtraStackFrame(T);
470
470
  } else
471
471
  Tt.setExtraStackFrame(null);
@@ -478,7 +478,7 @@ function hn() {
478
478
  function Ft() {
479
479
  {
480
480
  if (tt.current) {
481
- var o = k(tt.current.type);
481
+ var o = N(tt.current.type);
482
482
  if (o)
483
483
  return `
484
484
 
@@ -493,77 +493,77 @@ Check the render method of \`` + o + "`.";
493
493
  var St = {};
494
494
  function en(o) {
495
495
  {
496
- var v = Ft();
497
- if (!v) {
496
+ var m = Ft();
497
+ if (!m) {
498
498
  var T = typeof o == "string" ? o : o.displayName || o.name;
499
- T && (v = `
499
+ T && (m = `
500
500
 
501
501
  Check the top-level render call using <` + T + ">.");
502
502
  }
503
- return v;
503
+ return m;
504
504
  }
505
505
  }
506
- function Mt(o, v) {
506
+ function Mt(o, m) {
507
507
  {
508
508
  if (!o._store || o._store.validated || o.key != null)
509
509
  return;
510
510
  o._store.validated = !0;
511
- var T = en(v);
511
+ var T = en(m);
512
512
  if (St[T])
513
513
  return;
514
514
  St[T] = !0;
515
515
  var B = "";
516
- o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " + k(o._owner.type) + "."), Oe(o), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, B), Oe(null);
516
+ o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " + N(o._owner.type) + "."), Oe(o), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, B), Oe(null);
517
517
  }
518
518
  }
519
- function Lt(o, v) {
519
+ function Lt(o, m) {
520
520
  {
521
521
  if (typeof o != "object")
522
522
  return;
523
523
  if (et(o))
524
524
  for (var T = 0; T < o.length; T++) {
525
525
  var B = o[T];
526
- nt(B) && Mt(B, v);
526
+ nt(B) && Mt(B, m);
527
527
  }
528
528
  else if (nt(o))
529
529
  o._store && (o._store.validated = !0);
530
530
  else if (o) {
531
- var te = D(o);
532
- if (typeof te == "function" && te !== o.entries)
533
- for (var ie = te.call(o), ee; !(ee = ie.next()).done; )
534
- nt(ee.value) && Mt(ee.value, v);
531
+ var re = A(o);
532
+ if (typeof re == "function" && re !== o.entries)
533
+ for (var ie = re.call(o), ee; !(ee = ie.next()).done; )
534
+ nt(ee.value) && Mt(ee.value, m);
535
535
  }
536
536
  }
537
537
  }
538
538
  function tn(o) {
539
539
  {
540
- var v = o.type;
541
- if (v == null || typeof v == "string")
540
+ var m = o.type;
541
+ if (m == null || typeof m == "string")
542
542
  return;
543
543
  var T;
544
- if (typeof v == "function")
545
- T = v.propTypes;
546
- else if (typeof v == "object" && (v.$$typeof === d || // Note: Memo only checks outer props here.
544
+ if (typeof m == "function")
545
+ T = m.propTypes;
546
+ else if (typeof m == "object" && (m.$$typeof === d || // Note: Memo only checks outer props here.
547
547
  // Inner props are checked in the reconciler.
548
- v.$$typeof === h))
549
- T = v.propTypes;
548
+ m.$$typeof === h))
549
+ T = m.propTypes;
550
550
  else
551
551
  return;
552
552
  if (T) {
553
- var B = k(v);
553
+ var B = N(m);
554
554
  He(T, o.props, "prop", B, o);
555
- } else if (v.PropTypes !== void 0 && !rt) {
555
+ } else if (m.PropTypes !== void 0 && !rt) {
556
556
  rt = !0;
557
- var te = k(v);
558
- j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", te || "Unknown");
557
+ var re = N(m);
558
+ j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", re || "Unknown");
559
559
  }
560
- typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
560
+ typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
561
  }
562
562
  }
563
563
  function rn(o) {
564
564
  {
565
- for (var v = Object.keys(o.props), T = 0; T < v.length; T++) {
566
- var B = v[T];
565
+ for (var m = Object.keys(o.props), T = 0; T < m.length; T++) {
566
+ var B = m[T];
567
567
  if (B !== "children" && B !== "key") {
568
568
  Oe(o), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), Oe(null);
569
569
  break;
@@ -573,7 +573,7 @@ Check the top-level render call using <` + T + ">.");
573
573
  }
574
574
  }
575
575
  var Ot = {};
576
- function kt(o, v, T, B, te, ie) {
576
+ function kt(o, m, T, B, re, ie) {
577
577
  {
578
578
  var ee = F(o);
579
579
  if (!ee) {
@@ -582,13 +582,13 @@ Check the top-level render call using <` + T + ">.");
582
582
  var me = Qr();
583
583
  me ? J += me : J += Ft();
584
584
  var ce;
585
- o === null ? ce = "null" : et(o) ? ce = "array" : o !== void 0 && o.$$typeof === r ? (ce = "<" + (k(o.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : ce = typeof o, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ce, J);
585
+ o === null ? ce = "null" : et(o) ? ce = "array" : o !== void 0 && o.$$typeof === r ? (ce = "<" + (N(o.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : ce = typeof o, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ce, J);
586
586
  }
587
- var ue = Zr(o, v, T, te, ie);
587
+ var ue = Zr(o, m, T, re, ie);
588
588
  if (ue == null)
589
589
  return ue;
590
590
  if (ee) {
591
- var be = v.children;
591
+ var be = m.children;
592
592
  if (be !== void 0)
593
593
  if (B)
594
594
  if (et(be)) {
@@ -600,8 +600,8 @@ Check the top-level render call using <` + T + ">.");
600
600
  else
601
601
  Lt(be, o);
602
602
  }
603
- if (le.call(v, "key")) {
604
- var Me = k(o), Ce = Object.keys(v).filter(function(ln) {
603
+ if (le.call(m, "key")) {
604
+ var Me = N(o), Ce = Object.keys(m).filter(function(ln) {
605
605
  return ln !== "key";
606
606
  }), st = Ce.length > 0 ? "{key: someKey, " + Ce.join(": ..., ") + ": ...}" : "{key: someKey}";
607
607
  if (!Ot[Me + st]) {
@@ -617,11 +617,11 @@ React keys must be passed directly to JSX without using spread:
617
617
  return o === s ? rn(ue) : tn(ue), ue;
618
618
  }
619
619
  }
620
- function nn(o, v, T) {
621
- return kt(o, v, T, !0);
620
+ function nn(o, m, T) {
621
+ return kt(o, m, T, !0);
622
622
  }
623
- function sn(o, v, T) {
624
- return kt(o, v, T, !1);
623
+ function sn(o, m, T) {
624
+ return kt(o, m, T, !1);
625
625
  }
626
626
  var on = sn, an = nn;
627
627
  Ae.Fragment = s, Ae.jsx = on, Ae.jsxs = an;
@@ -848,7 +848,7 @@ const Be = (e = () => {
848
848
  var c;
849
849
  (c = s.current) != null && c.contains(i.target) ? n(!1) : (n(!0), e(i, s));
850
850
  };
851
- return se(() => (document.addEventListener("click", a, !0), document.addEventListener("mousedown", a, !0), () => {
851
+ return te(() => (document.addEventListener("click", a, !0), document.addEventListener("mousedown", a, !0), () => {
852
852
  document.removeEventListener("click", a, !0), document.removeEventListener("mousedown", a, !0);
853
853
  }), []), { ref: s, isClicked: r, setIsClicked: n };
854
854
  }, Er = Ie(), _n = ({ children: e, layout: r }) => {
@@ -890,7 +890,7 @@ const Be = (e = () => {
890
890
  )) }) });
891
891
  }, Rr = Ie(), zn = ({ children: e, filesData: r, onError: n }) => {
892
892
  const [s, a] = L([]);
893
- se(() => {
893
+ te(() => {
894
894
  a(r);
895
895
  }, [r]);
896
896
  const i = (c) => c.isDirectory ? s.filter((l) => l.path === `${c.path}/${l.name}`) : [];
@@ -900,12 +900,12 @@ const Be = (e = () => {
900
900
  return [...s, ...a];
901
901
  }, Pr = Ie(), Dn = ({ children: e, initialPath: r }) => {
902
902
  const { files: n } = Ge(), s = de(!1), [a, i] = L(""), [c, l] = L(null), [d, p] = L([]);
903
- return se(() => {
903
+ return te(() => {
904
904
  Array.isArray(n) && n.length > 0 && (p(() => {
905
905
  const f = n.filter((h) => h.path === `${a}/${h.name}`);
906
906
  return An(f);
907
907
  }), l(() => n.find((f) => f.path === a) ?? null));
908
- }, [n, a]), se(() => {
908
+ }, [n, a]), te(() => {
909
909
  !s.current && Array.isArray(n) && n.length > 0 && (i(n.some((f) => f.path === r) ? r : ""), s.current = !0);
910
910
  }, [r, n]), /* @__PURE__ */ t.jsx(
911
911
  Pr.Provider,
@@ -932,11 +932,15 @@ const Be = (e = () => {
932
932
  } catch (s) {
933
933
  console.error(s.message);
934
934
  }
935
- }, Tr = Ie(), In = ({ children: e, onDownload: r }) => {
936
- const [n, s] = L([]), a = () => {
937
- Le(r, "onDownload", n);
935
+ }, Tr = Ie(), In = ({ children: e, onDownload: r, onSelect: n }) => {
936
+ const [s, a] = L([]);
937
+ te(() => {
938
+ s.length && n && n(s);
939
+ }, [s]);
940
+ const i = () => {
941
+ Le(r, "onDownload", s);
938
942
  };
939
- return /* @__PURE__ */ t.jsx(Tr.Provider, { value: { selectedFiles: n, setSelectedFiles: s, handleDownload: a }, children: e });
943
+ return /* @__PURE__ */ t.jsx(Tr.Provider, { value: { selectedFiles: s, setSelectedFiles: a, handleDownload: i }, children: e });
940
944
  }, Fe = () => $e(Tr), Fr = Ie(), $n = ({ children: e, onPaste: r, onCut: n, onCopy: s }) => {
941
945
  const [a, i] = L(null), { selectedFiles: c, setSelectedFiles: l } = Fe(), d = (f) => {
942
946
  i({
@@ -957,7 +961,7 @@ const Be = (e = () => {
957
961
  triggerAction: a
958
962
  }) => {
959
963
  var b;
960
- const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: S, handlePasting: M } = Je(), { activeLayout: z } = Se(), D = [
964
+ const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: S, handlePasting: M } = Je(), { activeLayout: z } = Se(), A = [
961
965
  {
962
966
  icon: /* @__PURE__ */ t.jsx(mr, { size: 17, strokeWidth: 0.3 }),
963
967
  text: "New folder",
@@ -1062,7 +1066,7 @@ const Be = (e = () => {
1062
1066
  }
1063
1067
  )
1064
1068
  ] }) }) : /* @__PURE__ */ t.jsx("div", { className: "toolbar", children: /* @__PURE__ */ t.jsxs("div", { className: "fm-toolbar", children: [
1065
- /* @__PURE__ */ t.jsx("div", { children: D.filter((u) => u.permission).map((u, g) => /* @__PURE__ */ t.jsxs("button", { className: "item-action", onClick: u.onClick, children: [
1069
+ /* @__PURE__ */ t.jsx("div", { children: A.filter((u) => u.permission).map((u, g) => /* @__PURE__ */ t.jsxs("button", { className: "item-action", onClick: u.onClick, children: [
1066
1070
  u.icon,
1067
1071
  /* @__PURE__ */ t.jsx("span", { children: u.text })
1068
1072
  ] }, g)) }),
@@ -1112,7 +1116,7 @@ var Wn = class extends Error {
1112
1116
  }, Ke = (...e) => Hn(e[0], `[react-collapsed] -- ${e[1]}`);
1113
1117
  function Mr(e) {
1114
1118
  const r = de(e);
1115
- return se(() => {
1119
+ return te(() => {
1116
1120
  r.current = e;
1117
1121
  }), fr((...n) => {
1118
1122
  var s;
@@ -1127,7 +1131,7 @@ function Vn(e, r, n) {
1127
1131
  },
1128
1132
  [l, c]
1129
1133
  );
1130
- return se(() => {
1134
+ return te(() => {
1131
1135
  Ke(
1132
1136
  !(i.current && e == null),
1133
1137
  "`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."
@@ -1140,7 +1144,7 @@ function Vn(e, r, n) {
1140
1144
  var Yn = "(prefers-reduced-motion: reduce)";
1141
1145
  function Un() {
1142
1146
  const [e, r] = L(!1);
1143
- return se(() => {
1147
+ return te(() => {
1144
1148
  if (typeof window > "u" || typeof window.matchMedia != "function")
1145
1149
  return;
1146
1150
  const n = window.matchMedia(Yn);
@@ -1237,11 +1241,11 @@ After: <div {...getCollapseProps()}>
1237
1241
  </div>
1238
1242
  </div>`
1239
1243
  );
1240
- }, se(() => {
1244
+ }, te(() => {
1241
1245
  r(e);
1242
1246
  }, [e]);
1243
1247
  }
1244
- var ns = typeof window > "u" ? se : un;
1248
+ var ns = typeof window > "u" ? te : un;
1245
1249
  function ss({
1246
1250
  duration: e,
1247
1251
  easing: r = "cubic-bezier(0.4, 0, 0.2, 1)",
@@ -1256,7 +1260,7 @@ function ss({
1256
1260
  const d = Mr(n), p = Zn(c ? `${c}` : void 0), [f, h] = Vn(
1257
1261
  s,
1258
1262
  a
1259
- ), w = de(f), [S, M] = L(!1), z = Un(), D = i ?? z, C = de(), j = de(), y = de(null), [b, u] = L(null);
1263
+ ), w = de(f), [S, M] = L(!1), z = Un(), A = i ?? z, C = de(), j = de(), y = de(null), [b, u] = L(null);
1260
1264
  rs(y);
1261
1265
  const g = `${l.collapsedHeight || 0}px`;
1262
1266
  function _(x) {
@@ -1264,19 +1268,19 @@ function ss({
1264
1268
  return;
1265
1269
  const R = y.current;
1266
1270
  for (const F in x) {
1267
- const A = x[F];
1268
- A ? R.style[F] = A : R.style.removeProperty(F);
1271
+ const D = x[F];
1272
+ D ? R.style[F] = D : R.style.removeProperty(F);
1269
1273
  }
1270
1274
  }
1271
1275
  return ns(() => {
1272
1276
  if (!y.current || f === w.current)
1273
1277
  return;
1274
1278
  w.current = f;
1275
- function R(N) {
1276
- return D ? 0 : e ?? es(N);
1279
+ function R(k) {
1280
+ return A ? 0 : e ?? es(k);
1277
1281
  }
1278
- const F = (N) => `height ${R(N)}ms ${r}`, A = (N) => {
1279
- function k() {
1282
+ const F = (k) => `height ${R(k)}ms ${r}`, D = (k) => {
1283
+ function N() {
1280
1284
  f ? (_({
1281
1285
  height: "",
1282
1286
  overflow: "",
@@ -1284,7 +1288,7 @@ function ss({
1284
1288
  display: ""
1285
1289
  }), d("expandEnd")) : (_({ transition: "" }), d("collapseEnd")), M(!1);
1286
1290
  }
1287
- j.current && qt(j.current), j.current = Qn(k, N);
1291
+ j.current && qt(j.current), j.current = Qn(N, k);
1288
1292
  };
1289
1293
  return M(!0), f ? C.current = requestAnimationFrame(() => {
1290
1294
  d("expandStart"), _({
@@ -1293,15 +1297,15 @@ function ss({
1293
1297
  height: g
1294
1298
  }), C.current = requestAnimationFrame(() => {
1295
1299
  d("expanding");
1296
- const N = Kt(y);
1297
- A(R(N)), y.current && (y.current.style.transition = F(N), y.current.style.height = `${N}px`);
1300
+ const k = Kt(y);
1301
+ D(R(k)), y.current && (y.current.style.transition = F(k), y.current.style.height = `${k}px`);
1298
1302
  });
1299
1303
  }) : C.current = requestAnimationFrame(() => {
1300
1304
  d("collapseStart");
1301
- const N = Kt(y);
1302
- A(R(N)), _({
1303
- transition: F(N),
1304
- height: `${N}px`
1305
+ const k = Kt(y);
1306
+ D(R(k)), _({
1307
+ transition: F(k),
1308
+ height: `${k}px`
1305
1309
  }), C.current = requestAnimationFrame(() => {
1306
1310
  d("collapsing"), _({
1307
1311
  height: g,
@@ -1314,7 +1318,7 @@ function ss({
1314
1318
  }, [
1315
1319
  f,
1316
1320
  g,
1317
- D,
1321
+ A,
1318
1322
  e,
1319
1323
  r,
1320
1324
  d
@@ -1322,20 +1326,20 @@ function ss({
1322
1326
  isExpanded: f,
1323
1327
  setExpanded: h,
1324
1328
  getToggleProps(x) {
1325
- const { disabled: R, onClick: F, refKey: A, ...N } = {
1329
+ const { disabled: R, onClick: F, refKey: D, ...k } = {
1326
1330
  refKey: "ref",
1327
1331
  onClick() {
1328
1332
  },
1329
1333
  disabled: !1,
1330
1334
  ...x
1331
- }, k = b ? b.tagName === "BUTTON" : void 0, X = x == null ? void 0 : x[A || "ref"], oe = {
1335
+ }, N = b ? b.tagName === "BUTTON" : void 0, K = x == null ? void 0 : x[D || "ref"], oe = {
1332
1336
  id: `react-collapsed-toggle-${p}`,
1333
1337
  "aria-controls": `react-collapsed-panel-${p}`,
1334
1338
  "aria-expanded": f,
1335
1339
  onClick(he) {
1336
1340
  R || (F == null || F(he), h((xe) => !xe));
1337
1341
  },
1338
- [A || "ref"]: Xt(X, u)
1342
+ [D || "ref"]: Xt(K, u)
1339
1343
  }, ae = {
1340
1344
  type: "button",
1341
1345
  disabled: R ? !0 : void 0
@@ -1344,22 +1348,22 @@ function ss({
1344
1348
  role: "button",
1345
1349
  tabIndex: R ? -1 : 0
1346
1350
  };
1347
- return k === !1 ? { ...oe, ...Q, ...N } : k === !0 ? { ...oe, ...ae, ...N } : {
1351
+ return N === !1 ? { ...oe, ...Q, ...k } : N === !0 ? { ...oe, ...ae, ...k } : {
1348
1352
  ...oe,
1349
1353
  ...ae,
1350
1354
  ...Q,
1351
- ...N
1355
+ ...k
1352
1356
  };
1353
1357
  },
1354
1358
  getCollapseProps(x) {
1355
- const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x }, A = x == null ? void 0 : x[F || "ref"];
1359
+ const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x }, D = x == null ? void 0 : x[F || "ref"];
1356
1360
  return {
1357
1361
  id: `react-collapsed-panel-${p}`,
1358
1362
  "aria-hidden": !f,
1359
1363
  "aria-labelledby": `react-collapsed-toggle-${p}`,
1360
1364
  role: "region",
1361
1365
  ...x,
1362
- [F || "ref"]: Xt(y, A),
1366
+ [F || "ref"]: Xt(y, D),
1363
1367
  style: {
1364
1368
  boxSizing: "border-box",
1365
1369
  ...!S && !f ? {
@@ -1380,7 +1384,7 @@ const os = ({ open: e, children: r }) => {
1380
1384
  isExpanded: n,
1381
1385
  duration: 500
1382
1386
  });
1383
- return se(() => {
1387
+ return te(() => {
1384
1388
  s(e);
1385
1389
  }, [e, s]), /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx("div", { ...a(), children: r }) });
1386
1390
  };
@@ -1402,7 +1406,7 @@ const Lr = ({ folder: e }) => {
1402
1406
  }, d = (p) => {
1403
1407
  p.stopPropagation(), n((f) => !f);
1404
1408
  };
1405
- return se(() => {
1409
+ return te(() => {
1406
1410
  a(i === e.path);
1407
1411
  const p = i.split("/");
1408
1412
  p.pop(), p.join("/") === e.path && n(!0);
@@ -1450,7 +1454,7 @@ const Lr = ({ folder: e }) => {
1450
1454
  subDirectories: s(l.path, i)
1451
1455
  })) : [];
1452
1456
  };
1453
- return se(() => {
1457
+ return te(() => {
1454
1458
  if (Array.isArray(n)) {
1455
1459
  const a = n.filter((c) => c.isDirectory), i = Object.groupBy(a, ({ path: c }) => cs(c));
1456
1460
  r(() => s("", i));
@@ -1462,7 +1466,7 @@ const kr = () => {
1462
1466
  const [e, r] = L([]), [n, s] = L([]), [a, i] = L([]), [c, l] = L(!1), { currentPath: d, setCurrentPath: p } = Ee(), f = de(null), h = de([]), w = de(null), S = Be(() => {
1463
1467
  l(!1);
1464
1468
  });
1465
- se(() => {
1469
+ te(() => {
1466
1470
  r(() => {
1467
1471
  let j = "";
1468
1472
  return d == null ? void 0 : d.split("/").map((y) => ({
@@ -1476,17 +1480,17 @@ const kr = () => {
1476
1480
  }, z = () => {
1477
1481
  const j = f.current.clientWidth, y = getComputedStyle(f.current), b = parseFloat(y.paddingLeft), u = n.length > 0 ? 1 : 0, g = parseFloat(y.gap) * (e.length + u);
1478
1482
  return j - (b + g);
1479
- }, D = () => {
1483
+ }, A = () => {
1480
1484
  var u;
1481
1485
  const j = z(), y = h.current.reduce((g, _) => _ ? g + _.clientWidth : g, 0), b = ((u = w.current) == null ? void 0 : u.clientWidth) || 0;
1482
1486
  return j - (y + b);
1483
1487
  }, C = () => f.current.scrollWidth > f.current.clientWidth;
1484
- return se(() => {
1488
+ return te(() => {
1485
1489
  var j;
1486
1490
  if (C()) {
1487
1491
  const y = e[1], b = (j = h.current[1]) == null ? void 0 : j.clientWidth;
1488
1492
  i((u) => [...u, b]), s((u) => [...u, y]), r((u) => u.filter((g, _) => _ !== 1));
1489
- } else if (n.length > 0 && D() > a.at(-1)) {
1493
+ } else if (n.length > 0 && A() > a.at(-1)) {
1490
1494
  const y = [e[0], n.at(-1), ...e.slice(1)];
1491
1495
  r(y), s((b) => b.slice(0, -1)), i((b) => b.slice(0, -1));
1492
1496
  }
@@ -1594,7 +1598,7 @@ const Xe = (e) => ({
1594
1598
  ), zr = ({ message: e, xPlacement: r, yPlacement: n }) => /* @__PURE__ */ t.jsx("p", { className: `error-tooltip ${r} ${n}`, children: e }), ls = 220, us = ({ filesViewRef: e, file: r, onCreateFolder: n, triggerAction: s }) => {
1595
1599
  const [a, i] = L(r.name), [c, l] = L(!1), [d, p] = L(""), [f, h] = L("right"), [w, S] = L("bottom"), M = Be((g) => {
1596
1600
  g.preventDefault(), g.stopPropagation();
1597
- }), { currentFolder: z, currentPathFiles: D, setCurrentPathFiles: C } = Ee(), { activeLayout: j } = Se(), y = (g) => {
1601
+ }), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles: C } = Ee(), { activeLayout: j } = Se(), y = (g) => {
1598
1602
  i(g.target.value), l(!1);
1599
1603
  }, b = (g) => {
1600
1604
  if (g.stopPropagation(), g.key === "Enter") {
@@ -1605,7 +1609,7 @@ const Xe = (e) => ({
1605
1609
  `A file name can't contain any of the following characters: \\ / : * ? " < > |`
1606
1610
  ), l(!0)) : (l(!1), p(""));
1607
1611
  };
1608
- se(() => {
1612
+ te(() => {
1609
1613
  if (c) {
1610
1614
  const g = setTimeout(() => {
1611
1615
  l(!1), p("");
@@ -1616,20 +1620,20 @@ const Xe = (e) => ({
1616
1620
  function u() {
1617
1621
  var R, F;
1618
1622
  let g = a.trim();
1619
- const _ = D.filter((A) => !(A.key && A.key === r.key));
1620
- if (_.find((A) => A.name.toLowerCase() === g.toLowerCase())) {
1623
+ const _ = A.filter((D) => !(D.key && D.key === r.key));
1624
+ if (_.find((D) => D.name.toLowerCase() === g.toLowerCase())) {
1621
1625
  p(`This destination already contains a folder named '${g}'.`), l(!0), (R = M.ref.current) == null || R.focus(), (F = M.ref.current) == null || F.select(), M.setIsClicked(!1);
1622
1626
  return;
1623
1627
  }
1624
- g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), C((A) => A.filter((N) => N.key !== r.key)), s.close();
1628
+ g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), C((D) => D.filter((k) => k.key !== r.key)), s.close();
1625
1629
  }
1626
- return se(() => {
1630
+ return te(() => {
1627
1631
  var g, _, x;
1628
1632
  if ((g = M.ref.current) == null || g.focus(), (_ = M.ref.current) == null || _.select(), (x = M.ref) != null && x.current) {
1629
- const N = e.current.getBoundingClientRect(), k = M.ref.current, X = k.getBoundingClientRect();
1630
- N.right - X.left > 313 ? h("right") : h("left"), N.bottom - (X.top + k.clientHeight) > 88 ? S("bottom") : S("top");
1633
+ const k = e.current.getBoundingClientRect(), N = M.ref.current, K = N.getBoundingClientRect();
1634
+ k.right - K.left > 313 ? h("right") : h("left"), k.bottom - (K.top + N.clientHeight) > 88 ? S("bottom") : S("top");
1631
1635
  }
1632
- }, []), se(() => {
1636
+ }, []), te(() => {
1633
1637
  M.isClicked && u();
1634
1638
  }, [M.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1635
1639
  /* @__PURE__ */ t.jsx(
@@ -1678,7 +1682,7 @@ const Ar = ({
1678
1682
  const l = de(null), d = (p) => {
1679
1683
  p.key === "Escape" && n(!1);
1680
1684
  };
1681
- return se(() => {
1685
+ return te(() => {
1682
1686
  r ? l.current.showModal() : l.current.close();
1683
1687
  }, [r]), /* @__PURE__ */ t.jsxs(
1684
1688
  "dialog",
@@ -1697,7 +1701,7 @@ const Ar = ({
1697
1701
  }
1698
1702
  );
1699
1703
  }, _e = (e) => e.split(".").pop(), fs = 220, hs = ({ filesViewRef: e, file: r, onRename: n, triggerAction: s }) => {
1700
- const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: D, setCurrentPathFiles: C } = Ee(), { activeLayout: j } = Se(), y = de(null), b = Be((x) => {
1704
+ const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles: C } = Ee(), { activeLayout: j } = Se(), y = de(null), b = Be((x) => {
1701
1705
  var R;
1702
1706
  (R = y.current) != null && R.contains(x.target) || (x.preventDefault(), x.stopPropagation());
1703
1707
  }), u = (x) => {
@@ -1709,7 +1713,7 @@ const Ar = ({
1709
1713
  `A file name can't contain any of the following characters: \\ / : * ? " < > |`
1710
1714
  ), p(!0)) : p(!1);
1711
1715
  };
1712
- se(() => {
1716
+ te(() => {
1713
1717
  if (d) {
1714
1718
  const x = setTimeout(() => {
1715
1719
  p(!1), h("");
@@ -1723,7 +1727,7 @@ const Ar = ({
1723
1727
  (R) => R.map((F) => (F.key === r.key && (F.isEditing = !1), F))
1724
1728
  ), s.close();
1725
1729
  return;
1726
- } else if (D.some((R) => R.name === a)) {
1730
+ } else if (A.some((R) => R.name === a)) {
1727
1731
  p(!0), h(`This destination already contains a folder named '${a}'.`), b.setIsClicked(!1);
1728
1732
  return;
1729
1733
  } else if (!r.isDirectory && !x) {
@@ -1736,21 +1740,21 @@ const Ar = ({
1736
1740
  p(!1), Le(n, "onRename", r, a), C((R) => R.filter((F) => F.key !== r.key)), s.close();
1737
1741
  }
1738
1742
  const _ = () => {
1739
- var x, R, F, A, N, k;
1743
+ var x, R, F, D, k, N;
1740
1744
  if ((R = (x = b.ref) == null ? void 0 : x.current) == null || R.focus(), r.isDirectory)
1741
- (A = (F = b.ref) == null ? void 0 : F.current) == null || A.select();
1745
+ (D = (F = b.ref) == null ? void 0 : F.current) == null || D.select();
1742
1746
  else {
1743
- const X = _e(r.name), oe = r.name.length - X.length - 1;
1744
- (k = (N = b.ref) == null ? void 0 : N.current) == null || k.setSelectionRange(0, oe);
1747
+ const K = _e(r.name), oe = r.name.length - K.length - 1;
1748
+ (N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0, oe);
1745
1749
  }
1746
1750
  };
1747
- return se(() => {
1751
+ return te(() => {
1748
1752
  var x;
1749
1753
  if (_(), (x = b.ref) != null && x.current) {
1750
- const N = e.current.getBoundingClientRect(), k = b.ref.current, X = k.getBoundingClientRect();
1751
- N.right - X.left > 313 ? S("right") : S("left"), N.bottom - (X.top + k.clientHeight) > 88 ? z("bottom") : z("top");
1754
+ const k = e.current.getBoundingClientRect(), N = b.ref.current, K = N.getBoundingClientRect();
1755
+ k.right - K.left > 313 ? S("right") : S("left"), k.bottom - (K.top + N.clientHeight) > 88 ? z("bottom") : z("top");
1752
1756
  }
1753
- }, []), se(() => {
1757
+ }, []), te(() => {
1754
1758
  b.isClicked && g(!1), _();
1755
1759
  }, [b.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1756
1760
  /* @__PURE__ */ t.jsx(
@@ -1860,7 +1864,7 @@ const Ar = ({
1860
1864
  setLastSelectedFile: f
1861
1865
  }) => {
1862
1866
  var fe, E, ve, Te;
1863
- const [h, w] = L(!1), [S, M] = L(0), [z, D] = L("hidden"), [C, j] = L(""), [y, b] = L(null), { activeLayout: u } = Se(), g = u === "grid" ? 48 : 20, _ = Xe(g), { setCurrentPath: x, currentPathFiles: R } = Ee(), { setSelectedFiles: F } = Fe(), { clipBoard: A, handleCutCopy: N, setClipBoard: k, handlePasting: X } = Je(), oe = de(null), ae = Xe(it), Q = (A == null ? void 0 : A.isMoving) && A.files.find((Y) => Y.name === r.name && Y.path === r.path), he = () => {
1867
+ const [h, w] = L(!1), [S, M] = L(0), [z, A] = L("hidden"), [C, j] = L(""), [y, b] = L(null), { activeLayout: u } = Se(), g = u === "grid" ? 48 : 20, _ = Xe(g), { setCurrentPath: x, currentPathFiles: R } = Ee(), { setSelectedFiles: F } = Fe(), { clipBoard: D, handleCutCopy: k, setClipBoard: N, handlePasting: K } = Je(), oe = de(null), ae = Xe(it), Q = (D == null ? void 0 : D.isMoving) && D.files.find((Y) => Y.name === r.name && Y.path === r.path), he = () => {
1864
1868
  i(r), r.isDirectory ? (x(r.path), F([])) : a && d.show("previewFile");
1865
1869
  }, xe = (Y, le) => {
1866
1870
  if (l.length > 0 && Y) {
@@ -1875,7 +1879,7 @@ const Ar = ({
1875
1879
  const Re = je.filter((we) => we.path !== r.path);
1876
1880
  return je.length === Re.length ? [...je, r] : Re;
1877
1881
  }) : F([r]);
1878
- }, m = (Y) => {
1882
+ }, v = (Y) => {
1879
1883
  if (Y.stopPropagation(), r.isEditing) return;
1880
1884
  xe(Y.shiftKey, Y.ctrlKey);
1881
1885
  const le = (/* @__PURE__ */ new Date()).getTime();
@@ -1889,29 +1893,29 @@ const Ar = ({
1889
1893
  }, V = (Y) => {
1890
1894
  Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || F([r]), f(r), p(Y, !0));
1891
1895
  }, W = () => {
1892
- D("visible");
1896
+ A("visible");
1893
1897
  }, I = () => {
1894
- !h && D("hidden");
1895
- }, K = (Y) => {
1898
+ !h && A("hidden");
1899
+ }, X = (Y) => {
1896
1900
  Y.target.checked ? F((le) => [...le, r]) : F((le) => le.filter((je) => je.name !== r.name && je.path !== r.path)), w(Y.target.checked);
1897
1901
  }, O = (Y) => {
1898
- Y.dataTransfer.setDragImage(oe.current, 30, 50), Y.dataTransfer.effectAllowed = "copy", N(!0);
1899
- }, $ = () => k(null), U = (Y) => {
1902
+ Y.dataTransfer.setDragImage(oe.current, 30, 50), Y.dataTransfer.effectAllowed = "copy", k(!0);
1903
+ }, $ = () => N(null), U = (Y) => {
1900
1904
  Y.preventDefault(), h || !r.isDirectory ? Y.dataTransfer.dropEffect = "none" : (b({ x: Y.clientX, y: Y.clientY + 12 }), Y.dataTransfer.dropEffect = "copy", j("file-drop-zone"));
1901
1905
  }, Z = (Y) => {
1902
1906
  Y.currentTarget.contains(Y.relatedTarget) || (j((le) => le && ""), b(null));
1903
1907
  }, q = (Y) => {
1904
- Y.preventDefault(), !(h || !r.isDirectory) && (X(r), j((le) => le && ""), b(null));
1908
+ Y.preventDefault(), !(h || !r.isDirectory) && (K(r), j((le) => le && ""), b(null));
1905
1909
  };
1906
- return se(() => {
1907
- w(l.includes(e)), D(l.includes(e) ? "visible" : "hidden");
1910
+ return te(() => {
1911
+ w(l.includes(e)), A(l.includes(e) ? "visible" : "hidden");
1908
1912
  }, [l]), /* @__PURE__ */ t.jsxs(
1909
1913
  "div",
1910
1914
  {
1911
1915
  className: `file-item-container ${C} ${h || r.isEditing ? "file-selected" : ""} ${Q ? "file-moving" : ""}`,
1912
1916
  tabIndex: 0,
1913
1917
  title: r.name,
1914
- onClick: m,
1918
+ onClick: v,
1915
1919
  onKeyDown: P,
1916
1920
  onContextMenu: V,
1917
1921
  onMouseOver: W,
@@ -1932,7 +1936,7 @@ const Ar = ({
1932
1936
  id: r.name,
1933
1937
  checked: h,
1934
1938
  className: `selection-checkbox ${z}`,
1935
- onChange: K,
1939
+ onChange: X,
1936
1940
  onClick: (Y) => Y.stopPropagation()
1937
1941
  }
1938
1942
  ),
@@ -1983,14 +1987,14 @@ const Ar = ({
1983
1987
  /* @__PURE__ */ t.jsx("span", { children: s.title })
1984
1988
  ] }, s.title)) }), gs = ({ filesViewRef: e, contextMenuRef: r, menuItems: n, visible: s, clickPosition: a }) => {
1985
1989
  const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S = de(null), M = () => {
1986
- const { clickX: C, clickY: j } = a, y = e.current, b = y.getBoundingClientRect(), u = y.offsetWidth - y.clientWidth, g = r.current.getBoundingClientRect(), _ = g.width, x = g.height, R = C - b.left, F = b.width - (R + u) > _, A = !F, N = j - b.top, k = b.height - N > x, X = !k;
1987
- F ? (c(`${R}px`), w("right")) : A && (c(`${R - _}px`), w("left")), k ? d(`${N + y.scrollTop}px`) : X && d(`${N + y.scrollTop - x}px`);
1990
+ const { clickX: C, clickY: j } = a, y = e.current, b = y.getBoundingClientRect(), u = y.offsetWidth - y.clientWidth, g = r.current.getBoundingClientRect(), _ = g.width, x = g.height, R = C - b.left, F = b.width - (R + u) > _, D = !F, k = j - b.top, N = b.height - k > x, K = !N;
1991
+ F ? (c(`${R}px`), w("right")) : D && (c(`${R - _}px`), w("left")), N ? d(`${k + y.scrollTop}px`) : K && d(`${k + y.scrollTop - x}px`);
1988
1992
  }, z = (C) => {
1989
1993
  C.preventDefault(), C.stopPropagation();
1990
- }, D = (C) => {
1994
+ }, A = (C) => {
1991
1995
  f(C);
1992
1996
  };
1993
- if (se(() => {
1997
+ if (te(() => {
1994
1998
  s && r.current ? M() : (d(0), c(0), f(null));
1995
1999
  }, [s]), s)
1996
2000
  return /* @__PURE__ */ t.jsx(
@@ -2012,7 +2016,7 @@ const Ar = ({
2012
2016
  {
2013
2017
  onClick: C.onClick,
2014
2018
  className: `${C.className ?? ""} ${b ? "active" : ""}`,
2015
- onMouseOver: () => D(j),
2019
+ onMouseOver: () => A(j),
2016
2020
  children: [
2017
2021
  C.icon,
2018
2022
  /* @__PURE__ */ t.jsx("span", { children: C.title }),
@@ -2040,15 +2044,15 @@ function ys(e) {
2040
2044
  return H({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z" }, child: [] }] })(e);
2041
2045
  }
2042
2046
  const xs = (e, r, n) => {
2043
- const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: D } = Je(), { selectedFiles: C, setSelectedFiles: j, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
2047
+ const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: A } = Je(), { selectedFiles: C, setSelectedFiles: j, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
2044
2048
  h.isDirectory ? (u(h.path), a([]), j([])) : r && n.show("previewFile"), c(!1);
2045
- }, A = (O) => {
2049
+ }, D = (O) => {
2046
2050
  z(O), c(!1);
2047
- }, N = () => {
2048
- D(h), c(!1);
2049
2051
  }, k = () => {
2052
+ A(h), c(!1);
2053
+ }, N = () => {
2050
2054
  c(!1), n.show("rename");
2051
- }, X = () => {
2055
+ }, K = () => {
2052
2056
  y(), c(!1);
2053
2057
  }, oe = () => {
2054
2058
  c(!1), n.show("delete");
@@ -2060,7 +2064,7 @@ const xs = (e, r, n) => {
2060
2064
  c(!1), n.show("uploadFile");
2061
2065
  }, xe = () => {
2062
2066
  j(g), c(!1);
2063
- }, m = [
2067
+ }, v = [
2064
2068
  {
2065
2069
  title: "View",
2066
2070
  icon: x === "grid" ? /* @__PURE__ */ t.jsx(Dt, { size: 18 }) : /* @__PURE__ */ t.jsx(Ue, { size: 18 }),
@@ -2117,18 +2121,18 @@ const xs = (e, r, n) => {
2117
2121
  {
2118
2122
  title: "Cut",
2119
2123
  icon: /* @__PURE__ */ t.jsx(yr, { size: 19 }),
2120
- onClick: () => A(!0)
2124
+ onClick: () => D(!0)
2121
2125
  },
2122
2126
  {
2123
2127
  title: "Copy",
2124
2128
  icon: /* @__PURE__ */ t.jsx(vr, { strokeWidth: 0.1, size: 17 }),
2125
- onClick: () => A(!1),
2129
+ onClick: () => D(!1),
2126
2130
  divider: !(h != null && h.isDirectory)
2127
2131
  },
2128
2132
  {
2129
2133
  title: "Paste",
2130
2134
  icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
2131
- onClick: N,
2135
+ onClick: k,
2132
2136
  className: `${S ? "" : "disable-paste"}`,
2133
2137
  hidden: !(h != null && h.isDirectory),
2134
2138
  divider: !0
@@ -2136,13 +2140,13 @@ const xs = (e, r, n) => {
2136
2140
  {
2137
2141
  title: "Rename",
2138
2142
  icon: /* @__PURE__ */ t.jsx(br, { size: 19 }),
2139
- onClick: k,
2143
+ onClick: N,
2140
2144
  hidden: C.length > 1
2141
2145
  },
2142
2146
  {
2143
2147
  title: "Download",
2144
2148
  icon: /* @__PURE__ */ t.jsx(Ct, { size: 18 }),
2145
- onClick: X,
2149
+ onClick: K,
2146
2150
  hidden: h == null ? void 0 : h.isDirectory
2147
2151
  },
2148
2152
  {
@@ -2165,10 +2169,10 @@ const xs = (e, r, n) => {
2165
2169
  _((O) => (O[s.at(-1)] && (O[s.at(-1)].isEditing = !0), O)), a([]), j([]);
2166
2170
  }, I = () => {
2167
2171
  a([]), j((O) => O.length > 0 ? [] : O);
2168
- }, K = (O, $ = !1) => {
2172
+ }, X = (O, $ = !1) => {
2169
2173
  O.preventDefault(), f({ clickX: O.clientX, clickY: O.clientY }), d($), !$ && I(), c(!0);
2170
2174
  };
2171
- return se(() => {
2175
+ return te(() => {
2172
2176
  if (n.isActive)
2173
2177
  switch (n.actionType) {
2174
2178
  case "createFolder":
@@ -2178,14 +2182,14 @@ const xs = (e, r, n) => {
2178
2182
  W();
2179
2183
  break;
2180
2184
  }
2181
- }, [n.isActive]), se(() => {
2185
+ }, [n.isActive]), te(() => {
2182
2186
  a([]), j([]);
2183
- }, [b]), se(() => {
2187
+ }, [b]), te(() => {
2184
2188
  C.length > 0 ? a(() => C.map((O) => g.findIndex(($) => $.path === O.path))) : a([]);
2185
2189
  }, [C, g]), {
2186
- emptySelecCtxItems: m,
2190
+ emptySelecCtxItems: v,
2187
2191
  selecCtxItems: P,
2188
- handleContextMenu: K,
2192
+ handleContextMenu: X,
2189
2193
  unselectFiles: I,
2190
2194
  visible: i,
2191
2195
  setVisible: c,
@@ -2228,7 +2232,7 @@ const xs = (e, r, n) => {
2228
2232
  visible: S,
2229
2233
  setVisible: M,
2230
2234
  setLastSelectedFile: z,
2231
- selectedFileIndexes: D,
2235
+ selectedFileIndexes: A,
2232
2236
  clickPosition: C,
2233
2237
  isSelectionCtx: j
2234
2238
  } = xs(s, a, i), y = Be(() => M(!1));
@@ -2252,7 +2256,7 @@ const xs = (e, r, n) => {
2252
2256
  enableFilePreview: a,
2253
2257
  triggerAction: i,
2254
2258
  filesViewRef: l,
2255
- selectedFileIndexes: D,
2259
+ selectedFileIndexes: A,
2256
2260
  handleContextMenu: h,
2257
2261
  setVisible: M,
2258
2262
  setLastSelectedFile: z
@@ -2277,7 +2281,7 @@ const xs = (e, r, n) => {
2277
2281
  Ir.displayName = "FileList";
2278
2282
  const js = ({ triggerAction: e, onDelete: r }) => {
2279
2283
  const [n, s] = L(""), { selectedFiles: a, setSelectedFiles: i } = Fe();
2280
- se(() => {
2284
+ te(() => {
2281
2285
  s(() => {
2282
2286
  if (a.length === 1)
2283
2287
  return `Are you sure you want to delete "${a[0].name}"?`;
@@ -2319,12 +2323,12 @@ const Ps = ({
2319
2323
  handleFileRemove: c
2320
2324
  }) => {
2321
2325
  var g, _, x, R;
2322
- const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), D = de(), { onError: C } = Ge(), j = (F) => {
2323
- d(0), s((N) => ({
2324
- ...N,
2326
+ const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), A = de(), { onError: C } = Ge(), j = (F) => {
2327
+ d(0), s((k) => ({
2328
+ ...k,
2325
2329
  [e]: !1
2326
2330
  }));
2327
- const A = {
2331
+ const D = {
2328
2332
  type: "upload",
2329
2333
  message: "Upload failed.",
2330
2334
  response: {
@@ -2334,54 +2338,54 @@ const Ps = ({
2334
2338
  }
2335
2339
  };
2336
2340
  n(
2337
- (N) => N.map((k, X) => e === X ? {
2338
- ...k,
2339
- error: A.message
2340
- } : k)
2341
- ), M(!0), C(A, r.file);
2341
+ (k) => k.map((N, K) => e === K ? {
2342
+ ...N,
2343
+ error: D.message
2344
+ } : N)
2345
+ ), M(!0), C(D, r.file);
2342
2346
  }, y = (F) => {
2343
2347
  if (!F.error)
2344
- return new Promise((A, N) => {
2345
- const k = new XMLHttpRequest();
2346
- D.current = k, s((Q) => ({
2348
+ return new Promise((D, k) => {
2349
+ const N = new XMLHttpRequest();
2350
+ A.current = N, s((Q) => ({
2347
2351
  ...Q,
2348
2352
  [e]: !0
2349
- })), k.upload.onprogress = (Q) => {
2353
+ })), N.upload.onprogress = (Q) => {
2350
2354
  if (Q.lengthComputable) {
2351
2355
  const he = Math.round(Q.loaded / Q.total * 100);
2352
2356
  d(he);
2353
2357
  }
2354
- }, k.onload = () => {
2358
+ }, N.onload = () => {
2355
2359
  s((Q) => ({
2356
2360
  ...Q,
2357
2361
  [e]: !1
2358
- })), k.status === 200 || k.status === 201 ? (f(!0), i(k.response), A(k.response)) : (N(k.statusText), j(k));
2359
- }, k.onerror = () => {
2360
- N(k.statusText), j(k);
2361
- }, k.open("POST", a == null ? void 0 : a.url, !0);
2362
- const X = a == null ? void 0 : a.headers;
2363
- for (let Q in X)
2364
- k.setRequestHeader(Q, X[Q]);
2362
+ })), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), D(N.response)) : (k(N.statusText), j(N));
2363
+ }, N.onerror = () => {
2364
+ k(N.statusText), j(N);
2365
+ }, N.open("POST", a == null ? void 0 : a.url, !0);
2366
+ const K = a == null ? void 0 : a.headers;
2367
+ for (let Q in K)
2368
+ N.setRequestHeader(Q, K[Q]);
2365
2369
  const oe = new FormData(), ae = F == null ? void 0 : F.appendData;
2366
2370
  for (let Q in ae)
2367
2371
  ae[Q] && oe.append(Q, ae[Q]);
2368
- oe.append("file", F.file), k.send(oe);
2372
+ oe.append("file", F.file), N.send(oe);
2369
2373
  });
2370
2374
  };
2371
- se(() => {
2372
- D.current || y(r);
2375
+ te(() => {
2376
+ A.current || y(r);
2373
2377
  }, []);
2374
2378
  const b = () => {
2375
- D.current && (D.current.abort(), s((F) => ({
2379
+ A.current && (A.current.abort(), s((F) => ({
2376
2380
  ...F,
2377
2381
  [e]: !1
2378
2382
  })), w(!0), d(0));
2379
2383
  }, u = () => {
2380
2384
  r != null && r.file && (n(
2381
- (F) => F.map((A, N) => e === N ? {
2382
- ...A,
2385
+ (F) => F.map((D, k) => e === k ? {
2386
+ ...D,
2383
2387
  error: !1
2384
- } : A)
2388
+ } : D)
2385
2389
  ), y({ ...r, error: !1 }), w(!1), M(!1));
2386
2390
  };
2387
2391
  return r.removed ? null : /* @__PURE__ */ t.jsxs("li", { children: [
@@ -2422,7 +2426,7 @@ const Ps = ({
2422
2426
  }) => {
2423
2427
  const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: S } = Ge(), M = de(null), z = (u) => {
2424
2428
  u.key === "Enter" && M.current.click();
2425
- }, D = (u) => {
2429
+ }, A = (u) => {
2426
2430
  if (n && !n.includes(_e(u.name)))
2427
2431
  return "File type is not allowed.";
2428
2432
  if (w.some(
@@ -2434,7 +2438,7 @@ const Ps = ({
2434
2438
  (g) => !i.some((_) => _.file.name.toLowerCase() === g.name.toLowerCase())
2435
2439
  ), u.length > 0) {
2436
2440
  const g = u.map((_) => {
2437
- const x = s(_, h), R = D(_);
2441
+ const x = s(_, h), R = A(_);
2438
2442
  return R && S({ type: "upload", message: R }, _), {
2439
2443
  file: _,
2440
2444
  appendData: x,
@@ -2580,7 +2584,7 @@ const Ps = ({
2580
2584
  }, l = () => {
2581
2585
  s.current.clear();
2582
2586
  };
2583
- se(() => (window.addEventListener("keydown", i), window.addEventListener("keyup", c), window.addEventListener("blur", l), () => {
2587
+ te(() => (window.addEventListener("keydown", i), window.addEventListener("keyup", c), window.addEventListener("blur", l), () => {
2584
2588
  window.removeEventListener("keydown", i), window.removeEventListener("keyup", c), window.removeEventListener("blur", l);
2585
2589
  }), [a, r, n]);
2586
2590
  }, ye = {
@@ -2618,7 +2622,7 @@ const Ps = ({
2618
2622
  a(i);
2619
2623
  }, z = () => {
2620
2624
  e.show("rename");
2621
- }, D = () => {
2625
+ }, A = () => {
2622
2626
  d();
2623
2627
  }, C = () => {
2624
2628
  e.show("delete");
@@ -2637,7 +2641,7 @@ const Ps = ({
2637
2641
  }, x = () => {
2638
2642
  p("list");
2639
2643
  };
2640
- ge(ye.createFolder, f, e.isActive), ge(ye.uploadFiles, h, e.isActive), ge(ye.cut, w, e.isActive), ge(ye.copy, S, e.isActive), ge(ye.paste, M, e.isActive), ge(ye.rename, z, e.isActive), ge(ye.download, D, e.isActive), ge(ye.delete, C, e.isActive), ge(ye.jumpToFirst, j, e.isActive), ge(ye.jumpToLast, y, e.isActive), ge(ye.selectAll, b, e.isActive), ge(ye.clearSelection, u, e.isActive), ge(ye.refresh, g, e.isActive), ge(ye.gridLayout, _, e.isActive), ge(ye.listLayout, x, e.isActive);
2644
+ ge(ye.createFolder, f, e.isActive), ge(ye.uploadFiles, h, e.isActive), ge(ye.cut, w, e.isActive), ge(ye.copy, S, e.isActive), ge(ye.paste, M, e.isActive), ge(ye.rename, z, e.isActive), ge(ye.download, A, e.isActive), ge(ye.delete, C, e.isActive), ge(ye.jumpToFirst, j, e.isActive), ge(ye.jumpToLast, y, e.isActive), ge(ye.selectAll, b, e.isActive), ge(ye.clearSelection, u, e.isActive), ge(ye.refresh, g, e.isActive), ge(ye.gridLayout, _, e.isActive), ge(ye.listLayout, x, e.isActive);
2641
2645
  }, Ms = ({
2642
2646
  fileUploadConfig: e,
2643
2647
  onFileUploading: r,
@@ -2684,7 +2688,7 @@ const Ps = ({
2684
2688
  width: "50%"
2685
2689
  }
2686
2690
  };
2687
- if (se(() => {
2691
+ if (te(() => {
2688
2692
  if (p.isActive) {
2689
2693
  const M = p.actionType;
2690
2694
  M === "previewFile" && (S[M].title = (w == null ? void 0 : w.name) ?? "Preview"), h(S[M]);
@@ -2734,7 +2738,7 @@ const Ps = ({
2734
2738
  }
2735
2739
  };
2736
2740
  };
2737
- var gt = { exports: {} }, We = { exports: {} }, re = {};
2741
+ var gt = { exports: {} }, We = { exports: {} }, ne = {};
2738
2742
  /** @license React v16.13.1
2739
2743
  * react-is.production.min.js
2740
2744
  *
@@ -2745,9 +2749,9 @@ var gt = { exports: {} }, We = { exports: {} }, re = {};
2745
2749
  */
2746
2750
  var rr;
2747
2751
  function ks() {
2748
- if (rr) return re;
2752
+ if (rr) return ne;
2749
2753
  rr = 1;
2750
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2754
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2751
2755
  function y(u) {
2752
2756
  if (typeof u == "object" && u !== null) {
2753
2757
  var g = u.$$typeof;
@@ -2781,35 +2785,35 @@ function ks() {
2781
2785
  function b(u) {
2782
2786
  return y(u) === p;
2783
2787
  }
2784
- return re.AsyncMode = d, re.ConcurrentMode = p, re.ContextConsumer = l, re.ContextProvider = c, re.Element = r, re.ForwardRef = f, re.Fragment = s, re.Lazy = M, re.Memo = S, re.Portal = n, re.Profiler = i, re.StrictMode = a, re.Suspense = h, re.isAsyncMode = function(u) {
2788
+ return ne.AsyncMode = d, ne.ConcurrentMode = p, ne.ContextConsumer = l, ne.ContextProvider = c, ne.Element = r, ne.ForwardRef = f, ne.Fragment = s, ne.Lazy = M, ne.Memo = S, ne.Portal = n, ne.Profiler = i, ne.StrictMode = a, ne.Suspense = h, ne.isAsyncMode = function(u) {
2785
2789
  return b(u) || y(u) === d;
2786
- }, re.isConcurrentMode = b, re.isContextConsumer = function(u) {
2790
+ }, ne.isConcurrentMode = b, ne.isContextConsumer = function(u) {
2787
2791
  return y(u) === l;
2788
- }, re.isContextProvider = function(u) {
2792
+ }, ne.isContextProvider = function(u) {
2789
2793
  return y(u) === c;
2790
- }, re.isElement = function(u) {
2794
+ }, ne.isElement = function(u) {
2791
2795
  return typeof u == "object" && u !== null && u.$$typeof === r;
2792
- }, re.isForwardRef = function(u) {
2796
+ }, ne.isForwardRef = function(u) {
2793
2797
  return y(u) === f;
2794
- }, re.isFragment = function(u) {
2798
+ }, ne.isFragment = function(u) {
2795
2799
  return y(u) === s;
2796
- }, re.isLazy = function(u) {
2800
+ }, ne.isLazy = function(u) {
2797
2801
  return y(u) === M;
2798
- }, re.isMemo = function(u) {
2802
+ }, ne.isMemo = function(u) {
2799
2803
  return y(u) === S;
2800
- }, re.isPortal = function(u) {
2804
+ }, ne.isPortal = function(u) {
2801
2805
  return y(u) === n;
2802
- }, re.isProfiler = function(u) {
2806
+ }, ne.isProfiler = function(u) {
2803
2807
  return y(u) === i;
2804
- }, re.isStrictMode = function(u) {
2808
+ }, ne.isStrictMode = function(u) {
2805
2809
  return y(u) === a;
2806
- }, re.isSuspense = function(u) {
2810
+ }, ne.isSuspense = function(u) {
2807
2811
  return y(u) === h;
2808
- }, re.isValidElementType = function(u) {
2809
- return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === D || u.$$typeof === C || u.$$typeof === j || u.$$typeof === z);
2810
- }, re.typeOf = y, re;
2812
+ }, ne.isValidElementType = function(u) {
2813
+ return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === A || u.$$typeof === C || u.$$typeof === j || u.$$typeof === z);
2814
+ }, ne.typeOf = y, ne;
2811
2815
  }
2812
- var ne = {};
2816
+ var se = {};
2813
2817
  /** @license React v16.13.1
2814
2818
  * react-is.development.js
2815
2819
  *
@@ -2821,10 +2825,10 @@ var ne = {};
2821
2825
  var nr;
2822
2826
  function _s() {
2823
2827
  return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
2824
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2828
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2825
2829
  function y(E) {
2826
2830
  return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2827
- E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === D || E.$$typeof === C || E.$$typeof === j || E.$$typeof === z);
2831
+ E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === A || E.$$typeof === C || E.$$typeof === j || E.$$typeof === z);
2828
2832
  }
2829
2833
  function b(E) {
2830
2834
  if (typeof E == "object" && E !== null) {
@@ -2858,11 +2862,11 @@ function _s() {
2858
2862
  }
2859
2863
  }
2860
2864
  }
2861
- var u = d, g = p, _ = l, x = c, R = r, F = f, A = s, N = M, k = S, X = n, oe = i, ae = a, Q = h, he = !1;
2865
+ var u = d, g = p, _ = l, x = c, R = r, F = f, D = s, k = M, N = S, K = n, oe = i, ae = a, Q = h, he = !1;
2862
2866
  function xe(E) {
2863
- return he || (he = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(E) || b(E) === d;
2867
+ return he || (he = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(E) || b(E) === d;
2864
2868
  }
2865
- function m(E) {
2869
+ function v(E) {
2866
2870
  return b(E) === p;
2867
2871
  }
2868
2872
  function P(E) {
@@ -2877,7 +2881,7 @@ function _s() {
2877
2881
  function I(E) {
2878
2882
  return b(E) === f;
2879
2883
  }
2880
- function K(E) {
2884
+ function X(E) {
2881
2885
  return b(E) === s;
2882
2886
  }
2883
2887
  function O(E) {
@@ -2898,8 +2902,8 @@ function _s() {
2898
2902
  function fe(E) {
2899
2903
  return b(E) === h;
2900
2904
  }
2901
- ne.AsyncMode = u, ne.ConcurrentMode = g, ne.ContextConsumer = _, ne.ContextProvider = x, ne.Element = R, ne.ForwardRef = F, ne.Fragment = A, ne.Lazy = N, ne.Memo = k, ne.Portal = X, ne.Profiler = oe, ne.StrictMode = ae, ne.Suspense = Q, ne.isAsyncMode = xe, ne.isConcurrentMode = m, ne.isContextConsumer = P, ne.isContextProvider = V, ne.isElement = W, ne.isForwardRef = I, ne.isFragment = K, ne.isLazy = O, ne.isMemo = $, ne.isPortal = U, ne.isProfiler = Z, ne.isStrictMode = q, ne.isSuspense = fe, ne.isValidElementType = y, ne.typeOf = b;
2902
- }()), ne;
2905
+ se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = F, se.Fragment = D, se.Lazy = k, se.Memo = N, se.Portal = K, se.Profiler = oe, se.StrictMode = ae, se.Suspense = Q, se.isAsyncMode = xe, se.isConcurrentMode = v, se.isContextConsumer = P, se.isContextProvider = V, se.isElement = W, se.isForwardRef = I, se.isFragment = X, se.isLazy = O, se.isMemo = $, se.isPortal = U, se.isProfiler = Z, se.isStrictMode = q, se.isSuspense = fe, se.isValidElementType = y, se.typeOf = b;
2906
+ }()), se;
2903
2907
  }
2904
2908
  var sr;
2905
2909
  function $r() {
@@ -3035,8 +3039,8 @@ function As() {
3035
3039
  }
3036
3040
  return ht = function(l, d) {
3037
3041
  var p = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
3038
- function h(m) {
3039
- var P = m && (p && m[p] || m[f]);
3042
+ function h(v) {
3043
+ var P = v && (p && v[p] || v[f]);
3040
3044
  if (typeof P == "function")
3041
3045
  return P;
3042
3046
  }
@@ -3058,20 +3062,20 @@ function As() {
3058
3062
  objectOf: x,
3059
3063
  oneOf: _,
3060
3064
  oneOfType: R,
3061
- shape: N,
3062
- exact: k
3065
+ shape: k,
3066
+ exact: N
3063
3067
  };
3064
- function M(m, P) {
3065
- return m === P ? m !== 0 || 1 / m === 1 / P : m !== m && P !== P;
3068
+ function M(v, P) {
3069
+ return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
3066
3070
  }
3067
- function z(m, P) {
3068
- this.message = m, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
3071
+ function z(v, P) {
3072
+ this.message = v, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
3069
3073
  }
3070
3074
  z.prototype = Error.prototype;
3071
- function D(m) {
3075
+ function A(v) {
3072
3076
  if (process.env.NODE_ENV !== "production")
3073
3077
  var P = {}, V = 0;
3074
- function W(K, O, $, U, Z, q, fe) {
3078
+ function W(X, O, $, U, Z, q, fe) {
3075
3079
  if (U = U || w, q = q || $, fe !== n) {
3076
3080
  if (d) {
3077
3081
  var E = new Error(
@@ -3086,125 +3090,125 @@ function As() {
3086
3090
  ), P[ve] = !0, V++);
3087
3091
  }
3088
3092
  }
3089
- return O[$] == null ? K ? O[$] === null ? new z("The " + Z + " `" + q + "` is marked as required " + ("in `" + U + "`, but its value is `null`.")) : new z("The " + Z + " `" + q + "` is marked as required in " + ("`" + U + "`, but its value is `undefined`.")) : null : m(O, $, U, Z, q);
3093
+ return O[$] == null ? X ? O[$] === null ? new z("The " + Z + " `" + q + "` is marked as required " + ("in `" + U + "`, but its value is `null`.")) : new z("The " + Z + " `" + q + "` is marked as required in " + ("`" + U + "`, but its value is `undefined`.")) : null : v(O, $, U, Z, q);
3090
3094
  }
3091
3095
  var I = W.bind(null, !1);
3092
3096
  return I.isRequired = W.bind(null, !0), I;
3093
3097
  }
3094
- function C(m) {
3095
- function P(V, W, I, K, O, $) {
3098
+ function C(v) {
3099
+ function P(V, W, I, X, O, $) {
3096
3100
  var U = V[W], Z = ae(U);
3097
- if (Z !== m) {
3101
+ if (Z !== v) {
3098
3102
  var q = Q(U);
3099
3103
  return new z(
3100
- "Invalid " + K + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("`" + m + "`."),
3101
- { expectedType: m }
3104
+ "Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("`" + v + "`."),
3105
+ { expectedType: v }
3102
3106
  );
3103
3107
  }
3104
3108
  return null;
3105
3109
  }
3106
- return D(P);
3110
+ return A(P);
3107
3111
  }
3108
3112
  function j() {
3109
- return D(c);
3113
+ return A(c);
3110
3114
  }
3111
- function y(m) {
3112
- function P(V, W, I, K, O) {
3113
- if (typeof m != "function")
3115
+ function y(v) {
3116
+ function P(V, W, I, X, O) {
3117
+ if (typeof v != "function")
3114
3118
  return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
3115
3119
  var $ = V[W];
3116
3120
  if (!Array.isArray($)) {
3117
3121
  var U = ae($);
3118
- return new z("Invalid " + K + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected an array."));
3122
+ return new z("Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected an array."));
3119
3123
  }
3120
3124
  for (var Z = 0; Z < $.length; Z++) {
3121
- var q = m($, Z, I, K, O + "[" + Z + "]", n);
3125
+ var q = v($, Z, I, X, O + "[" + Z + "]", n);
3122
3126
  if (q instanceof Error)
3123
3127
  return q;
3124
3128
  }
3125
3129
  return null;
3126
3130
  }
3127
- return D(P);
3131
+ return A(P);
3128
3132
  }
3129
3133
  function b() {
3130
- function m(P, V, W, I, K) {
3134
+ function v(P, V, W, I, X) {
3131
3135
  var O = P[V];
3132
3136
  if (!l(O)) {
3133
3137
  var $ = ae(O);
3134
- return new z("Invalid " + I + " `" + K + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
3138
+ return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
3135
3139
  }
3136
3140
  return null;
3137
3141
  }
3138
- return D(m);
3142
+ return A(v);
3139
3143
  }
3140
3144
  function u() {
3141
- function m(P, V, W, I, K) {
3145
+ function v(P, V, W, I, X) {
3142
3146
  var O = P[V];
3143
3147
  if (!e.isValidElementType(O)) {
3144
3148
  var $ = ae(O);
3145
- return new z("Invalid " + I + " `" + K + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
3149
+ return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
3146
3150
  }
3147
3151
  return null;
3148
3152
  }
3149
- return D(m);
3153
+ return A(v);
3150
3154
  }
3151
- function g(m) {
3152
- function P(V, W, I, K, O) {
3153
- if (!(V[W] instanceof m)) {
3154
- var $ = m.name || w, U = xe(V[W]);
3155
- return new z("Invalid " + K + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
3155
+ function g(v) {
3156
+ function P(V, W, I, X, O) {
3157
+ if (!(V[W] instanceof v)) {
3158
+ var $ = v.name || w, U = xe(V[W]);
3159
+ return new z("Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
3156
3160
  }
3157
3161
  return null;
3158
3162
  }
3159
- return D(P);
3163
+ return A(P);
3160
3164
  }
3161
- function _(m) {
3162
- if (!Array.isArray(m))
3165
+ function _(v) {
3166
+ if (!Array.isArray(v))
3163
3167
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
3164
3168
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
3165
3169
  ) : i("Invalid argument supplied to oneOf, expected an array.")), c;
3166
- function P(V, W, I, K, O) {
3167
- for (var $ = V[W], U = 0; U < m.length; U++)
3168
- if (M($, m[U]))
3170
+ function P(V, W, I, X, O) {
3171
+ for (var $ = V[W], U = 0; U < v.length; U++)
3172
+ if (M($, v[U]))
3169
3173
  return null;
3170
- var Z = JSON.stringify(m, function(fe, E) {
3174
+ var Z = JSON.stringify(v, function(fe, E) {
3171
3175
  var ve = Q(E);
3172
3176
  return ve === "symbol" ? String(E) : E;
3173
3177
  });
3174
- return new z("Invalid " + K + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
3178
+ return new z("Invalid " + X + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
3175
3179
  }
3176
- return D(P);
3180
+ return A(P);
3177
3181
  }
3178
- function x(m) {
3179
- function P(V, W, I, K, O) {
3180
- if (typeof m != "function")
3182
+ function x(v) {
3183
+ function P(V, W, I, X, O) {
3184
+ if (typeof v != "function")
3181
3185
  return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
3182
3186
  var $ = V[W], U = ae($);
3183
3187
  if (U !== "object")
3184
- return new z("Invalid " + K + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected an object."));
3188
+ return new z("Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected an object."));
3185
3189
  for (var Z in $)
3186
3190
  if (s($, Z)) {
3187
- var q = m($, Z, I, K, O + "." + Z, n);
3191
+ var q = v($, Z, I, X, O + "." + Z, n);
3188
3192
  if (q instanceof Error)
3189
3193
  return q;
3190
3194
  }
3191
3195
  return null;
3192
3196
  }
3193
- return D(P);
3197
+ return A(P);
3194
3198
  }
3195
- function R(m) {
3196
- if (!Array.isArray(m))
3199
+ function R(v) {
3200
+ if (!Array.isArray(v))
3197
3201
  return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
3198
- for (var P = 0; P < m.length; P++) {
3199
- var V = m[P];
3202
+ for (var P = 0; P < v.length; P++) {
3203
+ var V = v[P];
3200
3204
  if (typeof V != "function")
3201
3205
  return i(
3202
3206
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + he(V) + " at index " + P + "."
3203
3207
  ), c;
3204
3208
  }
3205
- function W(I, K, O, $, U) {
3206
- for (var Z = [], q = 0; q < m.length; q++) {
3207
- var fe = m[q], E = fe(I, K, O, $, U, n);
3209
+ function W(I, X, O, $, U) {
3210
+ for (var Z = [], q = 0; q < v.length; q++) {
3211
+ var fe = v[q], E = fe(I, X, O, $, U, n);
3208
3212
  if (E == null)
3209
3213
  return null;
3210
3214
  E.data && s(E.data, "expectedType") && Z.push(E.data.expectedType);
@@ -3212,83 +3216,83 @@ function As() {
3212
3216
  var ve = Z.length > 0 ? ", expected one of type [" + Z.join(", ") + "]" : "";
3213
3217
  return new z("Invalid " + $ + " `" + U + "` supplied to " + ("`" + O + "`" + ve + "."));
3214
3218
  }
3215
- return D(W);
3219
+ return A(W);
3216
3220
  }
3217
3221
  function F() {
3218
- function m(P, V, W, I, K) {
3219
- return X(P[V]) ? null : new z("Invalid " + I + " `" + K + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
3222
+ function v(P, V, W, I, X) {
3223
+ return K(P[V]) ? null : new z("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
3220
3224
  }
3221
- return D(m);
3225
+ return A(v);
3222
3226
  }
3223
- function A(m, P, V, W, I) {
3227
+ function D(v, P, V, W, I) {
3224
3228
  return new z(
3225
- (m || "React class") + ": " + P + " type `" + V + "." + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
3229
+ (v || "React class") + ": " + P + " type `" + V + "." + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
3226
3230
  );
3227
3231
  }
3228
- function N(m) {
3229
- function P(V, W, I, K, O) {
3232
+ function k(v) {
3233
+ function P(V, W, I, X, O) {
3230
3234
  var $ = V[W], U = ae($);
3231
3235
  if (U !== "object")
3232
- return new z("Invalid " + K + " `" + O + "` of type `" + U + "` " + ("supplied to `" + I + "`, expected `object`."));
3233
- for (var Z in m) {
3234
- var q = m[Z];
3236
+ return new z("Invalid " + X + " `" + O + "` of type `" + U + "` " + ("supplied to `" + I + "`, expected `object`."));
3237
+ for (var Z in v) {
3238
+ var q = v[Z];
3235
3239
  if (typeof q != "function")
3236
- return A(I, K, O, Z, Q(q));
3237
- var fe = q($, Z, I, K, O + "." + Z, n);
3240
+ return D(I, X, O, Z, Q(q));
3241
+ var fe = q($, Z, I, X, O + "." + Z, n);
3238
3242
  if (fe)
3239
3243
  return fe;
3240
3244
  }
3241
3245
  return null;
3242
3246
  }
3243
- return D(P);
3247
+ return A(P);
3244
3248
  }
3245
- function k(m) {
3246
- function P(V, W, I, K, O) {
3249
+ function N(v) {
3250
+ function P(V, W, I, X, O) {
3247
3251
  var $ = V[W], U = ae($);
3248
3252
  if (U !== "object")
3249
- return new z("Invalid " + K + " `" + O + "` of type `" + U + "` " + ("supplied to `" + I + "`, expected `object`."));
3250
- var Z = r({}, V[W], m);
3253
+ return new z("Invalid " + X + " `" + O + "` of type `" + U + "` " + ("supplied to `" + I + "`, expected `object`."));
3254
+ var Z = r({}, V[W], v);
3251
3255
  for (var q in Z) {
3252
- var fe = m[q];
3253
- if (s(m, q) && typeof fe != "function")
3254
- return A(I, K, O, q, Q(fe));
3256
+ var fe = v[q];
3257
+ if (s(v, q) && typeof fe != "function")
3258
+ return D(I, X, O, q, Q(fe));
3255
3259
  if (!fe)
3256
3260
  return new z(
3257
- "Invalid " + K + " `" + O + "` key `" + q + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(V[W], null, " ") + `
3258
- Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
3261
+ "Invalid " + X + " `" + O + "` key `" + q + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(V[W], null, " ") + `
3262
+ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
3259
3263
  );
3260
- var E = fe($, q, I, K, O + "." + q, n);
3264
+ var E = fe($, q, I, X, O + "." + q, n);
3261
3265
  if (E)
3262
3266
  return E;
3263
3267
  }
3264
3268
  return null;
3265
3269
  }
3266
- return D(P);
3270
+ return A(P);
3267
3271
  }
3268
- function X(m) {
3269
- switch (typeof m) {
3272
+ function K(v) {
3273
+ switch (typeof v) {
3270
3274
  case "number":
3271
3275
  case "string":
3272
3276
  case "undefined":
3273
3277
  return !0;
3274
3278
  case "boolean":
3275
- return !m;
3279
+ return !v;
3276
3280
  case "object":
3277
- if (Array.isArray(m))
3278
- return m.every(X);
3279
- if (m === null || l(m))
3281
+ if (Array.isArray(v))
3282
+ return v.every(K);
3283
+ if (v === null || l(v))
3280
3284
  return !0;
3281
- var P = h(m);
3285
+ var P = h(v);
3282
3286
  if (P) {
3283
- var V = P.call(m), W;
3284
- if (P !== m.entries) {
3287
+ var V = P.call(v), W;
3288
+ if (P !== v.entries) {
3285
3289
  for (; !(W = V.next()).done; )
3286
- if (!X(W.value))
3290
+ if (!K(W.value))
3287
3291
  return !1;
3288
3292
  } else
3289
3293
  for (; !(W = V.next()).done; ) {
3290
3294
  var I = W.value;
3291
- if (I && !X(I[1]))
3295
+ if (I && !K(I[1]))
3292
3296
  return !1;
3293
3297
  }
3294
3298
  } else
@@ -3298,27 +3302,27 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
3298
3302
  return !1;
3299
3303
  }
3300
3304
  }
3301
- function oe(m, P) {
3302
- return m === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
3305
+ function oe(v, P) {
3306
+ return v === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
3303
3307
  }
3304
- function ae(m) {
3305
- var P = typeof m;
3306
- return Array.isArray(m) ? "array" : m instanceof RegExp ? "object" : oe(P, m) ? "symbol" : P;
3308
+ function ae(v) {
3309
+ var P = typeof v;
3310
+ return Array.isArray(v) ? "array" : v instanceof RegExp ? "object" : oe(P, v) ? "symbol" : P;
3307
3311
  }
3308
- function Q(m) {
3309
- if (typeof m > "u" || m === null)
3310
- return "" + m;
3311
- var P = ae(m);
3312
+ function Q(v) {
3313
+ if (typeof v > "u" || v === null)
3314
+ return "" + v;
3315
+ var P = ae(v);
3312
3316
  if (P === "object") {
3313
- if (m instanceof Date)
3317
+ if (v instanceof Date)
3314
3318
  return "date";
3315
- if (m instanceof RegExp)
3319
+ if (v instanceof RegExp)
3316
3320
  return "regexp";
3317
3321
  }
3318
3322
  return P;
3319
3323
  }
3320
- function he(m) {
3321
- var P = Q(m);
3324
+ function he(v) {
3325
+ var P = Q(v);
3322
3326
  switch (P) {
3323
3327
  case "array":
3324
3328
  case "object":
@@ -3331,8 +3335,8 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
3331
3335
  return P;
3332
3336
  }
3333
3337
  }
3334
- function xe(m) {
3335
- return !m.constructor || !m.constructor.name ? w : m.constructor.name;
3338
+ function xe(v) {
3339
+ return !v.constructor || !v.constructor.name ? w : v.constructor.name;
3336
3340
  }
3337
3341
  return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
3338
3342
  }, ht;
@@ -3427,29 +3431,30 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3427
3431
  onRefresh: S,
3428
3432
  onFileOpen: M = () => {
3429
3433
  },
3430
- onError: z = () => {
3434
+ onSelect: z,
3435
+ onError: A = () => {
3431
3436
  },
3432
- layout: D = "grid",
3433
- enableFilePreview: C = !0,
3434
- maxFileSize: j,
3435
- filePreviewPath: y,
3436
- acceptedFileTypes: b,
3437
- height: u = "600px",
3438
- width: g = "100%",
3439
- initialPath: _ = "",
3440
- filePreviewComponent: x,
3441
- primaryColor: R = "#6155b4",
3442
- fontFamily: F = "Nunito Sans, sans-serif"
3437
+ layout: C = "grid",
3438
+ enableFilePreview: j = !0,
3439
+ maxFileSize: y,
3440
+ filePreviewPath: b,
3441
+ acceptedFileTypes: u,
3442
+ height: g = "600px",
3443
+ width: _ = "100%",
3444
+ initialPath: x = "",
3445
+ filePreviewComponent: R,
3446
+ primaryColor: F = "#6155b4",
3447
+ fontFamily: D = "Nunito Sans, sans-serif"
3443
3448
  }) => {
3444
- const A = Ls(), { containerRef: N, colSizes: k, isDragging: X, handleMouseMove: oe, handleMouseUp: ae, handleMouseDown: Q } = Os(20, 80), he = {
3445
- "--file-manager-font-family": F,
3446
- "--file-manager-primary-color": R,
3447
- height: u,
3448
- width: g
3449
+ const k = Ls(), { containerRef: N, colSizes: K, isDragging: oe, handleMouseMove: ae, handleMouseUp: Q, handleMouseDown: he } = Os(20, 80), xe = {
3450
+ "--file-manager-font-family": D,
3451
+ "--file-manager-primary-color": F,
3452
+ height: g,
3453
+ width: _
3449
3454
  };
3450
- return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (xe) => xe.preventDefault(), style: he, children: [
3455
+ return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (v) => v.preventDefault(), style: xe, children: [
3451
3456
  /* @__PURE__ */ t.jsx(xt, { loading: n }),
3452
- /* @__PURE__ */ t.jsx(zn, { filesData: e, onError: z, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: _, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout: D, children: [
3457
+ /* @__PURE__ */ t.jsx(zn, { filesData: e, onError: A, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: x, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, onSelect: z, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout: C, children: [
3453
3458
  /* @__PURE__ */ t.jsx(
3454
3459
  Sr,
3455
3460
  {
@@ -3457,28 +3462,28 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3457
3462
  allowUploadFile: !0,
3458
3463
  onLayoutChange: w,
3459
3464
  onRefresh: S,
3460
- triggerAction: A
3465
+ triggerAction: k
3461
3466
  }
3462
3467
  ),
3463
3468
  /* @__PURE__ */ t.jsxs(
3464
3469
  "section",
3465
3470
  {
3466
3471
  ref: N,
3467
- onMouseMove: oe,
3468
- onMouseUp: ae,
3472
+ onMouseMove: ae,
3473
+ onMouseUp: Q,
3469
3474
  className: "files-container",
3470
3475
  children: [
3471
- /* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: k.col1 + "%" }, children: [
3476
+ /* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: K.col1 + "%" }, children: [
3472
3477
  /* @__PURE__ */ t.jsx(Or, {}),
3473
3478
  /* @__PURE__ */ t.jsx(
3474
3479
  "div",
3475
3480
  {
3476
- className: `sidebar-resize ${X ? "sidebar-dragging" : ""}`,
3477
- onMouseDown: Q
3481
+ className: `sidebar-resize ${oe ? "sidebar-dragging" : ""}`,
3482
+ onMouseDown: he
3478
3483
  }
3479
3484
  )
3480
3485
  ] }),
3481
- /* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width: k.col2 + "%" }, children: [
3486
+ /* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width: K.col2 + "%" }, children: [
3482
3487
  /* @__PURE__ */ t.jsx(kr, {}),
3483
3488
  /* @__PURE__ */ t.jsx(
3484
3489
  Ir,
@@ -3487,8 +3492,8 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3487
3492
  onRename: p,
3488
3493
  onFileOpen: M,
3489
3494
  onRefresh: S,
3490
- enableFilePreview: C,
3491
- triggerAction: A
3495
+ enableFilePreview: j,
3496
+ triggerAction: k
3492
3497
  }
3493
3498
  )
3494
3499
  ] })
@@ -3503,11 +3508,11 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3503
3508
  onFileUploaded: i,
3504
3509
  onDelete: h,
3505
3510
  onRefresh: S,
3506
- maxFileSize: j,
3507
- filePreviewPath: y,
3508
- filePreviewComponent: x,
3509
- acceptedFileTypes: b,
3510
- triggerAction: A
3511
+ maxFileSize: y,
3512
+ filePreviewPath: b,
3513
+ filePreviewComponent: R,
3514
+ acceptedFileTypes: u,
3515
+ triggerAction: k
3511
3516
  }
3512
3517
  )
3513
3518
  ] }) }) }) }) })
@@ -3541,6 +3546,7 @@ Hr.propTypes = {
3541
3546
  onLayoutChange: G.func,
3542
3547
  onRefresh: G.func,
3543
3548
  onFileOpen: G.func,
3549
+ onSelect: G.func,
3544
3550
  onError: G.func,
3545
3551
  layout: G.oneOf(["grid", "list"]),
3546
3552
  maxFileSize: G.number,