@wp-playground/components 3.1.50 → 3.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import r, { forwardRef as $t, useMemo as Ft, useState as ee, useRef as V, useEffect as W, useImperativeHandle as Wt, useLayoutEffect as qt, useCallback as Ue } from "react";
1
+ import r, { forwardRef as $t, useMemo as Ft, useState as te, useRef as M, useEffect as H, useImperativeHandle as Wt, useLayoutEffect as qt, useCallback as Ue } from "react";
2
2
  import { joinPaths as je, dirname as Le, normalizePath as Jt, basename as et, isParentOf as Xt, concatUint8Arrays as Qt } from "@php-wasm/util";
3
3
  import { __experimentalTreeGrid as er, Popover as tr, NavigableMenu as rr, MenuItem as it, __experimentalTreeGridRow as nr, __experimentalTreeGridCell as ar, Button as tt, Modal as or, Icon as St, Tooltip as Ht, VisuallyHidden as ir, Notice as lr } from "@wordpress/components";
4
4
  import De from "classnames";
@@ -232,15 +232,15 @@ var Bt;
232
232
  function $r() {
233
233
  if (Bt) return lt;
234
234
  Bt = 1;
235
- var n = r, c = Symbol.for("react.element"), f = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, T = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
236
- function k(D, A, h) {
237
- var _, F = {}, S = null, K = null;
238
- h !== void 0 && (S = "" + h), A.key !== void 0 && (S = "" + A.key), A.ref !== void 0 && (K = A.ref);
239
- for (_ in A) l.call(A, _) && !d.hasOwnProperty(_) && (F[_] = A[_]);
240
- if (D && D.defaultProps) for (_ in A = D.defaultProps, A) F[_] === void 0 && (F[_] = A[_]);
241
- return { $$typeof: c, type: D, key: S, ref: K, props: F, _owner: T.current };
235
+ var n = r, c = Symbol.for("react.element"), f = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, R = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
236
+ function P(A, T, v) {
237
+ var D, _ = {}, k = null, Z = null;
238
+ v !== void 0 && (k = "" + v), T.key !== void 0 && (k = "" + T.key), T.ref !== void 0 && (Z = T.ref);
239
+ for (D in T) l.call(T, D) && !d.hasOwnProperty(D) && (_[D] = T[D]);
240
+ if (A && A.defaultProps) for (D in T = A.defaultProps, T) _[D] === void 0 && (_[D] = T[D]);
241
+ return { $$typeof: c, type: A, key: k, ref: Z, props: _, _owner: R.current };
242
242
  }
243
- return lt.Fragment = f, lt.jsx = k, lt.jsxs = k, lt;
243
+ return lt.Fragment = f, lt.jsx = P, lt.jsxs = P, lt;
244
244
  }
245
245
  var st = {};
246
246
  /**
@@ -255,54 +255,54 @@ var st = {};
255
255
  var Mt;
256
256
  function Wr() {
257
257
  return Mt || (Mt = 1, process.env.NODE_ENV !== "production" && function() {
258
- var n = r, c = Symbol.for("react.element"), f = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), D = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), K = Symbol.for("react.offscreen"), B = Symbol.iterator, C = "@@iterator";
259
- function G(e) {
258
+ var n = r, c = Symbol.for("react.element"), f = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), A = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), Z = Symbol.for("react.offscreen"), j = Symbol.iterator, x = "@@iterator";
259
+ function K(e) {
260
260
  if (e === null || typeof e != "object")
261
261
  return null;
262
- var s = B && e[B] || e[C];
262
+ var s = j && e[j] || e[x];
263
263
  return typeof s == "function" ? s : null;
264
264
  }
265
- var y = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
266
- function x(e) {
265
+ var W = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
266
+ function m(e) {
267
267
  {
268
- for (var s = arguments.length, m = new Array(s > 1 ? s - 1 : 0), R = 1; R < s; R++)
269
- m[R - 1] = arguments[R];
270
- z("error", e, m);
268
+ for (var s = arguments.length, p = new Array(s > 1 ? s - 1 : 0), C = 1; C < s; C++)
269
+ p[C - 1] = arguments[C];
270
+ V("error", e, p);
271
271
  }
272
272
  }
273
- function z(e, s, m) {
273
+ function V(e, s, p) {
274
274
  {
275
- var R = y.ReactDebugCurrentFrame, U = R.getStackAddendum();
276
- U !== "" && (s += "%s", m = m.concat([U]));
277
- var Z = m.map(function(j) {
278
- return String(j);
275
+ var C = W.ReactDebugCurrentFrame, z = C.getStackAddendum();
276
+ z !== "" && (s += "%s", p = p.concat([z]));
277
+ var Y = p.map(function(B) {
278
+ return String(B);
279
279
  });
280
- Z.unshift("Warning: " + s), Function.prototype.apply.call(console[e], console, Z);
280
+ Y.unshift("Warning: " + s), Function.prototype.apply.call(console[e], console, Y);
281
281
  }
282
282
  }
283
- var J = !1, oe = !1, de = !1, g = !1, $ = !1, N;
283
+ var J = !1, ce = !1, Q = !1, g = !1, $ = !1, N;
284
284
  N = Symbol.for("react.module.reference");
285
- function p(e) {
286
- return !!(typeof e == "string" || typeof e == "function" || e === l || e === d || $ || e === T || e === h || e === _ || g || e === K || J || oe || de || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === F || e.$$typeof === k || e.$$typeof === D || e.$$typeof === A || // This needs to include all possible module reference object
285
+ function h(e) {
286
+ return !!(typeof e == "string" || typeof e == "function" || e === l || e === d || $ || e === R || e === v || e === D || g || e === Z || J || ce || Q || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === _ || e.$$typeof === P || e.$$typeof === A || e.$$typeof === T || // This needs to include all possible module reference object
287
287
  // types supported by any Flight configuration anywhere since
288
288
  // we don't know which Flight build this will end up being used
289
289
  // with.
290
290
  e.$$typeof === N || e.getModuleId !== void 0));
291
291
  }
292
- function M(e, s, m) {
293
- var R = e.displayName;
294
- if (R)
295
- return R;
296
- var U = s.displayName || s.name || "";
297
- return U !== "" ? m + "(" + U + ")" : m;
292
+ function O(e, s, p) {
293
+ var C = e.displayName;
294
+ if (C)
295
+ return C;
296
+ var z = s.displayName || s.name || "";
297
+ return z !== "" ? p + "(" + z + ")" : p;
298
298
  }
299
- function Y(e) {
299
+ function G(e) {
300
300
  return e.displayName || "Context";
301
301
  }
302
- function te(e) {
302
+ function re(e) {
303
303
  if (e == null)
304
304
  return null;
305
- if (typeof e.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
305
+ if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
306
306
  return e.displayName || e.name || null;
307
307
  if (typeof e == "string")
308
308
  return e;
@@ -313,30 +313,30 @@ function Wr() {
313
313
  return "Portal";
314
314
  case d:
315
315
  return "Profiler";
316
- case T:
316
+ case R:
317
317
  return "StrictMode";
318
- case h:
318
+ case v:
319
319
  return "Suspense";
320
- case _:
320
+ case D:
321
321
  return "SuspenseList";
322
322
  }
323
323
  if (typeof e == "object")
324
324
  switch (e.$$typeof) {
325
- case D:
326
- var s = e;
327
- return Y(s) + ".Consumer";
328
- case k:
329
- var m = e;
330
- return Y(m._context) + ".Provider";
331
325
  case A:
332
- return M(e, e.render, "ForwardRef");
333
- case F:
334
- var R = e.displayName || null;
335
- return R !== null ? R : te(e.type) || "Memo";
336
- case S: {
337
- var U = e, Z = U._payload, j = U._init;
326
+ var s = e;
327
+ return G(s) + ".Consumer";
328
+ case P:
329
+ var p = e;
330
+ return G(p._context) + ".Provider";
331
+ case T:
332
+ return O(e, e.render, "ForwardRef");
333
+ case _:
334
+ var C = e.displayName || null;
335
+ return C !== null ? C : re(e.type) || "Memo";
336
+ case k: {
337
+ var z = e, Y = z._payload, B = z._init;
338
338
  try {
339
- return te(j(Z));
339
+ return re(B(Y));
340
340
  } catch {
341
341
  return null;
342
342
  }
@@ -344,18 +344,18 @@ function Wr() {
344
344
  }
345
345
  return null;
346
346
  }
347
- var L = Object.assign, Q = 0, X, ve, me, Ne, Pe, re, Oe;
348
- function ne() {
347
+ var I = Object.assign, ee = 0, X, ve, me, Ne, Pe, ne, Oe;
348
+ function ae() {
349
349
  }
350
- ne.__reactDisabledLog = !0;
350
+ ae.__reactDisabledLog = !0;
351
351
  function Me() {
352
352
  {
353
- if (Q === 0) {
354
- X = console.log, ve = console.info, me = console.warn, Ne = console.error, Pe = console.group, re = console.groupCollapsed, Oe = console.groupEnd;
353
+ if (ee === 0) {
354
+ X = console.log, ve = console.info, me = console.warn, Ne = console.error, Pe = console.group, ne = console.groupCollapsed, Oe = console.groupEnd;
355
355
  var e = {
356
356
  configurable: !0,
357
357
  enumerable: !0,
358
- value: ne,
358
+ value: ae,
359
359
  writable: !0
360
360
  };
361
361
  Object.defineProperties(console, {
@@ -368,142 +368,142 @@ function Wr() {
368
368
  groupEnd: e
369
369
  });
370
370
  }
371
- Q++;
371
+ ee++;
372
372
  }
373
373
  }
374
374
  function _e() {
375
375
  {
376
- if (Q--, Q === 0) {
376
+ if (ee--, ee === 0) {
377
377
  var e = {
378
378
  configurable: !0,
379
379
  enumerable: !0,
380
380
  writable: !0
381
381
  };
382
382
  Object.defineProperties(console, {
383
- log: L({}, e, {
383
+ log: I({}, e, {
384
384
  value: X
385
385
  }),
386
- info: L({}, e, {
386
+ info: I({}, e, {
387
387
  value: ve
388
388
  }),
389
- warn: L({}, e, {
389
+ warn: I({}, e, {
390
390
  value: me
391
391
  }),
392
- error: L({}, e, {
392
+ error: I({}, e, {
393
393
  value: Ne
394
394
  }),
395
- group: L({}, e, {
395
+ group: I({}, e, {
396
396
  value: Pe
397
397
  }),
398
- groupCollapsed: L({}, e, {
399
- value: re
398
+ groupCollapsed: I({}, e, {
399
+ value: ne
400
400
  }),
401
- groupEnd: L({}, e, {
401
+ groupEnd: I({}, e, {
402
402
  value: Oe
403
403
  })
404
404
  });
405
405
  }
406
- Q < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
406
+ ee < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
407
407
  }
408
408
  }
409
- var ke = y.ReactCurrentDispatcher, Fe;
410
- function Se(e, s, m) {
409
+ var ke = W.ReactCurrentDispatcher, Fe;
410
+ function Se(e, s, p) {
411
411
  {
412
412
  if (Fe === void 0)
413
413
  try {
414
414
  throw Error();
415
- } catch (U) {
416
- var R = U.stack.trim().match(/\n( *(at )?)/);
417
- Fe = R && R[1] || "";
415
+ } catch (z) {
416
+ var C = z.stack.trim().match(/\n( *(at )?)/);
417
+ Fe = C && C[1] || "";
418
418
  }
419
419
  return `
420
420
  ` + Fe + e;
421
421
  }
422
422
  }
423
- var fe = !1, H;
423
+ var de = !1, U;
424
424
  {
425
- var w = typeof WeakMap == "function" ? WeakMap : Map;
426
- H = new w();
425
+ var E = typeof WeakMap == "function" ? WeakMap : Map;
426
+ U = new E();
427
427
  }
428
428
  function he(e, s) {
429
- if (!e || fe)
429
+ if (!e || de)
430
430
  return "";
431
431
  {
432
- var m = H.get(e);
433
- if (m !== void 0)
434
- return m;
432
+ var p = U.get(e);
433
+ if (p !== void 0)
434
+ return p;
435
435
  }
436
- var R;
437
- fe = !0;
438
- var U = Error.prepareStackTrace;
436
+ var C;
437
+ de = !0;
438
+ var z = Error.prepareStackTrace;
439
439
  Error.prepareStackTrace = void 0;
440
- var Z;
441
- Z = ke.current, ke.current = null, Me();
440
+ var Y;
441
+ Y = ke.current, ke.current = null, Me();
442
442
  try {
443
443
  if (s) {
444
- var j = function() {
444
+ var B = function() {
445
445
  throw Error();
446
446
  };
447
- if (Object.defineProperty(j.prototype, "props", {
447
+ if (Object.defineProperty(B.prototype, "props", {
448
448
  set: function() {
449
449
  throw Error();
450
450
  }
451
451
  }), typeof Reflect == "object" && Reflect.construct) {
452
452
  try {
453
- Reflect.construct(j, []);
453
+ Reflect.construct(B, []);
454
454
  } catch (Ce) {
455
- R = Ce;
455
+ C = Ce;
456
456
  }
457
- Reflect.construct(e, [], j);
457
+ Reflect.construct(e, [], B);
458
458
  } else {
459
459
  try {
460
- j.call();
460
+ B.call();
461
461
  } catch (Ce) {
462
- R = Ce;
462
+ C = Ce;
463
463
  }
464
- e.call(j.prototype);
464
+ e.call(B.prototype);
465
465
  }
466
466
  } else {
467
467
  try {
468
468
  throw Error();
469
469
  } catch (Ce) {
470
- R = Ce;
470
+ C = Ce;
471
471
  }
472
472
  e();
473
473
  }
474
474
  } catch (Ce) {
475
- if (Ce && R && typeof Ce.stack == "string") {
476
- for (var I = Ce.stack.split(`
477
- `), Ee = R.stack.split(`
478
- `), se = I.length - 1, ue = Ee.length - 1; se >= 1 && ue >= 0 && I[se] !== Ee[ue]; )
479
- ue--;
480
- for (; se >= 1 && ue >= 0; se--, ue--)
481
- if (I[se] !== Ee[ue]) {
482
- if (se !== 1 || ue !== 1)
475
+ if (Ce && C && typeof Ce.stack == "string") {
476
+ for (var F = Ce.stack.split(`
477
+ `), Ee = C.stack.split(`
478
+ `), se = F.length - 1, fe = Ee.length - 1; se >= 1 && fe >= 0 && F[se] !== Ee[fe]; )
479
+ fe--;
480
+ for (; se >= 1 && fe >= 0; se--, fe--)
481
+ if (F[se] !== Ee[fe]) {
482
+ if (se !== 1 || fe !== 1)
483
483
  do
484
- if (se--, ue--, ue < 0 || I[se] !== Ee[ue]) {
484
+ if (se--, fe--, fe < 0 || F[se] !== Ee[fe]) {
485
485
  var Te = `
486
- ` + I[se].replace(" at new ", " at ");
487
- return e.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", e.displayName)), typeof e == "function" && H.set(e, Te), Te;
486
+ ` + F[se].replace(" at new ", " at ");
487
+ return e.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, Te), Te;
488
488
  }
489
- while (se >= 1 && ue >= 0);
489
+ while (se >= 1 && fe >= 0);
490
490
  break;
491
491
  }
492
492
  }
493
493
  } finally {
494
- fe = !1, ke.current = Z, _e(), Error.prepareStackTrace = U;
494
+ de = !1, ke.current = Y, _e(), Error.prepareStackTrace = z;
495
495
  }
496
496
  var Je = e ? e.displayName || e.name : "", He = Je ? Se(Je) : "";
497
- return typeof e == "function" && H.set(e, He), He;
497
+ return typeof e == "function" && U.set(e, He), He;
498
498
  }
499
- function pe(e, s, m) {
499
+ function pe(e, s, p) {
500
500
  return he(e, !1);
501
501
  }
502
502
  function we(e) {
503
503
  var s = e.prototype;
504
504
  return !!(s && s.isReactComponent);
505
505
  }
506
- function b(e, s, m) {
506
+ function b(e, s, p) {
507
507
  if (e == null)
508
508
  return "";
509
509
  if (typeof e == "function")
@@ -511,51 +511,51 @@ function Wr() {
511
511
  if (typeof e == "string")
512
512
  return Se(e);
513
513
  switch (e) {
514
- case h:
514
+ case v:
515
515
  return Se("Suspense");
516
- case _:
516
+ case D:
517
517
  return Se("SuspenseList");
518
518
  }
519
519
  if (typeof e == "object")
520
520
  switch (e.$$typeof) {
521
- case A:
521
+ case T:
522
522
  return pe(e.render);
523
- case F:
524
- return b(e.type, s, m);
525
- case S: {
526
- var R = e, U = R._payload, Z = R._init;
523
+ case _:
524
+ return b(e.type, s, p);
525
+ case k: {
526
+ var C = e, z = C._payload, Y = C._init;
527
527
  try {
528
- return b(Z(U), s, m);
528
+ return b(Y(z), s, p);
529
529
  } catch {
530
530
  }
531
531
  }
532
532
  }
533
533
  return "";
534
534
  }
535
- var P = Object.prototype.hasOwnProperty, ie = {}, le = y.ReactDebugCurrentFrame;
536
- function ce(e) {
535
+ var S = Object.prototype.hasOwnProperty, ie = {}, le = W.ReactDebugCurrentFrame;
536
+ function ue(e) {
537
537
  if (e) {
538
- var s = e._owner, m = b(e.type, e._source, s ? s.type : null);
539
- le.setExtraStackFrame(m);
538
+ var s = e._owner, p = b(e.type, e._source, s ? s.type : null);
539
+ le.setExtraStackFrame(p);
540
540
  } else
541
541
  le.setExtraStackFrame(null);
542
542
  }
543
- function be(e, s, m, R, U) {
543
+ function be(e, s, p, C, z) {
544
544
  {
545
- var Z = Function.call.bind(P);
546
- for (var j in e)
547
- if (Z(e, j)) {
548
- var I = void 0;
545
+ var Y = Function.call.bind(S);
546
+ for (var B in e)
547
+ if (Y(e, B)) {
548
+ var F = void 0;
549
549
  try {
550
- if (typeof e[j] != "function") {
551
- var Ee = Error((R || "React class") + ": " + m + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
550
+ if (typeof e[B] != "function") {
551
+ var Ee = Error((C || "React class") + ": " + p + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
552
552
  throw Ee.name = "Invariant Violation", Ee;
553
553
  }
554
- I = e[j](s, j, R, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
554
+ F = e[B](s, B, C, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
555
555
  } catch (se) {
556
- I = se;
556
+ F = se;
557
557
  }
558
- I && !(I instanceof Error) && (ce(U), x("%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).", R || "React class", m, j, typeof I), ce(null)), I instanceof Error && !(I.message in ie) && (ie[I.message] = !0, ce(U), x("Failed %s type: %s", m, I.message), ce(null));
558
+ F && !(F instanceof Error) && (ue(z), m("%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).", C || "React class", p, B, typeof F), ue(null)), F instanceof Error && !(F.message in ie) && (ie[F.message] = !0, ue(z), m("Failed %s type: %s", p, F.message), ue(null));
559
559
  }
560
560
  }
561
561
  }
@@ -565,8 +565,8 @@ function Wr() {
565
565
  }
566
566
  function Ie(e) {
567
567
  {
568
- var s = typeof Symbol == "function" && Symbol.toStringTag, m = s && e[Symbol.toStringTag] || e.constructor.name || "Object";
569
- return m;
568
+ var s = typeof Symbol == "function" && Symbol.toStringTag, p = s && e[Symbol.toStringTag] || e.constructor.name || "Object";
569
+ return p;
570
570
  }
571
571
  }
572
572
  function at(e) {
@@ -581,16 +581,16 @@ function Wr() {
581
581
  }
582
582
  function ft(e) {
583
583
  if (at(e))
584
- return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(e)), Ge(e);
584
+ return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(e)), Ge(e);
585
585
  }
586
- var dt = y.ReactCurrentOwner, Et = {
586
+ var dt = W.ReactCurrentOwner, Et = {
587
587
  key: !0,
588
588
  ref: !0,
589
589
  __self: !0,
590
590
  __source: !0
591
591
  }, mt, We;
592
592
  function Ye(e) {
593
- if (P.call(e, "ref")) {
593
+ if (S.call(e, "ref")) {
594
594
  var s = Object.getOwnPropertyDescriptor(e, "ref").get;
595
595
  if (s && s.isReactWarning)
596
596
  return !1;
@@ -598,7 +598,7 @@ function Wr() {
598
598
  return e.ref !== void 0;
599
599
  }
600
600
  function yt(e) {
601
- if (P.call(e, "key")) {
601
+ if (S.call(e, "key")) {
602
602
  var s = Object.getOwnPropertyDescriptor(e, "key").get;
603
603
  if (s && s.isReactWarning)
604
604
  return !1;
@@ -610,78 +610,78 @@ function Wr() {
610
610
  }
611
611
  function bt(e, s) {
612
612
  {
613
- var m = function() {
614
- mt || (mt = !0, x("%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)", s));
613
+ var p = function() {
614
+ mt || (mt = !0, m("%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)", s));
615
615
  };
616
- m.isReactWarning = !0, Object.defineProperty(e, "key", {
617
- get: m,
616
+ p.isReactWarning = !0, Object.defineProperty(e, "key", {
617
+ get: p,
618
618
  configurable: !0
619
619
  });
620
620
  }
621
621
  }
622
622
  function xt(e, s) {
623
623
  {
624
- var m = function() {
625
- We || (We = !0, x("%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)", s));
624
+ var p = function() {
625
+ We || (We = !0, m("%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)", s));
626
626
  };
627
- m.isReactWarning = !0, Object.defineProperty(e, "ref", {
628
- get: m,
627
+ p.isReactWarning = !0, Object.defineProperty(e, "ref", {
628
+ get: p,
629
629
  configurable: !0
630
630
  });
631
631
  }
632
632
  }
633
- var Ct = function(e, s, m, R, U, Z, j) {
634
- var I = {
633
+ var Ct = function(e, s, p, C, z, Y, B) {
634
+ var F = {
635
635
  // This tag allows us to uniquely identify this as a React Element
636
636
  $$typeof: c,
637
637
  // Built-in properties that belong on the element
638
638
  type: e,
639
639
  key: s,
640
- ref: m,
641
- props: j,
640
+ ref: p,
641
+ props: B,
642
642
  // Record the component responsible for creating this element.
643
- _owner: Z
643
+ _owner: Y
644
644
  };
645
- return I._store = {}, Object.defineProperty(I._store, "validated", {
645
+ return F._store = {}, Object.defineProperty(F._store, "validated", {
646
646
  configurable: !1,
647
647
  enumerable: !1,
648
648
  writable: !0,
649
649
  value: !1
650
- }), Object.defineProperty(I, "_self", {
650
+ }), Object.defineProperty(F, "_self", {
651
651
  configurable: !1,
652
652
  enumerable: !1,
653
653
  writable: !1,
654
- value: R
655
- }), Object.defineProperty(I, "_source", {
654
+ value: C
655
+ }), Object.defineProperty(F, "_source", {
656
656
  configurable: !1,
657
657
  enumerable: !1,
658
658
  writable: !1,
659
- value: U
660
- }), Object.freeze && (Object.freeze(I.props), Object.freeze(I)), I;
659
+ value: z
660
+ }), Object.freeze && (Object.freeze(F.props), Object.freeze(F)), F;
661
661
  };
662
- function pt(e, s, m, R, U) {
662
+ function pt(e, s, p, C, z) {
663
663
  {
664
- var Z, j = {}, I = null, Ee = null;
665
- m !== void 0 && (ft(m), I = "" + m), yt(s) && (ft(s.key), I = "" + s.key), Ye(s) && (Ee = s.ref, _t(s, U));
666
- for (Z in s)
667
- P.call(s, Z) && !Et.hasOwnProperty(Z) && (j[Z] = s[Z]);
664
+ var Y, B = {}, F = null, Ee = null;
665
+ p !== void 0 && (ft(p), F = "" + p), yt(s) && (ft(s.key), F = "" + s.key), Ye(s) && (Ee = s.ref, _t(s, z));
666
+ for (Y in s)
667
+ S.call(s, Y) && !Et.hasOwnProperty(Y) && (B[Y] = s[Y]);
668
668
  if (e && e.defaultProps) {
669
669
  var se = e.defaultProps;
670
- for (Z in se)
671
- j[Z] === void 0 && (j[Z] = se[Z]);
670
+ for (Y in se)
671
+ B[Y] === void 0 && (B[Y] = se[Y]);
672
672
  }
673
- if (I || Ee) {
674
- var ue = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
675
- I && bt(j, ue), Ee && xt(j, ue);
673
+ if (F || Ee) {
674
+ var fe = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
675
+ F && bt(B, fe), Ee && xt(B, fe);
676
676
  }
677
- return Ct(e, I, Ee, U, R, dt.current, j);
677
+ return Ct(e, F, Ee, z, C, dt.current, B);
678
678
  }
679
679
  }
680
- var Ze = y.ReactCurrentOwner, ot = y.ReactDebugCurrentFrame;
680
+ var Ze = W.ReactCurrentOwner, ot = W.ReactDebugCurrentFrame;
681
681
  function Ve(e) {
682
682
  if (e) {
683
- var s = e._owner, m = b(e.type, e._source, s ? s.type : null);
684
- ot.setExtraStackFrame(m);
683
+ var s = e._owner, p = b(e.type, e._source, s ? s.type : null);
684
+ ot.setExtraStackFrame(p);
685
685
  } else
686
686
  ot.setExtraStackFrame(null);
687
687
  }
@@ -693,7 +693,7 @@ function Wr() {
693
693
  function ht() {
694
694
  {
695
695
  if (Ze.current) {
696
- var e = te(Ze.current.type);
696
+ var e = re(Ze.current.type);
697
697
  if (e)
698
698
  return `
699
699
 
@@ -710,10 +710,10 @@ Check the render method of \`` + e + "`.";
710
710
  {
711
711
  var s = ht();
712
712
  if (!s) {
713
- var m = typeof e == "string" ? e : e.displayName || e.name;
714
- m && (s = `
713
+ var p = typeof e == "string" ? e : e.displayName || e.name;
714
+ p && (s = `
715
715
 
716
- Check the top-level render call using <` + m + ">.");
716
+ Check the top-level render call using <` + p + ">.");
717
717
  }
718
718
  return s;
719
719
  }
@@ -723,12 +723,12 @@ Check the top-level render call using <` + m + ">.");
723
723
  if (!e._store || e._store.validated || e.key != null)
724
724
  return;
725
725
  e._store.validated = !0;
726
- var m = kt(s);
727
- if (vt[m])
726
+ var p = kt(s);
727
+ if (vt[p])
728
728
  return;
729
- vt[m] = !0;
730
- var R = "";
731
- e && e._owner && e._owner !== Ze.current && (R = " It was passed a child from " + te(e._owner.type) + "."), Ve(e), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, R), Ve(null);
729
+ vt[p] = !0;
730
+ var C = "";
731
+ e && e._owner && e._owner !== Ze.current && (C = " It was passed a child from " + re(e._owner.type) + "."), Ve(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, C), Ve(null);
732
732
  }
733
733
  }
734
734
  function t(e, s) {
@@ -736,17 +736,17 @@ Check the top-level render call using <` + m + ">.");
736
736
  if (typeof e != "object")
737
737
  return;
738
738
  if (ge(e))
739
- for (var m = 0; m < e.length; m++) {
740
- var R = e[m];
741
- qe(R) && wt(R, s);
739
+ for (var p = 0; p < e.length; p++) {
740
+ var C = e[p];
741
+ qe(C) && wt(C, s);
742
742
  }
743
743
  else if (qe(e))
744
744
  e._store && (e._store.validated = !0);
745
745
  else if (e) {
746
- var U = G(e);
747
- if (typeof U == "function" && U !== e.entries)
748
- for (var Z = U.call(e), j; !(j = Z.next()).done; )
749
- qe(j.value) && wt(j.value, s);
746
+ var z = K(e);
747
+ if (typeof z == "function" && z !== e.entries)
748
+ for (var Y = z.call(e), B; !(B = Y.next()).done; )
749
+ qe(B.value) && wt(B.value, s);
750
750
  }
751
751
  }
752
752
  }
@@ -755,73 +755,73 @@ Check the top-level render call using <` + m + ">.");
755
755
  var s = e.type;
756
756
  if (s == null || typeof s == "string")
757
757
  return;
758
- var m;
758
+ var p;
759
759
  if (typeof s == "function")
760
- m = s.propTypes;
761
- else if (typeof s == "object" && (s.$$typeof === A || // Note: Memo only checks outer props here.
760
+ p = s.propTypes;
761
+ else if (typeof s == "object" && (s.$$typeof === T || // Note: Memo only checks outer props here.
762
762
  // Inner props are checked in the reconciler.
763
- s.$$typeof === F))
764
- m = s.propTypes;
763
+ s.$$typeof === _))
764
+ p = s.propTypes;
765
765
  else
766
766
  return;
767
- if (m) {
768
- var R = te(s);
769
- be(m, e.props, "prop", R, e);
767
+ if (p) {
768
+ var C = re(s);
769
+ be(p, e.props, "prop", C, e);
770
770
  } else if (s.PropTypes !== void 0 && !Ke) {
771
771
  Ke = !0;
772
- var U = te(s);
773
- x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", U || "Unknown");
772
+ var z = re(s);
773
+ m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", z || "Unknown");
774
774
  }
775
- typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
775
+ typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
776
776
  }
777
777
  }
778
778
  function o(e) {
779
779
  {
780
- for (var s = Object.keys(e.props), m = 0; m < s.length; m++) {
781
- var R = s[m];
782
- if (R !== "children" && R !== "key") {
783
- Ve(e), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", R), Ve(null);
780
+ for (var s = Object.keys(e.props), p = 0; p < s.length; p++) {
781
+ var C = s[p];
782
+ if (C !== "children" && C !== "key") {
783
+ Ve(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Ve(null);
784
784
  break;
785
785
  }
786
786
  }
787
- e.ref !== null && (Ve(e), x("Invalid attribute `ref` supplied to `React.Fragment`."), Ve(null));
787
+ e.ref !== null && (Ve(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), Ve(null));
788
788
  }
789
789
  }
790
790
  var i = {};
791
- function u(e, s, m, R, U, Z) {
791
+ function u(e, s, p, C, z, Y) {
792
792
  {
793
- var j = p(e);
794
- if (!j) {
795
- var I = "";
796
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (I += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
793
+ var B = h(e);
794
+ if (!B) {
795
+ var F = "";
796
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (F += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
797
797
  var Ee = Rt();
798
- Ee ? I += Ee : I += ht();
798
+ Ee ? F += Ee : F += ht();
799
799
  var se;
800
- e === null ? se = "null" : ge(e) ? se = "array" : e !== void 0 && e.$$typeof === c ? (se = "<" + (te(e.type) || "Unknown") + " />", I = " Did you accidentally export a JSX literal instead of a component?") : se = typeof e, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", se, I);
800
+ e === null ? se = "null" : ge(e) ? se = "array" : e !== void 0 && e.$$typeof === c ? (se = "<" + (re(e.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : se = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", se, F);
801
801
  }
802
- var ue = pt(e, s, m, U, Z);
803
- if (ue == null)
804
- return ue;
805
- if (j) {
802
+ var fe = pt(e, s, p, z, Y);
803
+ if (fe == null)
804
+ return fe;
805
+ if (B) {
806
806
  var Te = s.children;
807
807
  if (Te !== void 0)
808
- if (R)
808
+ if (C)
809
809
  if (ge(Te)) {
810
810
  for (var Je = 0; Je < Te.length; Je++)
811
811
  t(Te[Je], e);
812
812
  Object.freeze && Object.freeze(Te);
813
813
  } else
814
- x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
814
+ m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
815
815
  else
816
816
  t(Te, e);
817
817
  }
818
- if (P.call(s, "key")) {
819
- var He = te(e), Ce = Object.keys(s).filter(function(Kt) {
818
+ if (S.call(s, "key")) {
819
+ var He = re(e), Ce = Object.keys(s).filter(function(Kt) {
820
820
  return Kt !== "key";
821
821
  }), Pt = Ce.length > 0 ? "{key: someKey, " + Ce.join(": ..., ") + ": ...}" : "{key: someKey}";
822
822
  if (!i[He + Pt]) {
823
823
  var Zt = Ce.length > 0 ? "{" + Ce.join(": ..., ") + ": ...}" : "{}";
824
- x(`A props object containing a "key" prop is being spread into JSX:
824
+ m(`A props object containing a "key" prop is being spread into JSX:
825
825
  let props = %s;
826
826
  <%s {...props} />
827
827
  React keys must be passed directly to JSX without using spread:
@@ -829,17 +829,17 @@ React keys must be passed directly to JSX without using spread:
829
829
  <%s key={someKey} {...props} />`, Pt, He, Zt, He), i[He + Pt] = !0;
830
830
  }
831
831
  }
832
- return e === l ? o(ue) : a(ue), ue;
832
+ return e === l ? o(fe) : a(fe), fe;
833
833
  }
834
834
  }
835
- function v(e, s, m) {
836
- return u(e, s, m, !0);
835
+ function w(e, s, p) {
836
+ return u(e, s, p, !0);
837
837
  }
838
- function E(e, s, m) {
839
- return u(e, s, m, !1);
838
+ function y(e, s, p) {
839
+ return u(e, s, p, !1);
840
840
  }
841
- var ae = E, xe = v;
842
- st.Fragment = l, st.jsx = ae, st.jsxs = xe;
841
+ var oe = y, xe = w;
842
+ st.Fragment = l, st.jsx = oe, st.jsxs = xe;
843
843
  }()), st;
844
844
  }
845
845
  process.env.NODE_ENV === "production" ? It.exports = $r() : It.exports = Wr();
@@ -852,13 +852,13 @@ var Ae = It.exports, rt = (n) => cr("path", n), nt = Ut(
852
852
  * @return {React.JSX.Element} Stop component
853
853
  */
854
854
  ({ className: n, isPressed: c, ...f }, l) => {
855
- const T = {
855
+ const R = {
856
856
  ...f,
857
857
  className: ur(n, { "is-pressed": c }) || void 0,
858
858
  "aria-hidden": !0,
859
859
  focusable: !1
860
860
  };
861
- return /* @__PURE__ */ Ae.jsx("svg", { ...T, ref: l });
861
+ return /* @__PURE__ */ Ae.jsx("svg", { ...R, ref: l });
862
862
  }
863
863
  );
864
864
  nt.displayName = "SVG";
@@ -909,12 +909,12 @@ const Hr = /* @__PURE__ */ Ae.jsx(nt, {
909
909
  };
910
910
  function Dt(n) {
911
911
  if (!n) return [];
912
- const c = Jt(n), f = c.startsWith("/"), l = c.split("/").filter(Boolean), T = [];
912
+ const c = Jt(n), f = c.startsWith("/"), l = c.split("/").filter(Boolean), R = [];
913
913
  let d = f ? "/" : "";
914
- f && T.push("/");
915
- for (const k of l)
916
- !d || d === "/" ? d = d === "/" ? `/${k}` : k : d = `${d}/${k}`, T.push(d);
917
- return T;
914
+ f && R.push("/");
915
+ for (const P of l)
916
+ !d || d === "/" ? d = d === "/" ? `/${P}` : P : d = `${d}/${P}`, R.push(d);
917
+ return R;
918
918
  }
919
919
  function ze(n, c, f) {
920
920
  return n && (n === c ? f : n.startsWith(c === "/" ? "/" : `${c}/`) ? f + n.slice(c.length) : n);
@@ -923,106 +923,106 @@ const nn = $t(function({
923
923
  withContextMenu: c = !0,
924
924
  readOnly: f = !1,
925
925
  filesystem: l,
926
- root: T = "/wordpress",
926
+ root: R = "/wordpress",
927
927
  initialSelectedPath: d,
928
- onSelect: k = () => {
928
+ onSelect: P = () => {
929
929
  },
930
- onDoubleClickFile: D
931
- }, A) {
932
- const h = Ft(() => je("/", T || "/"), [T]), [_, F] = ee(() => {
930
+ onDoubleClickFile: A
931
+ }, T) {
932
+ const v = Ft(() => je("/", R || "/"), [R]), [D, _] = te(() => {
933
933
  if (!d)
934
934
  return {};
935
935
  const t = {};
936
936
  for (const a of Dt(d))
937
937
  t[a] = !0;
938
938
  return t;
939
- }), [S, K] = ee(
939
+ }), [k, Z] = te(
940
940
  () => d ?? null
941
- ), [B, C] = ee(
941
+ ), [j, x] = te(
942
942
  () => d ?? null
943
- ), [G, y] = ee({}), [x, z] = ee(
943
+ ), [K, W] = te({}), [m, V] = te(
944
944
  {}
945
- ), [J, oe] = ee(null), [de, g] = ee(
945
+ ), [J, ce] = te(null), [Q, g] = te(
946
946
  null
947
- ), $ = V({}), N = V(!1), p = V(null), M = V(null), Y = V(x), te = V(G), L = () => {
947
+ ), $ = M({}), N = M(!1), h = M(null), O = M(null), G = M(m), re = M(K), I = () => {
948
948
  for (const t of Object.keys($.current))
949
949
  clearTimeout($.current[t]), delete $.current[t];
950
- }, Q = (t) => {
950
+ }, ee = (t) => {
951
951
  const a = $.current[t];
952
952
  a && (clearTimeout(a), delete $.current[t]);
953
953
  };
954
- W(() => {
955
- Y.current = x;
956
- }, [x]), W(() => {
957
- te.current = G;
958
- }, [G]);
954
+ H(() => {
955
+ G.current = m;
956
+ }, [m]), H(() => {
957
+ re.current = K;
958
+ }, [K]);
959
959
  const X = (t) => {
960
960
  var o;
961
- const a = (o = p.current) == null ? void 0 : o.querySelector(
961
+ const a = (o = h.current) == null ? void 0 : o.querySelector(
962
962
  `[data-path="${CSS.escape(t)}"]`
963
963
  );
964
964
  a && typeof a.focus == "function" && (a.focus(), a.scrollIntoView({
965
965
  behavior: "smooth",
966
966
  block: "nearest"
967
967
  }));
968
- }, ve = (t, a = "") => a ? je(a, t.name) : je("/", t.name), me = (t, a) => t.children ? t.children : G[a], Ne = async (t, a) => {
968
+ }, ve = (t, a = "") => a ? je(a, t.name) : je("/", t.name), me = (t, a) => t.children ? t.children : K[a], Ne = async (t, a) => {
969
969
  const o = await t.listFiles(a), i = [];
970
970
  for (const u of o) {
971
- const v = a === "/" ? `/${u}` : `${a}/${u}`, E = await t.isDir(v);
972
- i.push({ name: u, type: E ? "folder" : "file" });
971
+ const w = a === "/" ? `/${u}` : `${a}/${u}`, y = await t.isDir(w);
972
+ i.push({ name: u, type: y ? "folder" : "file" });
973
973
  }
974
- return i.sort((u, v) => {
974
+ return i.sort((u, w) => {
975
975
  var e;
976
- if (u.type !== v.type) return u.type === "folder" ? -1 : 1;
977
- const E = a === "/" ? `/${u.name}` : `${a}/${u.name}`, ae = a === "/" ? `/${v.name}` : `${a}/${v.name}`, xe = (e = we.current) == null ? void 0 : e.tempPath;
976
+ if (u.type !== w.type) return u.type === "folder" ? -1 : 1;
977
+ const y = a === "/" ? `/${u.name}` : `${a}/${u.name}`, oe = a === "/" ? `/${w.name}` : `${a}/${w.name}`, xe = (e = we.current) == null ? void 0 : e.tempPath;
978
978
  if (xe) {
979
- if (E === xe) return -1;
980
- if (ae === xe) return 1;
979
+ if (y === xe) return -1;
980
+ if (oe === xe) return 1;
981
981
  }
982
- return u.name.localeCompare(v.name);
982
+ return u.name.localeCompare(w.name);
983
983
  }), i;
984
- }, Pe = async (t) => await Ne(l, t), re = (t, a) => {
984
+ }, Pe = async (t) => await Ne(l, t), ne = (t, a) => {
985
985
  if (a.type !== "folder")
986
986
  return a.children;
987
- const o = a.children ?? te.current[t];
988
- return o || Y.current[t] ? o : (z((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
987
+ const o = a.children ?? re.current[t];
988
+ return o || G.current[t] ? o : (V((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
989
989
  Pe(t).then((u) => {
990
- y((v) => ({
991
- ...v,
990
+ W((w) => ({
991
+ ...w,
992
992
  [t]: u ?? []
993
993
  })), i(u ?? []);
994
994
  }).catch(() => {
995
995
  i([]);
996
996
  }).finally(() => {
997
- z((u) => {
998
- const v = { ...u };
999
- return delete v[t], v;
997
+ V((u) => {
998
+ const w = { ...u };
999
+ return delete w[t], w;
1000
1000
  });
1001
1001
  });
1002
1002
  }));
1003
1003
  }, Oe = (t, a) => {
1004
1004
  a.type === "folder" && (typeof window > "u" || $.current[t] || ($.current[t] = window.setTimeout(() => {
1005
- F((o) => o[t] ? o : { ...o, [t]: !0 }), re(t, a), delete $.current[t];
1005
+ _((o) => o[t] ? o : { ...o, [t]: !0 }), ne(t, a), delete $.current[t];
1006
1006
  }, 600)));
1007
- }, ne = (t) => (z((a) => ({ ...a, [t]: !0 })), new Promise((a) => {
1007
+ }, ae = (t) => (V((a) => ({ ...a, [t]: !0 })), new Promise((a) => {
1008
1008
  Pe(t).then((o) => {
1009
- y((i) => ({
1009
+ W((i) => ({
1010
1010
  ...i,
1011
1011
  [t]: o ?? []
1012
1012
  })), a(o ?? []);
1013
1013
  }).catch(() => {
1014
1014
  a([]);
1015
1015
  }).finally(() => {
1016
- z((o) => {
1016
+ V((o) => {
1017
1017
  const i = { ...o };
1018
1018
  return delete i[t], i;
1019
1019
  });
1020
1020
  });
1021
1021
  })), Me = (t, a, o) => {
1022
- F((i) => ({
1022
+ _((i) => ({
1023
1023
  ...i,
1024
1024
  [t]: o
1025
- })), o ? re(t, a) : y((i) => {
1025
+ })), o ? ne(t, a) : W((i) => {
1026
1026
  if (i[t] === void 0)
1027
1027
  return i;
1028
1028
  const u = { ...i };
@@ -1032,48 +1032,48 @@ const nn = $t(function({
1032
1032
  if (!t) return;
1033
1033
  const a = Dt(t);
1034
1034
  if (a.length === 0) return;
1035
- F((u) => {
1036
- const v = { ...u };
1037
- for (const E of a)
1038
- v[E] = !0;
1039
- return v;
1035
+ _((u) => {
1036
+ const w = { ...u };
1037
+ for (const y of a)
1038
+ w[y] = !0;
1039
+ return w;
1040
1040
  });
1041
1041
  let o = [
1042
- { name: h, type: "folder" }
1042
+ { name: v, type: "folder" }
1043
1043
  ], i = "";
1044
1044
  for (const u of a) {
1045
- const v = o == null ? void 0 : o.find((ae) => ve(ae, i) === u);
1046
- if (!v || v.type !== "folder") {
1045
+ const w = o == null ? void 0 : o.find((oe) => ve(oe, i) === u);
1046
+ if (!w || w.type !== "folder") {
1047
1047
  i = u, o = [];
1048
1048
  continue;
1049
1049
  }
1050
- o = await re(u, v) ?? te.current[u], i = u;
1050
+ o = await ne(u, w) ?? re.current[u], i = u;
1051
1051
  }
1052
1052
  }, ke = (t, a) => {
1053
- !t || !a || t === a || (F((o) => {
1053
+ !t || !a || t === a || (_((o) => {
1054
1054
  let i = !1;
1055
1055
  const u = { ...o };
1056
- for (const v of Object.keys(o)) {
1057
- const E = ze(v, t, a);
1058
- E && E !== v && (u[E] = o[v], delete u[v], i = !0);
1056
+ for (const w of Object.keys(o)) {
1057
+ const y = ze(w, t, a);
1058
+ y && y !== w && (u[y] = o[w], delete u[w], i = !0);
1059
1059
  }
1060
1060
  return i ? u : o;
1061
- }), y((o) => {
1061
+ }), W((o) => {
1062
1062
  let i = !1;
1063
1063
  const u = { ...o };
1064
- for (const v of Object.keys(o)) {
1065
- const E = ze(v, t, a);
1066
- E && E !== v && (u[E] = o[v], delete u[v], i = !0);
1064
+ for (const w of Object.keys(o)) {
1065
+ const y = ze(w, t, a);
1066
+ y && y !== w && (u[y] = o[w], delete u[w], i = !0);
1067
1067
  }
1068
1068
  return i ? u : o;
1069
- }), K((o) => ze(o, t, a)), C((o) => ze(o, t, a)));
1069
+ }), Z((o) => ze(o, t, a)), x((o) => ze(o, t, a)));
1070
1070
  }, Fe = () => {
1071
- oe(null), g(null), L();
1071
+ ce(null), g(null), I();
1072
1072
  }, Se = (t, a = !0) => {
1073
- K(t), a && k(t);
1074
- }, fe = Ft(() => [{ name: h, type: "folder" }], [h]), [H, w] = ee(null), [he, pe] = ee(null), we = V(null), b = f ? null : he;
1073
+ Z(t), a && P(t);
1074
+ }, de = Ft(() => [{ name: v, type: "folder" }], [v]), [U, E] = te(null), [he, pe] = te(null), we = M(null), b = f ? null : he;
1075
1075
  Wt(
1076
- A,
1076
+ T,
1077
1077
  () => ({
1078
1078
  focusPath: (t, a = {}) => {
1079
1079
  if (!t) return;
@@ -1082,14 +1082,14 @@ const nn = $t(function({
1082
1082
  domFocus: i = !0,
1083
1083
  notify: u = !1
1084
1084
  } = a;
1085
- o && Se(t, u), C(t), i && X(t);
1085
+ o && Se(t, u), x(t), i && X(t);
1086
1086
  },
1087
1087
  selectPath: (t) => {
1088
- t && (Se(t), C(t), X(t));
1088
+ t && (Se(t), x(t), X(t));
1089
1089
  },
1090
- getSelectedPath: () => S,
1090
+ getSelectedPath: () => k,
1091
1091
  expandToPath: async (t) => await _e(t),
1092
- refresh: async (t) => await ne(t),
1092
+ refresh: async (t) => await ae(t),
1093
1093
  remapPath: ke,
1094
1094
  createFile: async (t) => {
1095
1095
  f || await Ye(t, "file", "untitled.php");
@@ -1104,61 +1104,61 @@ const nn = $t(function({
1104
1104
  f || await Ke(t, a);
1105
1105
  }
1106
1106
  }),
1107
- [S, ne, ke, _e, f]
1107
+ [k, ae, ke, _e, f]
1108
1108
  );
1109
- const P = V(!1), ie = V(
1109
+ const S = M(!1), ie = M(
1110
1110
  d ?? null
1111
- ), le = V(d);
1112
- W(() => {
1111
+ ), le = M(d);
1112
+ H(() => {
1113
1113
  N.current = !1;
1114
- }, [h]), W(() => {
1114
+ }, [v]), H(() => {
1115
1115
  d && d !== le.current ? ie.current = d : d || (ie.current = null), le.current = d;
1116
- }, [d]), W(() => {
1117
- if (!d || P.current)
1116
+ }, [d]), H(() => {
1117
+ if (!d || S.current)
1118
1118
  return;
1119
- P.current = !0;
1119
+ S.current = !0;
1120
1120
  const t = Dt(d);
1121
- F((o) => {
1121
+ _((o) => {
1122
1122
  const i = { ...o };
1123
1123
  for (const u of t)
1124
1124
  i[u] = !0;
1125
1125
  return i;
1126
1126
  });
1127
1127
  const a = t[t.length - 1] || d;
1128
- C(a), K(a), _e(d);
1129
- }, [d, _e]), W(() => {
1128
+ x(a), Z(a), _e(d);
1129
+ }, [d, _e]), H(() => {
1130
1130
  const t = ie.current;
1131
- !t || fe.length === 0 || (ie.current = null, _e(t));
1132
- }, [fe, _e]), W(() => {
1133
- if (!B) {
1134
- if (fe.length > 0) {
1135
- const t = ve(fe[0]);
1136
- C(t);
1131
+ !t || de.length === 0 || (ie.current = null, _e(t));
1132
+ }, [de, _e]), H(() => {
1133
+ if (!j) {
1134
+ if (de.length > 0) {
1135
+ const t = ve(de[0]);
1136
+ x(t);
1137
1137
  }
1138
1138
  return;
1139
1139
  }
1140
- b && b === B || X(B);
1141
- }, [fe, B, b]), W(() => {
1142
- if (fe.length === 0)
1140
+ b && b === j || X(j);
1141
+ }, [de, j, b]), H(() => {
1142
+ if (de.length === 0)
1143
1143
  return;
1144
- const t = fe[0];
1144
+ const t = de[0];
1145
1145
  if ((t == null ? void 0 : t.type) !== "folder" || N.current)
1146
1146
  return;
1147
1147
  const a = t.name;
1148
- N.current = !0, F(
1148
+ N.current = !0, _(
1149
1149
  (o) => o[a] ? o : { ...o, [a]: !0 }
1150
- ), !te.current[a] && !Y.current[a] && re(a, t);
1151
- }, [fe, re, h]), W(() => () => {
1152
- M.current && clearTimeout(M.current), L();
1153
- }, []), W(() => {
1154
- H && setTimeout(() => {
1150
+ ), !re.current[a] && !G.current[a] && ne(a, t);
1151
+ }, [de, ne, v]), H(() => () => {
1152
+ O.current && clearTimeout(O.current), I();
1153
+ }, []), H(() => {
1154
+ U && setTimeout(() => {
1155
1155
  const t = document.querySelector(
1156
1156
  '[role="menu"] [role="menuitem"]'
1157
1157
  );
1158
1158
  t && typeof t.focus == "function" && t.focus();
1159
1159
  }, 0);
1160
- }, [H]);
1161
- const [ce, be] = ee(""), $e = (t, a) => {
1160
+ }, [U]);
1161
+ const [ue, be] = te(""), $e = (t, a) => {
1162
1162
  if (t.type === "folder")
1163
1163
  return a;
1164
1164
  const o = Le(a);
@@ -1167,7 +1167,7 @@ const nn = $t(function({
1167
1167
  const i = $e(t, a);
1168
1168
  return i ? o && Xt(o, i) ? { allowed: !1, state: "invalid", destination: null } : { allowed: !0, state: "valid", destination: i } : { allowed: !1, state: "invalid", destination: null };
1169
1169
  }, Ie = (t, a, o) => {
1170
- a.type !== "folder" && a.type !== "file" || (oe(o), g(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
1170
+ a.type !== "folder" && a.type !== "file" || (ce(o), g(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
1171
1171
  "application/x-wp-playground-path",
1172
1172
  o
1173
1173
  ), t.dataTransfer.setData("text/plain", o)));
@@ -1178,9 +1178,9 @@ const nn = $t(function({
1178
1178
  i.allowed && a.type === "folder" && Oe(o, a), g((u) => (u == null ? void 0 : u.path) === o && u.state === i.state ? u : { path: o, state: i.state });
1179
1179
  }, ft = (t, a, o) => {
1180
1180
  const i = ge(a, o, J);
1181
- i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = J ? "move" : "copy"), a.type === "folder" && Oe(o, a), g((u) => (u == null ? void 0 : u.path) === o && u.state === i.state ? u : { path: o, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), Q(o), g((u) => (u == null ? void 0 : u.path) === o && u.state === "invalid" ? u : { path: o, state: "invalid" }));
1181
+ i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = J ? "move" : "copy"), a.type === "folder" && Oe(o, a), g((u) => (u == null ? void 0 : u.path) === o && u.state === i.state ? u : { path: o, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), ee(o), g((u) => (u == null ? void 0 : u.path) === o && u.state === "invalid" ? u : { path: o, state: "invalid" }));
1182
1182
  }, dt = (t, a, o) => {
1183
- Q(o);
1183
+ ee(o);
1184
1184
  const i = t.relatedTarget;
1185
1185
  i && t.currentTarget.contains(i) || g((u) => (u == null ? void 0 : u.path) === o ? null : u);
1186
1186
  }, Et = async (t, a, o) => {
@@ -1189,7 +1189,7 @@ const nn = $t(function({
1189
1189
  Fe();
1190
1190
  return;
1191
1191
  }
1192
- t.preventDefault(), t.stopPropagation(), Q(o), g(null);
1192
+ t.preventDefault(), t.stopPropagation(), ee(o), g(null);
1193
1193
  try {
1194
1194
  i ? await bt(i, u.destination) : await Ke(
1195
1195
  t.dataTransfer,
@@ -1199,7 +1199,7 @@ const nn = $t(function({
1199
1199
  Fe();
1200
1200
  }
1201
1201
  }, mt = (t, a, o) => {
1202
- c && (t.preventDefault(), t.stopPropagation(), pe(null), w({
1202
+ c && (t.preventDefault(), t.stopPropagation(), pe(null), E({
1203
1203
  absPath: o,
1204
1204
  type: a.type,
1205
1205
  x: t.clientX,
@@ -1207,27 +1207,27 @@ const nn = $t(function({
1207
1207
  }));
1208
1208
  }, We = async (t, a) => {
1209
1209
  let o = a, i = 0;
1210
- const u = (E) => {
1211
- const ae = E.lastIndexOf(".");
1212
- return ae > 0 ? { stem: E.slice(0, ae), ext: E.slice(ae) } : { stem: E, ext: "" };
1213
- }, v = t === "/" ? "" : t;
1214
- for (; await (l == null ? void 0 : l.fileExists(`${v}/${o}`)) || await (l == null ? void 0 : l.isDir(`${v}/${o}`)); ) {
1210
+ const u = (y) => {
1211
+ const oe = y.lastIndexOf(".");
1212
+ return oe > 0 ? { stem: y.slice(0, oe), ext: y.slice(oe) } : { stem: y, ext: "" };
1213
+ }, w = t === "/" ? "" : t;
1214
+ for (; await (l == null ? void 0 : l.fileExists(`${w}/${o}`)) || await (l == null ? void 0 : l.isDir(`${w}/${o}`)); ) {
1215
1215
  i += 1;
1216
- const { stem: E, ext: ae } = u(a);
1217
- o = `${E} (${i})${ae}`;
1216
+ const { stem: y, ext: oe } = u(a);
1217
+ o = `${y} (${i})${oe}`;
1218
1218
  }
1219
1219
  return o;
1220
1220
  }, Ye = async (t, a, o) => {
1221
1221
  if (!l) return;
1222
- let i = t || S || h;
1222
+ let i = t || k || v;
1223
1223
  try {
1224
1224
  await l.isDir(i) || (i = Le(i));
1225
1225
  } catch {
1226
1226
  i = Le(i);
1227
1227
  }
1228
- const u = i, v = await We(u, o), E = je(u, v);
1229
- a === "folder" ? await l.mkdir(E) : await l.writeFile(E, ""), we.current = { type: a, tempPath: E }, pe(E), await ne(u), setTimeout(() => {
1230
- C(E), X(E);
1228
+ const u = i, w = await We(u, o), y = je(u, w);
1229
+ a === "folder" ? await l.mkdir(y) : await l.writeFile(y, ""), we.current = { type: a, tempPath: y }, pe(y), await ae(u), setTimeout(() => {
1230
+ x(y), X(y);
1231
1231
  }, 0);
1232
1232
  }, yt = async (t) => {
1233
1233
  if (!l) return !1;
@@ -1258,21 +1258,21 @@ const nn = $t(function({
1258
1258
  const u = Le(t);
1259
1259
  try {
1260
1260
  await l.mv(t, i), ke(t, i);
1261
- const v = ze(
1262
- S,
1261
+ const w = ze(
1262
+ k,
1263
1263
  t,
1264
1264
  i
1265
1265
  );
1266
- S && (S === t || S.startsWith(`${t}/`)) && k(v), C(
1267
- (E) => ze(E, t, i)
1268
- ), F((E) => ({
1269
- ...E,
1266
+ k && (k === t || k.startsWith(`${t}/`)) && P(w), x(
1267
+ (y) => ze(y, t, i)
1268
+ ), _((y) => ({
1269
+ ...y,
1270
1270
  [a]: !0
1271
1271
  })), await Promise.all([
1272
- ne(u),
1273
- ne(a)
1274
- ]), K(
1275
- (E) => ze(E, t, i)
1272
+ ae(u),
1273
+ ae(a)
1274
+ ]), Z(
1275
+ (y) => ze(y, t, i)
1276
1276
  ), X(i);
1277
1277
  } catch {
1278
1278
  }
@@ -1283,8 +1283,8 @@ const nn = $t(function({
1283
1283
  t.file(a, o);
1284
1284
  }), pt = async (t, a) => {
1285
1285
  if (!l) return;
1286
- const o = t.name || "untitled", i = await We(a, o), u = je(a, i), v = new Uint8Array(await t.arrayBuffer());
1287
- await l.writeFile(u, v);
1286
+ const o = t.name || "untitled", i = await We(a, o), u = je(a, i), w = new Uint8Array(await t.arrayBuffer());
1287
+ await l.writeFile(u, w);
1288
1288
  }, Ze = async (t, a) => {
1289
1289
  const o = await Ct(t);
1290
1290
  await pt(o, a);
@@ -1294,27 +1294,27 @@ const nn = $t(function({
1294
1294
  t.name || "New Folder"
1295
1295
  ), i = je(a, o);
1296
1296
  await _t(i);
1297
- const u = t.createReader(), v = () => new Promise((E, ae) => {
1297
+ const u = t.createReader(), w = () => new Promise((y, oe) => {
1298
1298
  u.readEntries(
1299
- (xe) => E(Array.from(xe)),
1300
- ae
1299
+ (xe) => y(Array.from(xe)),
1300
+ oe
1301
1301
  );
1302
1302
  });
1303
1303
  for (; ; ) {
1304
- const E = await v();
1305
- if (!E.length)
1304
+ const y = await w();
1305
+ if (!y.length)
1306
1306
  break;
1307
- for (const ae of E)
1308
- ae.isFile ? await Ze(
1309
- ae,
1307
+ for (const oe of y)
1308
+ oe.isFile ? await Ze(
1309
+ oe,
1310
1310
  i
1311
- ) : ae.isDirectory && await ot(
1312
- ae,
1311
+ ) : oe.isDirectory && await ot(
1312
+ oe,
1313
1313
  i
1314
1314
  );
1315
1315
  }
1316
1316
  }, Ve = (t, a) => qe([], t, a), Ke = (t, a) => {
1317
- const i = Array.from(t.items).filter((v) => v.kind === "file").map((v) => xt(v)).filter((v) => !!v), u = Array.from(t.files);
1317
+ const i = Array.from(t.items).filter((w) => w.kind === "file").map((w) => xt(w)).filter((w) => !!w), u = Array.from(t.files);
1318
1318
  return qe(i, u, a);
1319
1319
  }, qe = async (t, a, o) => {
1320
1320
  if (l) {
@@ -1330,7 +1330,7 @@ const nn = $t(function({
1330
1330
  else
1331
1331
  for (const i of a)
1332
1332
  await pt(i, o);
1333
- await ne(o), F((i) => ({
1333
+ await ae(o), _((i) => ({
1334
1334
  ...i,
1335
1335
  [o]: !0
1336
1336
  }));
@@ -1338,20 +1338,20 @@ const nn = $t(function({
1338
1338
  }, ht = async (t, a) => {
1339
1339
  if (!l) return;
1340
1340
  const o = t;
1341
- w(null);
1341
+ E(null);
1342
1342
  try {
1343
1343
  a === "folder" ? await l.rmdir(o, { recursive: !0 }) : await l.unlink(o);
1344
1344
  } catch {
1345
1345
  } finally {
1346
1346
  pe(null);
1347
1347
  const i = Le(o);
1348
- await ne(i), S && (S === o || S.startsWith(`${o}/`)) && k(null);
1348
+ await ae(i), k && (k === o || k.startsWith(`${o}/`)) && P(null);
1349
1349
  }
1350
1350
  }, Rt = async (t) => {
1351
1351
  if (l)
1352
1352
  try {
1353
- const o = await (await l.read(t)).arrayBuffer(), i = new Blob([o]), u = URL.createObjectURL(i), v = document.createElement("a");
1354
- v.href = u, v.download = et(t) || "download", document.body.appendChild(v), v.click(), document.body.removeChild(v), setTimeout(() => URL.revokeObjectURL(u), 6e4);
1353
+ const o = await (await l.read(t)).arrayBuffer(), i = new Blob([o]), u = URL.createObjectURL(i), w = document.createElement("a");
1354
+ w.href = u, w.download = et(t) || "download", document.body.appendChild(w), w.click(), document.body.removeChild(w), setTimeout(() => URL.revokeObjectURL(u), 6e4);
1355
1355
  } catch (a) {
1356
1356
  console.error("Failed to download file", a);
1357
1357
  }
@@ -1359,29 +1359,29 @@ const nn = $t(function({
1359
1359
  var a;
1360
1360
  if (!he)
1361
1361
  if (t.key.length === 1 && t.key.match(/\S/)) {
1362
- const o = ce + t.key.toLowerCase();
1363
- if (be(o), M.current && clearTimeout(M.current), M.current = setTimeout(() => {
1362
+ const o = ue + t.key.toLowerCase();
1363
+ if (be(o), O.current && clearTimeout(O.current), O.current = setTimeout(() => {
1364
1364
  be("");
1365
- }, 1e3), !p.current)
1365
+ }, 1e3), !h.current)
1366
1366
  return;
1367
1367
  const i = Array.from(
1368
- p.current.querySelectorAll(".file-node-button")
1368
+ h.current.querySelectorAll(".file-node-button")
1369
1369
  ), u = document.activeElement;
1370
- let v = 0;
1371
- u && i.includes(u) && (v = i.indexOf(
1370
+ let w = 0;
1371
+ u && i.includes(u) && (w = i.indexOf(
1372
1372
  u
1373
1373
  ));
1374
- for (let E = 0; E < i.length; E++) {
1375
- const ae = (v + E) % i.length, xe = i[ae];
1374
+ for (let y = 0; y < i.length; y++) {
1375
+ const oe = (w + y) % i.length, xe = i[oe];
1376
1376
  if ((a = xe.textContent) != null && a.toLowerCase().trim().startsWith(o)) {
1377
1377
  xe.focus();
1378
1378
  const e = xe.getAttribute("data-path");
1379
- e && C(e);
1379
+ e && x(e);
1380
1380
  break;
1381
1381
  }
1382
1382
  }
1383
1383
  } else
1384
- be(""), M.current && clearTimeout(M.current);
1384
+ be(""), O.current && clearTimeout(O.current);
1385
1385
  }, kt = async (t, a) => {
1386
1386
  if (f) return;
1387
1387
  const o = we.current, i = (o == null ? void 0 : o.tempPath) === t, u = Le(t);
@@ -1398,24 +1398,24 @@ const nn = $t(function({
1398
1398
  pe(i ? null : t);
1399
1399
  return;
1400
1400
  }
1401
- let v = je(u, a), E = v;
1402
- if (E === t) {
1401
+ let w = je(u, a), y = w;
1402
+ if (y === t) {
1403
1403
  pe(null);
1404
1404
  const s = i && (o == null ? void 0 : o.type) === "file";
1405
1405
  i && (we.current = null), setTimeout(() => {
1406
- C(E), X(E), s && D && D(E);
1406
+ x(y), X(y), s && A && A(y);
1407
1407
  }, 0);
1408
1408
  return;
1409
1409
  }
1410
- const ae = await l.fileExists(E), xe = await l.isDir(E);
1411
- if ((ae || xe) && E !== t)
1410
+ const oe = await l.fileExists(y), xe = await l.isDir(y);
1411
+ if ((oe || xe) && y !== t)
1412
1412
  if (i)
1413
1413
  try {
1414
1414
  const s = await We(
1415
1415
  u === "/" ? "/" : u,
1416
1416
  a
1417
1417
  );
1418
- v = je(u, s), E = v;
1418
+ w = je(u, s), y = w;
1419
1419
  } catch {
1420
1420
  }
1421
1421
  else {
@@ -1424,7 +1424,7 @@ const nn = $t(function({
1424
1424
  }
1425
1425
  let e = (o == null ? void 0 : o.type) === "folder";
1426
1426
  try {
1427
- await l.mv(t, v), o || (e = await l.isDir(v)), e && ke(t, E), S === t && k(E), await ne(u), C(E), X(E), i && !e && D && D(E);
1427
+ await l.mv(t, w), o || (e = await l.isDir(w)), e && ke(t, y), k === t && P(y), await ae(u), x(y), X(y), i && !e && A && A(y);
1428
1428
  } catch {
1429
1429
  if (i)
1430
1430
  try {
@@ -1448,21 +1448,21 @@ const nn = $t(function({
1448
1448
  }
1449
1449
  we.current = null, pe(null);
1450
1450
  const o = Le(t);
1451
- await ne(o), C(o), X(o);
1451
+ await ae(o), x(o), X(o);
1452
1452
  };
1453
- return /* @__PURE__ */ r.createElement("div", { onKeyDown: vt, ref: p }, /* @__PURE__ */ r.createElement(er, { className: Re.filePickerTree }, fe.map((t, a) => /* @__PURE__ */ r.createElement(
1453
+ return /* @__PURE__ */ r.createElement("div", { onKeyDown: vt, ref: h }, /* @__PURE__ */ r.createElement(er, { className: Re.filePickerTree }, de.map((t, a) => /* @__PURE__ */ r.createElement(
1454
1454
  zt,
1455
1455
  {
1456
1456
  key: t.name,
1457
1457
  node: t,
1458
1458
  level: 0,
1459
1459
  position: a + 1,
1460
- setSize: fe.length,
1461
- expandedNodePaths: _,
1460
+ setSize: de.length,
1461
+ expandedNodePaths: D,
1462
1462
  onToggle: Me,
1463
- selectedNode: S,
1464
- focusPath: (o) => C(o),
1465
- focusedNode: B,
1463
+ selectedNode: k,
1464
+ focusPath: (o) => x(o),
1465
+ focusedNode: j,
1466
1466
  selectPath: Se,
1467
1467
  generatePath: ve,
1468
1468
  getChildren: me,
@@ -1470,31 +1470,31 @@ const nn = $t(function({
1470
1470
  renamingPath: b,
1471
1471
  onRename: kt,
1472
1472
  onRenameCancel: wt,
1473
- dropIndicator: de,
1473
+ dropIndicator: Q,
1474
1474
  onDragStart: f ? void 0 : Ie,
1475
1475
  onDragEnd: f ? void 0 : at,
1476
1476
  onDragEnter: f ? void 0 : Ge,
1477
1477
  onDragOver: f ? void 0 : ft,
1478
1478
  onDragLeave: f ? void 0 : dt,
1479
1479
  onDrop: f ? void 0 : Et,
1480
- rootPath: h,
1481
- onDoubleClickFile: D
1480
+ rootPath: v,
1481
+ onDoubleClickFile: A
1482
1482
  }
1483
- ))), !f && H && /* @__PURE__ */ r.createElement(
1483
+ ))), !f && U && /* @__PURE__ */ r.createElement(
1484
1484
  tr,
1485
1485
  {
1486
1486
  placement: "bottom-start",
1487
- onClose: () => w(null),
1487
+ onClose: () => E(null),
1488
1488
  anchor: {
1489
1489
  getBoundingClientRect: () => ({
1490
- x: H.x,
1491
- y: H.y,
1490
+ x: U.x,
1491
+ y: U.y,
1492
1492
  width: 0,
1493
1493
  height: 0,
1494
- top: H.y,
1495
- left: H.x,
1496
- right: H.x,
1497
- bottom: H.y,
1494
+ top: U.y,
1495
+ left: U.x,
1496
+ right: U.x,
1497
+ bottom: U.y,
1498
1498
  toJSON: () => ({})
1499
1499
  }),
1500
1500
  ownerDocument: document
@@ -1503,26 +1503,26 @@ const nn = $t(function({
1503
1503
  resize: !1,
1504
1504
  focusOnMount: "firstElement"
1505
1505
  },
1506
- /* @__PURE__ */ r.createElement(rr, { role: "menu" }, H.type === "folder" && /* @__PURE__ */ r.createElement(
1506
+ /* @__PURE__ */ r.createElement(rr, { role: "menu" }, U.type === "folder" && /* @__PURE__ */ r.createElement(
1507
1507
  it,
1508
1508
  {
1509
1509
  role: "menuitem",
1510
1510
  onClick: async () => {
1511
- w(null), await Ye(
1512
- H.absPath,
1511
+ E(null), await Ye(
1512
+ U.absPath,
1513
1513
  "file",
1514
1514
  "untitled.php"
1515
1515
  );
1516
1516
  }
1517
1517
  },
1518
1518
  "Create file"
1519
- ), H.type === "folder" && /* @__PURE__ */ r.createElement(
1519
+ ), U.type === "folder" && /* @__PURE__ */ r.createElement(
1520
1520
  it,
1521
1521
  {
1522
1522
  role: "menuitem",
1523
1523
  onClick: async () => {
1524
- w(null), await Ye(
1525
- H.absPath,
1524
+ E(null), await Ye(
1525
+ U.absPath,
1526
1526
  "folder",
1527
1527
  "New Folder"
1528
1528
  );
@@ -1534,17 +1534,17 @@ const nn = $t(function({
1534
1534
  {
1535
1535
  role: "menuitem",
1536
1536
  onClick: () => {
1537
- w(null), pe(H.absPath);
1537
+ E(null), pe(U.absPath);
1538
1538
  }
1539
1539
  },
1540
1540
  "Rename"
1541
- ), H.type === "file" && /* @__PURE__ */ r.createElement(
1541
+ ), U.type === "file" && /* @__PURE__ */ r.createElement(
1542
1542
  it,
1543
1543
  {
1544
1544
  role: "menuitem",
1545
1545
  onClick: async () => {
1546
- w(null), await Rt(
1547
- H.absPath
1546
+ E(null), await Rt(
1547
+ U.absPath
1548
1548
  );
1549
1549
  }
1550
1550
  },
@@ -1554,8 +1554,8 @@ const nn = $t(function({
1554
1554
  {
1555
1555
  role: "menuitem",
1556
1556
  onClick: () => ht(
1557
- H.absPath,
1558
- H.type
1557
+ U.absPath,
1558
+ U.type
1559
1559
  )
1560
1560
  },
1561
1561
  "Delete"
@@ -1566,56 +1566,56 @@ const nn = $t(function({
1566
1566
  level: c,
1567
1567
  position: f,
1568
1568
  setSize: l,
1569
- expandedNodePaths: T,
1569
+ expandedNodePaths: R,
1570
1570
  onToggle: d,
1571
- selectedNode: k,
1572
- focusPath: D,
1573
- focusedNode: A,
1574
- selectPath: h,
1575
- generatePath: _,
1576
- getChildren: F,
1577
- onContextMenu: S,
1578
- renamingPath: K,
1579
- onRename: B,
1580
- onRenameCancel: C,
1581
- parentPath: G = "",
1582
- dropIndicator: y,
1583
- onDragStart: x,
1584
- onDragEnd: z,
1571
+ selectedNode: P,
1572
+ focusPath: A,
1573
+ focusedNode: T,
1574
+ selectPath: v,
1575
+ generatePath: D,
1576
+ getChildren: _,
1577
+ onContextMenu: k,
1578
+ renamingPath: Z,
1579
+ onRename: j,
1580
+ onRenameCancel: x,
1581
+ parentPath: K = "",
1582
+ dropIndicator: W,
1583
+ onDragStart: m,
1584
+ onDragEnd: V,
1585
1585
  onDragEnter: J,
1586
- onDragOver: oe,
1587
- onDragLeave: de,
1586
+ onDragOver: ce,
1587
+ onDragLeave: Q,
1588
1588
  onDrop: g,
1589
1589
  rootPath: $,
1590
1590
  onDoubleClickFile: N
1591
1591
  }) => {
1592
- const p = _(n, G), M = T[p], Y = K === p, te = V(null), [L, Q] = ee(n.name), X = V(!1), ve = (y == null ? void 0 : y.path) === p, me = ve && (y == null ? void 0 : y.state) === "valid", Ne = ve && (y == null ? void 0 : y.state) === "invalid", Pe = !!x && !Y && p !== $, re = V(null), Oe = {
1593
- onDragEnter: (w) => J == null ? void 0 : J(w, n, p),
1594
- onDragOver: (w) => oe == null ? void 0 : oe(w, n, p),
1595
- onDragLeave: (w) => de == null ? void 0 : de(w, n, p),
1596
- onDrop: (w) => g == null ? void 0 : g(w, n, p)
1597
- }, ne = F(n, p) ?? [];
1598
- W(() => {
1599
- var w;
1600
- Y ? (Q(n.name), X.current = !1, typeof window < "u" && requestAnimationFrame ? requestAnimationFrame(() => {
1592
+ const h = D(n, K), O = R[h], G = Z === h, re = M(null), [I, ee] = te(n.name), X = M(!1), ve = (W == null ? void 0 : W.path) === h, me = ve && (W == null ? void 0 : W.state) === "valid", Ne = ve && (W == null ? void 0 : W.state) === "invalid", Pe = !!m && !G && h !== $, ne = M(null), Oe = {
1593
+ onDragEnter: (E) => J == null ? void 0 : J(E, n, h),
1594
+ onDragOver: (E) => ce == null ? void 0 : ce(E, n, h),
1595
+ onDragLeave: (E) => Q == null ? void 0 : Q(E, n, h),
1596
+ onDrop: (E) => g == null ? void 0 : g(E, n, h)
1597
+ }, ae = _(n, h) ?? [];
1598
+ H(() => {
1599
+ var E;
1600
+ G ? (ee(n.name), X.current = !1, typeof window < "u" && requestAnimationFrame ? requestAnimationFrame(() => {
1601
1601
  var he;
1602
- (he = te.current) == null || he.select();
1603
- }) : (w = te.current) == null || w.select()) : X.current = !1;
1604
- }, [Y, n.name]);
1602
+ (he = re.current) == null || he.select();
1603
+ }) : (E = re.current) == null || E.select()) : X.current = !1;
1604
+ }, [G, n.name]);
1605
1605
  const Me = () => {
1606
- n.type === "folder" && d(p, n, !M);
1607
- }, _e = (w) => {
1606
+ n.type === "folder" && d(h, n, !O);
1607
+ }, _e = (E) => {
1608
1608
  var he, pe;
1609
- if (w.key === "ArrowLeft")
1610
- M ? Me() : (he = document.querySelector(
1611
- `[data-path="${CSS.escape(G)}"]`
1612
- )) == null || he.focus(), w.preventDefault(), w.stopPropagation();
1613
- else if (w.key === "ArrowRight") {
1614
- if (M) {
1615
- if (ne != null && ne.length) {
1616
- const we = _(
1617
- ne[0],
1618
- p
1609
+ if (E.key === "ArrowLeft")
1610
+ O ? Me() : (he = document.querySelector(
1611
+ `[data-path="${CSS.escape(K)}"]`
1612
+ )) == null || he.focus(), E.preventDefault(), E.stopPropagation();
1613
+ else if (E.key === "ArrowRight") {
1614
+ if (O) {
1615
+ if (ae != null && ae.length) {
1616
+ const we = D(
1617
+ ae[0],
1618
+ h
1619
1619
  );
1620
1620
  (pe = document.querySelector(
1621
1621
  `[data-path="${CSS.escape(we)}"]`
@@ -1623,36 +1623,36 @@ const nn = $t(function({
1623
1623
  }
1624
1624
  } else
1625
1625
  Me();
1626
- w.preventDefault(), w.stopPropagation();
1627
- } else w.key === " " || w.key === "Space" || w.key === "Spacebar" ? (n.type === "folder" && d(p, n, !M), w.preventDefault()) : w.key === "Enter" && (n.type === "folder" ? d(p, n, !M) : (h(p, !1), D(p), N ? N(p) : h(p, !0)), w.preventDefault());
1628
- }, ke = (w) => {
1629
- S == null || S(w, n, p);
1630
- }, Fe = (w) => {
1631
- w.preventDefault(), X.current = !0, B == null || B(p, L);
1632
- }, Se = (w) => {
1633
- if (w.key === "Escape") {
1634
- w.preventDefault(), w.stopPropagation(), X.current = !0, C == null || C(p);
1626
+ E.preventDefault(), E.stopPropagation();
1627
+ } else E.key === " " || E.key === "Space" || E.key === "Spacebar" ? (n.type === "folder" && d(h, n, !O), E.preventDefault()) : E.key === "Enter" && (n.type === "folder" ? d(h, n, !O) : (v(h, !1), A(h), N ? N(h) : v(h, !0)), E.preventDefault());
1628
+ }, ke = (E) => {
1629
+ k == null || k(E, n, h);
1630
+ }, Fe = (E) => {
1631
+ E.preventDefault(), X.current = !0, j == null || j(h, I);
1632
+ }, Se = (E) => {
1633
+ if (E.key === "Escape") {
1634
+ E.preventDefault(), E.stopPropagation(), X.current = !0, x == null || x(h);
1635
1635
  return;
1636
1636
  }
1637
- (w.key === "ArrowLeft" || w.key === "ArrowRight" || w.key === "ArrowUp" || w.key === "ArrowDown") && w.stopPropagation();
1638
- }, fe = () => {
1639
- X.current || C == null || C(p), X.current = !1;
1640
- }, H = () => {
1637
+ (E.key === "ArrowLeft" || E.key === "ArrowRight" || E.key === "ArrowUp" || E.key === "ArrowDown") && E.stopPropagation();
1638
+ }, de = () => {
1639
+ X.current || x == null || x(h), X.current = !1;
1640
+ }, U = () => {
1641
1641
  if (n.type === "folder") {
1642
- Me(), h(p), D(p);
1642
+ Me(), v(h), A(h);
1643
1643
  return;
1644
1644
  }
1645
- const w = re.current !== null;
1646
- if (w && re.current && clearTimeout(re.current), re.current = null, w) {
1647
- N ? N(p) : h(p, !0);
1645
+ const E = ne.current !== null;
1646
+ if (E && ne.current && clearTimeout(ne.current), ne.current = null, E) {
1647
+ N ? N(h) : v(h, !0);
1648
1648
  return;
1649
1649
  }
1650
- h(p, !1), D(p), h(p, !0), re.current = window.setTimeout(() => {
1651
- re.current = null;
1650
+ v(h, !1), A(h), v(h, !0), ne.current = window.setTimeout(() => {
1651
+ ne.current = null;
1652
1652
  }, 300);
1653
1653
  };
1654
- return W(() => () => {
1655
- re.current !== null && typeof window < "u" && clearTimeout(re.current);
1654
+ return H(() => () => {
1655
+ ne.current !== null && typeof window < "u" && clearTimeout(ne.current);
1656
1656
  }, []), /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
1657
1657
  nr,
1658
1658
  {
@@ -1660,7 +1660,7 @@ const nn = $t(function({
1660
1660
  positionInSet: f,
1661
1661
  setSize: l
1662
1662
  },
1663
- /* @__PURE__ */ r.createElement(ar, null, () => /* @__PURE__ */ r.createElement(r.Fragment, null, Y ? /* @__PURE__ */ r.createElement(
1663
+ /* @__PURE__ */ r.createElement(ar, null, () => /* @__PURE__ */ r.createElement(r.Fragment, null, G ? /* @__PURE__ */ r.createElement(
1664
1664
  "form",
1665
1665
  {
1666
1666
  onSubmit: Fe,
@@ -1669,13 +1669,13 @@ const nn = $t(function({
1669
1669
  Re.renaming,
1670
1670
  "file-node-button",
1671
1671
  {
1672
- [Re.selected]: k === p,
1673
- [Re.focused]: A === p,
1672
+ [Re.selected]: P === h,
1673
+ [Re.focused]: T === h,
1674
1674
  [Re.dropTarget]: me,
1675
1675
  [Re.dropTargetInvalid]: Ne
1676
1676
  }
1677
1677
  ),
1678
- "data-path": p,
1678
+ "data-path": h,
1679
1679
  onContextMenu: ke,
1680
1680
  ...Oe
1681
1681
  },
@@ -1683,7 +1683,7 @@ const nn = $t(function({
1683
1683
  jt,
1684
1684
  {
1685
1685
  node: n,
1686
- isOpen: n.type === "folder" && M,
1686
+ isOpen: n.type === "folder" && O,
1687
1687
  level: c,
1688
1688
  hideName: !0
1689
1689
  }
@@ -1691,12 +1691,12 @@ const nn = $t(function({
1691
1691
  /* @__PURE__ */ r.createElement(
1692
1692
  "input",
1693
1693
  {
1694
- ref: te,
1694
+ ref: re,
1695
1695
  className: Re.renameInput,
1696
- value: L,
1697
- onChange: (w) => Q(w.target.value),
1698
- onBlur: fe,
1699
- onFocus: () => D(p),
1696
+ value: I,
1697
+ onChange: (E) => ee(E.target.value),
1698
+ onBlur: de,
1699
+ onFocus: () => A(h),
1700
1700
  onKeyDown: Se
1701
1701
  }
1702
1702
  )
@@ -1705,77 +1705,77 @@ const nn = $t(function({
1705
1705
  {
1706
1706
  ...Oe,
1707
1707
  draggable: Pe,
1708
- onDragStart: (w) => x == null ? void 0 : x(w, n, p),
1709
- onDragEnd: (w) => z == null ? void 0 : z(w, n, p),
1710
- onClick: H,
1708
+ onDragStart: (E) => m == null ? void 0 : m(E, n, h),
1709
+ onDragEnd: (E) => V == null ? void 0 : V(E, n, h),
1710
+ onClick: U,
1711
1711
  onKeyDown: _e,
1712
1712
  onFocus: () => {
1713
- D(p);
1713
+ A(h);
1714
1714
  },
1715
1715
  onContextMenu: ke,
1716
1716
  className: De(
1717
1717
  Re.fileNodeButton,
1718
1718
  "file-node-button",
1719
1719
  {
1720
- [Re.selected]: k === p,
1721
- [Re.focused]: A === p,
1720
+ [Re.selected]: P === h,
1721
+ [Re.focused]: T === h,
1722
1722
  [Re.dropTarget]: me,
1723
1723
  [Re.dropTargetInvalid]: Ne
1724
1724
  }
1725
1725
  ),
1726
- "data-path": p,
1727
- "data-expanded": M ? "true" : "false"
1726
+ "data-path": h,
1727
+ "data-expanded": O ? "true" : "false"
1728
1728
  },
1729
1729
  /* @__PURE__ */ r.createElement(
1730
1730
  jt,
1731
1731
  {
1732
1732
  node: n,
1733
- isOpen: n.type === "folder" && M,
1733
+ isOpen: n.type === "folder" && O,
1734
1734
  level: c
1735
1735
  }
1736
1736
  )
1737
1737
  )))
1738
- ), M && ne && ne.map((w, he) => /* @__PURE__ */ r.createElement(
1738
+ ), O && ae && ae.map((E, he) => /* @__PURE__ */ r.createElement(
1739
1739
  zt,
1740
1740
  {
1741
- key: w.name,
1742
- node: w,
1741
+ key: E.name,
1742
+ node: E,
1743
1743
  level: c + 1,
1744
1744
  position: he + 1,
1745
- setSize: ne.length,
1746
- expandedNodePaths: T,
1745
+ setSize: ae.length,
1746
+ expandedNodePaths: R,
1747
1747
  onToggle: d,
1748
- selectedNode: k,
1749
- focusPath: D,
1750
- focusedNode: A,
1751
- selectPath: h,
1752
- generatePath: _,
1753
- getChildren: F,
1754
- onContextMenu: S,
1755
- renamingPath: K,
1756
- onRename: B,
1757
- onRenameCancel: C,
1758
- parentPath: p,
1759
- dropIndicator: y,
1760
- onDragStart: x,
1761
- onDragEnd: z,
1748
+ selectedNode: P,
1749
+ focusPath: A,
1750
+ focusedNode: T,
1751
+ selectPath: v,
1752
+ generatePath: D,
1753
+ getChildren: _,
1754
+ onContextMenu: k,
1755
+ renamingPath: Z,
1756
+ onRename: j,
1757
+ onRenameCancel: x,
1758
+ parentPath: h,
1759
+ dropIndicator: W,
1760
+ onDragStart: m,
1761
+ onDragEnd: V,
1762
1762
  onDragEnter: J,
1763
- onDragOver: oe,
1764
- onDragLeave: de,
1763
+ onDragOver: ce,
1764
+ onDragLeave: Q,
1765
1765
  onDrop: g,
1766
1766
  rootPath: $,
1767
1767
  onDoubleClickFile: N
1768
1768
  }
1769
1769
  )));
1770
1770
  }, jt = ({ node: n, level: c, isOpen: f, hideName: l = !1 }) => {
1771
- const T = [];
1771
+ const R = [];
1772
1772
  for (let d = 0; d < c; d++)
1773
- T.push("&nbsp;&nbsp;&nbsp;&nbsp;");
1773
+ R.push("&nbsp;&nbsp;&nbsp;&nbsp;");
1774
1774
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
1775
1775
  "span",
1776
1776
  {
1777
1777
  "aria-hidden": "true",
1778
- dangerouslySetInnerHTML: { __html: T.join("") }
1778
+ dangerouslySetInnerHTML: { __html: R.join("") }
1779
1779
  }
1780
1780
  ), n.type === "folder" ? /* @__PURE__ */ r.createElement(Ot, { width: 16, icon: f ? Hr : Ur }) : /* @__PURE__ */ r.createElement("div", { style: { width: 16 } }, " "), /* @__PURE__ */ r.createElement(Ot, { width: 16, icon: n.type === "folder" ? jr : Vr }), !l && /* @__PURE__ */ r.createElement("span", { className: Re.fileName }, n.name));
1781
1781
  }, an = "_control_kp9d9_1", on = "_browse-label_kp9d9_11", ln = "_path-preview_kp9d9_37", sn = "_modal_kp9d9_43", cn = "_modal-footer_kp9d9_48", Qe = {
@@ -1809,11 +1809,11 @@ function Ga({
1809
1809
  onChange: c,
1810
1810
  filesystem: f
1811
1811
  }) {
1812
- const [l, T] = ee(!1), d = () => T(!0), k = () => T(!1), [D, A] = ee(
1812
+ const [l, R] = te(!1), d = () => R(!0), P = () => R(!1), [A, T] = te(
1813
1813
  n || null
1814
1814
  );
1815
- function h(_) {
1816
- _ == null || _.preventDefault(), c(D || ""), k();
1815
+ function v(D) {
1816
+ D == null || D.preventDefault(), c(A || ""), P();
1817
1817
  }
1818
1818
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
1819
1819
  tt,
@@ -1828,15 +1828,15 @@ function Ga({
1828
1828
  or,
1829
1829
  {
1830
1830
  title: "Select a path ",
1831
- onRequestClose: k,
1831
+ onRequestClose: P,
1832
1832
  className: Qe.modal
1833
1833
  },
1834
- /* @__PURE__ */ r.createElement("form", { onSubmit: h }, /* @__PURE__ */ r.createElement(
1834
+ /* @__PURE__ */ r.createElement("form", { onSubmit: v }, /* @__PURE__ */ r.createElement(
1835
1835
  nn,
1836
1836
  {
1837
1837
  filesystem: f,
1838
1838
  initialSelectedPath: n,
1839
- onSelect: A
1839
+ onSelect: T
1840
1840
  }
1841
1841
  ), /* @__PURE__ */ r.createElement("div", { className: Qe.modalFooter }, /* @__PURE__ */ r.createElement(tt, { type: "submit", variant: "primary" }, "Select Path")))
1842
1842
  ));
@@ -1871,9 +1871,9 @@ function Ya({
1871
1871
  mimeType: c,
1872
1872
  dataUrl: f,
1873
1873
  downloadUrl: l,
1874
- showHeader: T = !0
1874
+ showHeader: R = !0
1875
1875
  }) {
1876
- const { isImage: d, isVideo: k, isAudio: D } = _n(c), A = T !== !1, h = !!(l && n), _ = () => h ? /* @__PURE__ */ r.createElement(
1876
+ const { isImage: d, isVideo: P, isAudio: A } = _n(c), T = R !== !1, v = !!(l && n), D = () => v ? /* @__PURE__ */ r.createElement(
1877
1877
  "a",
1878
1878
  {
1879
1879
  className: Be.downloadLink,
@@ -1881,14 +1881,14 @@ function Ya({
1881
1881
  download: n
1882
1882
  },
1883
1883
  "Download"
1884
- ) : null, F = () => d ? /* @__PURE__ */ r.createElement(
1884
+ ) : null, _ = () => d ? /* @__PURE__ */ r.createElement(
1885
1885
  "img",
1886
1886
  {
1887
1887
  className: Be.imagePreview,
1888
1888
  src: f,
1889
1889
  alt: n || "Preview"
1890
1890
  }
1891
- ) : k ? /* @__PURE__ */ r.createElement(
1891
+ ) : P ? /* @__PURE__ */ r.createElement(
1892
1892
  "video",
1893
1893
  {
1894
1894
  className: Be.videoPreview,
@@ -1897,14 +1897,14 @@ function Ya({
1897
1897
  },
1898
1898
  /* @__PURE__ */ r.createElement("source", { src: f, type: c }),
1899
1899
  "Your browser does not support the video tag."
1900
- ) : D ? /* @__PURE__ */ r.createElement("audio", { className: Be.audioPreview, controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: f, type: c }), "Your browser does not support the audio tag.") : /* @__PURE__ */ r.createElement("div", { className: Be.unsupportedMessage }, /* @__PURE__ */ r.createElement("p", null, "Preview unavailable for this file type."), h ? /* @__PURE__ */ r.createElement("p", null, _()) : /* @__PURE__ */ r.createElement("p", null, "Download the file to inspect its contents."));
1901
- return /* @__PURE__ */ r.createElement("div", { className: Be.container }, A && /* @__PURE__ */ r.createElement("div", { className: Be.header }, /* @__PURE__ */ r.createElement("span", { className: Be.filename, title: n }, n), _()), /* @__PURE__ */ r.createElement("div", { className: Be.previewArea }, F()), !A && h && /* @__PURE__ */ r.createElement("div", { className: Be.actions }, _()));
1900
+ ) : A ? /* @__PURE__ */ r.createElement("audio", { className: Be.audioPreview, controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: f, type: c }), "Your browser does not support the audio tag.") : /* @__PURE__ */ r.createElement("div", { className: Be.unsupportedMessage }, /* @__PURE__ */ r.createElement("p", null, "Preview unavailable for this file type."), v ? /* @__PURE__ */ r.createElement("p", null, D()) : /* @__PURE__ */ r.createElement("p", null, "Download the file to inspect its contents."));
1901
+ return /* @__PURE__ */ r.createElement("div", { className: Be.container }, T && /* @__PURE__ */ r.createElement("div", { className: Be.header }, /* @__PURE__ */ r.createElement("span", { className: Be.filename, title: n }, n), D()), /* @__PURE__ */ r.createElement("div", { className: Be.previewArea }, _()), !T && v && /* @__PURE__ */ r.createElement("div", { className: Be.actions }, D()));
1902
1902
  }
1903
1903
  const At = /* @__PURE__ */ new Map(), bn = async (n) => {
1904
- var T;
1904
+ var R;
1905
1905
  if (!n)
1906
1906
  return ut();
1907
- const c = (T = n.split(".").pop()) == null ? void 0 : T.toLowerCase();
1907
+ const c = (R = n.split(".").pop()) == null ? void 0 : R.toLowerCase();
1908
1908
  if (!c || c === "php")
1909
1909
  return ut();
1910
1910
  const f = n;
@@ -1960,12 +1960,12 @@ class xn {
1960
1960
  x: c.clientX,
1961
1961
  y: c.clientY
1962
1962
  }) === null) {
1963
- const T = this.view.state.doc.length, d = gt.create([
1964
- gt.range(T, T)
1963
+ const R = this.view.state.doc.length, d = gt.create([
1964
+ gt.range(R, R)
1965
1965
  ]);
1966
1966
  this.view.dispatch({
1967
1967
  selection: d,
1968
- effects: ct.scrollIntoView(T, {
1968
+ effects: ct.scrollIntoView(R, {
1969
1969
  y: "center"
1970
1970
  })
1971
1971
  }), this.view.focus(), c.preventDefault();
@@ -1982,52 +1982,53 @@ const Cn = dr.define(
1982
1982
  code: c,
1983
1983
  onChange: f,
1984
1984
  currentPath: l,
1985
- className: T,
1986
- onSaveShortcut: d,
1987
- readOnly: k = !1,
1988
- additionalExtensions: D
1989
- }, A) {
1990
- const h = V(
1985
+ language: R,
1986
+ className: d,
1987
+ onSaveShortcut: P,
1988
+ readOnly: A = !1,
1989
+ additionalExtensions: T
1990
+ }, v) {
1991
+ const D = M(
1991
1992
  null
1992
- ), _ = V(null), F = V(new Tt()), S = V(new Tt()), K = V(new Tt()), B = V(c), C = V(f), G = V(!1);
1993
- return Wt(A, () => ({
1993
+ ), _ = M(null), k = M(new Tt()), Z = M(new Tt()), j = M(new Tt()), x = M(c), K = M(f), W = M(!1);
1994
+ return Wt(v, () => ({
1994
1995
  focus: () => {
1995
- var y;
1996
- (y = _.current) == null || y.focus();
1996
+ var m;
1997
+ (m = _.current) == null || m.focus();
1997
1998
  },
1998
1999
  blur: () => {
1999
- const y = _.current;
2000
- y && y.contentDOM.blur();
2000
+ const m = _.current;
2001
+ m && m.contentDOM.blur();
2001
2002
  },
2002
2003
  getCursorPosition: () => _.current ? _.current.state.selection.main.anchor : null,
2003
- setCursorPosition: (y) => {
2004
+ setCursorPosition: (m) => {
2004
2005
  if (!_.current)
2005
2006
  return;
2006
- const x = Math.min(
2007
- y,
2007
+ const V = Math.min(
2008
+ m,
2008
2009
  _.current.state.doc.length
2009
- ), z = gt.create([
2010
- gt.range(x, x)
2010
+ ), J = gt.create([
2011
+ gt.range(V, V)
2011
2012
  ]);
2012
2013
  _.current.dispatch({
2013
- selection: z,
2014
+ selection: J,
2014
2015
  scrollIntoView: !0
2015
2016
  });
2016
2017
  }
2017
- })), W(() => {
2018
- B.current = c;
2019
- }, [c]), W(() => {
2020
- C.current = f;
2021
- }, [f]), W(() => {
2018
+ })), H(() => {
2019
+ x.current = c;
2020
+ }, [c]), H(() => {
2021
+ K.current = f;
2022
+ }, [f]), H(() => {
2022
2023
  if (_.current)
2023
2024
  return;
2024
- const y = h.current;
2025
- if (!y)
2025
+ const m = D.current;
2026
+ if (!m)
2026
2027
  return;
2027
- const x = fr.create({
2028
+ const V = fr.create({
2028
2029
  doc: c,
2029
2030
  extensions: [
2030
- K.current.of(D ?? []),
2031
+ j.current.of(T ?? []),
2031
2032
  mr(),
2032
2033
  pr(),
2033
2034
  hr(),
@@ -2036,9 +2037,9 @@ const Cn = dr.define(
2036
2037
  wr(),
2037
2038
  gr(),
2038
2039
  Cn,
2039
- F.current.of(ut()),
2040
- S.current.of(
2041
- ct.editable.of(!k)
2040
+ k.current.of(R ?? ut()),
2041
+ Z.current.of(
2042
+ ct.editable.of(!A)
2042
2043
  ),
2043
2044
  Ar(Nr),
2044
2045
  Fr(),
@@ -2047,17 +2048,17 @@ const Cn = dr.define(
2047
2048
  yr(),
2048
2049
  Cr(),
2049
2050
  Pr(),
2050
- ct.updateListener.of((J) => {
2051
- if (!J.docChanged)
2051
+ ct.updateListener.of((ce) => {
2052
+ if (!ce.docChanged)
2052
2053
  return;
2053
- const oe = J.state.doc.toString();
2054
- oe !== B.current && (B.current = oe, C.current(oe));
2054
+ const Q = ce.state.doc.toString();
2055
+ Q !== x.current && (x.current = Q, K.current(Q));
2055
2056
  }),
2056
2057
  Er.of([
2057
2058
  {
2058
2059
  key: "Mod-s",
2059
2060
  preventDefault: !0,
2060
- run: () => (d == null || d(), !0)
2061
+ run: () => (P == null || P(), !0)
2061
2062
  },
2062
2063
  ...Sr,
2063
2064
  ...Tr,
@@ -2068,53 +2069,59 @@ const Cn = dr.define(
2068
2069
  xr
2069
2070
  ])
2070
2071
  ]
2071
- }), z = new ct({ state: x, parent: y });
2072
- return _.current = z, () => {
2073
- z.destroy(), _.current = null;
2072
+ }), J = new ct({ state: V, parent: m });
2073
+ return _.current = J, () => {
2074
+ J.destroy(), _.current = null;
2074
2075
  };
2075
- }, []), W(() => {
2076
- const y = _.current;
2077
- y && y.dispatch({
2078
- effects: K.current.reconfigure(
2079
- D ?? []
2076
+ }, []), H(() => {
2077
+ const m = _.current;
2078
+ m && m.dispatch({
2079
+ effects: j.current.reconfigure(
2080
+ T ?? []
2080
2081
  )
2081
2082
  });
2082
- }, [D]), W(() => {
2083
- const y = _.current;
2084
- if (!y)
2083
+ }, [T]), H(() => {
2084
+ const m = _.current;
2085
+ if (!m)
2085
2086
  return;
2086
- const x = y.state.doc.toString();
2087
- c !== x && y.dispatch({
2088
- changes: { from: 0, to: y.state.doc.length, insert: c }
2087
+ const V = m.state.doc.toString();
2088
+ c !== V && m.dispatch({
2089
+ changes: { from: 0, to: m.state.doc.length, insert: c }
2089
2090
  });
2090
- }, [c]), W(() => {
2091
- var oe;
2092
- const y = _.current;
2093
- if (!y)
2091
+ }, [c]), H(() => {
2092
+ var Q;
2093
+ const m = _.current;
2094
+ if (!m)
2094
2095
  return;
2095
- const x = (oe = l == null ? void 0 : l.split(".").pop()) == null ? void 0 : oe.toLowerCase();
2096
- (!x || x === "php") && y.dispatch({
2097
- effects: F.current.reconfigure(ut())
2096
+ if (R) {
2097
+ m.dispatch({
2098
+ effects: k.current.reconfigure(R)
2099
+ });
2100
+ return;
2101
+ }
2102
+ const V = (Q = l == null ? void 0 : l.split(".").pop()) == null ? void 0 : Q.toLowerCase();
2103
+ (!V || V === "php") && m.dispatch({
2104
+ effects: k.current.reconfigure(ut())
2098
2105
  });
2099
- let J = !1;
2100
- return bn(l).then((de) => {
2101
- J || !_.current || _.current.dispatch({
2102
- effects: F.current.reconfigure(de)
2106
+ let ce = !1;
2107
+ return bn(l).then((g) => {
2108
+ ce || !_.current || _.current.dispatch({
2109
+ effects: k.current.reconfigure(g)
2103
2110
  });
2104
2111
  }), () => {
2105
- J = !0;
2112
+ ce = !0;
2106
2113
  };
2107
- }, [l]), W(() => {
2108
- const y = _.current;
2109
- y && (y.hasFocus && (G.current = !0), y.dispatch({
2110
- effects: S.current.reconfigure(
2111
- ct.editable.of(!k)
2114
+ }, [l, R]), H(() => {
2115
+ const m = _.current;
2116
+ m && (m.hasFocus && (W.current = !0), m.dispatch({
2117
+ effects: Z.current.reconfigure(
2118
+ ct.editable.of(!A)
2112
2119
  )
2113
2120
  }));
2114
- }, [k]), qt(() => {
2115
- const y = _.current;
2116
- y && G.current && !y.hasFocus && (y.focus(), G.current = !1);
2117
- }, [l, k]), /* @__PURE__ */ r.createElement("div", { ref: h, className: T });
2121
+ }, [A]), qt(() => {
2122
+ const m = _.current;
2123
+ m && W.current && !m.hasFocus && (m.focus(), W.current = !1);
2124
+ }, [l, A]), /* @__PURE__ */ r.createElement("div", { ref: D, className: d });
2118
2125
  }
2119
2126
  );
2120
2127
  Gt.displayName = "CodeEditor";
@@ -2161,20 +2168,20 @@ function Mn(n) {
2161
2168
  }
2162
2169
  async function jn(n, c) {
2163
2170
  const f = n.stream().getReader(), l = [];
2164
- let T = 0;
2171
+ let R = 0;
2165
2172
  try {
2166
2173
  for (; ; ) {
2167
- const { done: d, value: k } = await f.read();
2174
+ const { done: d, value: P } = await f.read();
2168
2175
  if (d)
2169
2176
  return {
2170
2177
  type: "inline",
2171
2178
  data: Qt(l)
2172
2179
  };
2173
- if (k) {
2174
- if (T += k.byteLength, T > c)
2180
+ if (P) {
2181
+ if (R += P.byteLength, R > c)
2175
2182
  return await f.cancel().catch(() => {
2176
2183
  }), { type: "too-large" };
2177
- l.push(k);
2184
+ l.push(P);
2178
2185
  }
2179
2186
  }
2180
2187
  } finally {
@@ -2190,107 +2197,107 @@ function Wn({
2190
2197
  currentPath: c,
2191
2198
  selectedDirPath: f,
2192
2199
  setSelectedDirPath: l,
2193
- onFileOpened: T,
2200
+ onFileOpened: R,
2194
2201
  onSelectionCleared: d,
2195
- onShowMessage: k,
2196
- documentRoot: D,
2197
- readOnly: A = !1,
2198
- title: h = "Files",
2199
- mobileSubsectionTitle: _,
2200
- showBinaryPreviewHeader: F = !0,
2201
- dockPresentation: S = !1,
2202
- useWordPressTooltips: K = !1
2202
+ onShowMessage: P,
2203
+ documentRoot: A,
2204
+ readOnly: T = !1,
2205
+ title: v = "Files",
2206
+ mobileSubsectionTitle: D,
2207
+ showBinaryPreviewHeader: _ = !0,
2208
+ dockPresentation: k = !1,
2209
+ useWordPressTooltips: Z = !1
2203
2210
  }) {
2204
- const B = V(null), C = V(null), G = Ft(() => c ? Le(c) : f ?? D, [c, D]), [y, x] = ee(!1);
2205
- W(() => {
2206
- !c || !B.current || (l(Le(c)), B.current.focusPath(c, {
2211
+ const j = M(null), x = M(null), K = Ft(() => c ? Le(c) : f ?? A, [c, A]), [W, m] = te(!1);
2212
+ H(() => {
2213
+ !c || !j.current || (l(Le(c)), j.current.focusPath(c, {
2207
2214
  select: !0,
2208
2215
  domFocus: !1,
2209
2216
  notify: !1
2210
- }), B.current.expandToPath(c));
2217
+ }), j.current.expandToPath(c));
2211
2218
  }, [c, l]);
2212
- const z = async (g, $) => {
2219
+ const V = async (g, $) => {
2213
2220
  try {
2214
- const N = await n.read(g), p = await Bn(N);
2215
- if (p.type === "too-large") {
2216
- const L = Yt / 1024 / 1024;
2217
- if (!S) {
2218
- await k(
2221
+ const N = await n.read(g), h = await Bn(N);
2222
+ if (h.type === "too-large") {
2223
+ const I = Yt / 1024 / 1024;
2224
+ if (!k) {
2225
+ await P(
2219
2226
  g,
2220
- /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, `File too large to open (>${L}MB).`), /* @__PURE__ */ r.createElement("p", null, "Open or download it outside the in-browser editor."))
2227
+ /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, `File too large to open (>${I}MB).`), /* @__PURE__ */ r.createElement("p", null, "Open or download it outside the in-browser editor."))
2221
2228
  );
2222
2229
  return;
2223
2230
  }
2224
- const Q = et(g) || "download";
2225
- await k(
2231
+ const ee = et(g) || "download";
2232
+ await P(
2226
2233
  g,
2227
- /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, `File too large to open (>${L}MB).`), /* @__PURE__ */ r.createElement("p", null, /* @__PURE__ */ r.createElement(
2234
+ /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, `File too large to open (>${I}MB).`), /* @__PURE__ */ r.createElement("p", null, /* @__PURE__ */ r.createElement(
2228
2235
  tt,
2229
2236
  {
2230
2237
  type: "button",
2231
2238
  variant: "link",
2232
2239
  onClick: () => {
2233
- J(g, Q);
2240
+ J(g, ee);
2234
2241
  }
2235
2242
  },
2236
2243
  "Download ",
2237
- Q
2244
+ ee
2238
2245
  )))
2239
2246
  );
2240
2247
  return;
2241
2248
  }
2242
- const M = p.data, Y = et(g) || "download";
2243
- if (On(M)) {
2244
- const L = Vn(Y), { url: Q, filename: X } = Vt(
2245
- M,
2246
- Y
2249
+ const O = h.data, G = et(g) || "download";
2250
+ if (On(O)) {
2251
+ const I = Vn(G), { url: ee, filename: X } = Vt(
2252
+ O,
2253
+ G
2247
2254
  );
2248
- if ($n(L)) {
2249
- const ve = new Blob([M], { type: L }), me = URL.createObjectURL(ve);
2250
- await k(
2255
+ if ($n(I)) {
2256
+ const ve = new Blob([O], { type: I }), me = URL.createObjectURL(ve);
2257
+ await P(
2251
2258
  g,
2252
2259
  /* @__PURE__ */ r.createElement(
2253
2260
  Br,
2254
2261
  {
2255
2262
  filename: X,
2256
- mimeType: L,
2263
+ mimeType: I,
2257
2264
  dataUrl: me,
2258
- downloadUrl: Q,
2259
- showHeader: F
2265
+ downloadUrl: ee,
2266
+ showHeader: _
2260
2267
  }
2261
2268
  )
2262
2269
  );
2263
2270
  return;
2264
2271
  }
2265
- await k(
2272
+ await P(
2266
2273
  g,
2267
- /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, "Binary file. Cannot be edited."), /* @__PURE__ */ r.createElement("p", null, /* @__PURE__ */ r.createElement("a", { href: Q, download: X }, "Download ", X)))
2274
+ /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, "Binary file. Cannot be edited."), /* @__PURE__ */ r.createElement("p", null, /* @__PURE__ */ r.createElement("a", { href: ee, download: X }, "Download ", X)))
2268
2275
  );
2269
2276
  return;
2270
2277
  }
2271
- const te = new TextDecoder("utf-8").decode(M);
2272
- await T(g, te, $);
2278
+ const re = new TextDecoder("utf-8").decode(O);
2279
+ await R(g, re, $);
2273
2280
  } catch (N) {
2274
- Xe.error("Could not open file", N), await k(null, "Could not open file.");
2281
+ Xe.error("Could not open file", N), await P(null, "Could not open file.");
2275
2282
  }
2276
2283
  }, J = async (g, $) => {
2277
2284
  try {
2278
- const N = await n.read(g), p = new Uint8Array(await N.arrayBuffer()), { url: M } = Vt(p, $), Y = document.createElement("a");
2279
- Y.href = M, Y.download = $, document.body.appendChild(Y), Y.click(), document.body.removeChild(Y);
2285
+ const N = await n.read(g), h = new Uint8Array(await N.arrayBuffer()), { url: O } = Vt(h, $), G = document.createElement("a");
2286
+ G.href = O, G.download = $, document.body.appendChild(G), G.click(), document.body.removeChild(G);
2280
2287
  } catch (N) {
2281
- Xe.error("Could not download file", N), await k(g, "Could not download file.");
2288
+ Xe.error("Could not download file", N), await P(g, "Could not download file.");
2282
2289
  }
2283
- }, oe = (g) => {
2290
+ }, ce = (g) => {
2284
2291
  var N;
2285
2292
  const $ = Array.from(g.target.files ?? []);
2286
- g.target.value = "", $.length !== 0 && ((N = B.current) == null || N.importFiles($, f ?? D).catch((p) => Xe.error("Failed to import files", p)));
2287
- }, de = (g) => {
2293
+ g.target.value = "", $.length !== 0 && ((N = j.current) == null || N.importFiles($, f ?? A).catch((h) => Xe.error("Failed to import files", h)));
2294
+ }, Q = (g) => {
2288
2295
  var $;
2289
2296
  g.dataTransfer.types.includes(
2290
2297
  "application/x-wp-playground-path"
2291
- ) || (g.preventDefault(), !A && (($ = B.current) == null || $.importDataTransfer(
2298
+ ) || (g.preventDefault(), !T && (($ = j.current) == null || $.importDataTransfer(
2292
2299
  g.dataTransfer,
2293
- f ?? D
2300
+ f ?? A
2294
2301
  ).catch(
2295
2302
  (N) => Xe.error("Failed to import dropped files", N)
2296
2303
  )));
@@ -2299,31 +2306,31 @@ function Wn({
2299
2306
  "div",
2300
2307
  {
2301
2308
  className: De(ye.fileExplorerContainer, {
2302
- [ye.dropActive]: y,
2303
- [ye.dockPresentation]: S
2309
+ [ye.dropActive]: W,
2310
+ [ye.dockPresentation]: k
2304
2311
  }),
2305
2312
  onDragEnter: (g) => {
2306
2313
  g.dataTransfer.types.includes(
2307
2314
  "application/x-wp-playground-path"
2308
- ) || (g.preventDefault(), A || x(!0));
2315
+ ) || (g.preventDefault(), T || m(!0));
2309
2316
  },
2310
2317
  onDragOver: (g) => {
2311
2318
  g.dataTransfer.types.includes(
2312
2319
  "application/x-wp-playground-path"
2313
- ) || (g.preventDefault(), g.dataTransfer.dropEffect = A ? "none" : "copy");
2320
+ ) || (g.preventDefault(), g.dataTransfer.dropEffect = T ? "none" : "copy");
2314
2321
  },
2315
2322
  onDragLeave: (g) => {
2316
2323
  const $ = g.relatedTarget;
2317
- (!$ || !g.currentTarget.contains($)) && x(!1);
2324
+ (!$ || !g.currentTarget.contains($)) && m(!1);
2318
2325
  },
2319
- onDropCapture: () => x(!1),
2320
- onDrop: de
2326
+ onDropCapture: () => m(!1),
2327
+ onDrop: Q
2321
2328
  },
2322
- /* @__PURE__ */ r.createElement("div", { className: ye.fileExplorerHeader }, /* @__PURE__ */ r.createElement("span", { className: ye.fileExplorerTitle }, h), _ ? /* @__PURE__ */ r.createElement("span", { className: ye.fileExplorerSubsectionTitle }, _) : null, A ? null : /* @__PURE__ */ r.createElement("div", { className: ye.fileExplorerActions }, /* @__PURE__ */ r.createElement(
2329
+ /* @__PURE__ */ r.createElement("div", { className: ye.fileExplorerHeader }, /* @__PURE__ */ r.createElement("span", { className: ye.fileExplorerTitle }, v), D ? /* @__PURE__ */ r.createElement("span", { className: ye.fileExplorerSubsectionTitle }, D) : null, T ? null : /* @__PURE__ */ r.createElement("div", { className: ye.fileExplorerActions }, /* @__PURE__ */ r.createElement(
2323
2330
  Nt,
2324
2331
  {
2325
2332
  label: "Create new file",
2326
- useWordPressTooltip: K
2333
+ useWordPressTooltip: Z
2327
2334
  },
2328
2335
  /* @__PURE__ */ r.createElement(
2329
2336
  "button",
@@ -2334,18 +2341,18 @@ function Wn({
2334
2341
  ),
2335
2342
  type: "button",
2336
2343
  onClick: () => {
2337
- B.current && B.current.createFile();
2344
+ j.current && j.current.createFile();
2338
2345
  },
2339
2346
  "aria-label": "Create new file",
2340
- title: K ? void 0 : "Create new file"
2347
+ title: Z ? void 0 : "Create new file"
2341
2348
  },
2342
- S ? /* @__PURE__ */ r.createElement(Hn, null) : /* @__PURE__ */ r.createElement(St, { icon: Gr, size: 20 })
2349
+ k ? /* @__PURE__ */ r.createElement(Hn, null) : /* @__PURE__ */ r.createElement(St, { icon: Gr, size: 20 })
2343
2350
  )
2344
2351
  ), /* @__PURE__ */ r.createElement(
2345
2352
  Nt,
2346
2353
  {
2347
2354
  label: "Create new folder",
2348
- useWordPressTooltip: K
2355
+ useWordPressTooltip: Z
2349
2356
  },
2350
2357
  /* @__PURE__ */ r.createElement(
2351
2358
  "button",
@@ -2356,18 +2363,18 @@ function Wn({
2356
2363
  ),
2357
2364
  type: "button",
2358
2365
  onClick: () => {
2359
- B.current && B.current.createFolder();
2366
+ j.current && j.current.createFolder();
2360
2367
  },
2361
2368
  "aria-label": "Create new folder",
2362
- title: K ? void 0 : "Create new folder"
2369
+ title: Z ? void 0 : "Create new folder"
2363
2370
  },
2364
- S ? /* @__PURE__ */ r.createElement(Un, null) : /* @__PURE__ */ r.createElement(St, { icon: zr, size: 20 })
2371
+ k ? /* @__PURE__ */ r.createElement(Un, null) : /* @__PURE__ */ r.createElement(St, { icon: zr, size: 20 })
2365
2372
  )
2366
2373
  ), /* @__PURE__ */ r.createElement(
2367
2374
  Nt,
2368
2375
  {
2369
2376
  label: "Upload files",
2370
- useWordPressTooltip: K
2377
+ useWordPressTooltip: Z
2371
2378
  },
2372
2379
  /* @__PURE__ */ r.createElement(
2373
2380
  "button",
@@ -2380,40 +2387,40 @@ function Wn({
2380
2387
  type: "button",
2381
2388
  onClick: () => {
2382
2389
  var g;
2383
- return (g = C.current) == null ? void 0 : g.click();
2390
+ return (g = x.current) == null ? void 0 : g.click();
2384
2391
  },
2385
2392
  "aria-label": "Upload files",
2386
- title: K ? void 0 : "Upload files"
2393
+ title: Z ? void 0 : "Upload files"
2387
2394
  },
2388
2395
  /* @__PURE__ */ r.createElement(
2389
2396
  St,
2390
2397
  {
2391
2398
  icon: Yr,
2392
- size: S ? 16 : 20
2399
+ size: k ? 16 : 20
2393
2400
  }
2394
2401
  )
2395
2402
  )
2396
2403
  ), /* @__PURE__ */ r.createElement(
2397
2404
  "input",
2398
2405
  {
2399
- ref: C,
2406
+ ref: x,
2400
2407
  type: "file",
2401
2408
  multiple: !0,
2402
2409
  style: { display: "none" },
2403
- onChange: oe
2410
+ onChange: ce
2404
2411
  }
2405
2412
  ))),
2406
2413
  /* @__PURE__ */ r.createElement("div", { className: ye.fileExplorerTree }, /* @__PURE__ */ r.createElement(
2407
2414
  Or,
2408
2415
  {
2409
- ref: B,
2410
- readOnly: A,
2416
+ ref: j,
2417
+ readOnly: T,
2411
2418
  filesystem: n,
2412
- root: D,
2413
- initialSelectedPath: G,
2419
+ root: A,
2420
+ initialSelectedPath: K,
2414
2421
  onSelect: async (g) => {
2415
2422
  if (!g) {
2416
- l(D), await d();
2423
+ l(A), await d();
2417
2424
  return;
2418
2425
  }
2419
2426
  try {
@@ -2423,10 +2430,10 @@ function Wn({
2423
2430
  }
2424
2431
  } catch {
2425
2432
  }
2426
- l(Le(g)), await z(g, !1);
2433
+ l(Le(g)), await V(g, !1);
2427
2434
  },
2428
2435
  onDoubleClickFile: async (g) => {
2429
- await z(g, !0);
2436
+ await V(g, !0);
2430
2437
  }
2431
2438
  }
2432
2439
  ))
@@ -2519,7 +2526,7 @@ const Hn = () => /* @__PURE__ */ r.createElement("svg", { viewBox: "0 0 32 32",
2519
2526
  dockSaveButton: ma,
2520
2527
  sidebarOpen: pa,
2521
2528
  editorHeaderPathPortaled: ha
2522
- }, va = 1500, wa = 700, ga = 1e3, O = {
2529
+ }, va = 1500, wa = 700, ga = 1e3, L = {
2523
2530
  IDLE: "idle",
2524
2531
  PENDING: "pending",
2525
2532
  SAVING: "saving",
@@ -2531,46 +2538,46 @@ function Za({
2531
2538
  isVisible: c = !0,
2532
2539
  documentRoot: f,
2533
2540
  initialPath: l = null,
2534
- placeholderText: T = "Select a file to view or edit its contents.",
2541
+ placeholderText: R = "Select a file to view or edit its contents.",
2535
2542
  dockPresentation: d = !1,
2536
- mobileHeaderTarget: k = null
2543
+ mobileHeaderTarget: P = null
2537
2544
  }) {
2538
- const [D, A] = ee(
2545
+ const [A, T] = te(
2539
2546
  f
2540
- ), [h, _] = ee(null), [F, S] = ee(""), [K, B] = ee(!0), [C, G] = ee(O.IDLE), [y, x] = ee(null), [z, J] = ee("idle"), [oe, de] = ee(!1), [g, $] = ee(null), N = V(null), p = V(null), M = V(!1), Y = V(h), te = V(
2547
+ ), [v, D] = te(null), [_, k] = te(""), [Z, j] = te(!0), [x, K] = te(L.IDLE), [W, m] = te(null), [V, J] = te("idle"), [ce, Q] = te(!1), [g, $] = te(null), N = M(null), h = M(null), O = M(!1), G = M(v), re = M(
2541
2548
  n
2542
- ), L = V(null), Q = V(null), X = V(
2549
+ ), I = M(null), ee = M(null), X = M(
2543
2550
  /* @__PURE__ */ new WeakMap()
2544
- ), ve = V(!0), me = V(/* @__PURE__ */ new Map()), Ne = V(!1);
2545
- te.current = n, W(() => {
2546
- Y.current = h;
2547
- }, [h]);
2551
+ ), ve = M(!0), me = M(/* @__PURE__ */ new Map()), Ne = M(!1);
2552
+ re.current = n, H(() => {
2553
+ G.current = v;
2554
+ }, [v]);
2548
2555
  const Pe = Ue(async (b) => {
2549
- const { filesystem: P, path: ie, content: le } = b, ce = Q.current === b, be = X.current, ge = (be.get(P) ?? Promise.resolve()).catch(() => {
2550
- }).then(() => P.writeFile(ie, le));
2551
- be.set(P, ge);
2556
+ const { filesystem: S, path: ie, content: le } = b, ue = ee.current === b, be = X.current, ge = (be.get(S) ?? Promise.resolve()).catch(() => {
2557
+ }).then(() => S.writeFile(ie, le));
2558
+ be.set(S, ge);
2552
2559
  let Ie = !1;
2553
2560
  try {
2554
2561
  await ge;
2555
2562
  } catch (Ge) {
2556
2563
  Ie = !0, Xe.error("Failed to save file", Ge);
2557
2564
  }
2558
- const at = ve.current && be.get(P) === ge && te.current === P && Y.current === ie && L.current === null;
2559
- be.get(P) === ge && be.delete(P), Q.current === b && (Q.current = null), at && (G(Ie ? O.ERROR : O.SAVED), x(
2565
+ const at = ve.current && be.get(S) === ge && re.current === S && G.current === ie && I.current === null;
2566
+ be.get(S) === ge && be.delete(S), ee.current === b && (ee.current = null), at && (K(Ie ? L.ERROR : L.SAVED), m(
2560
2567
  Ie ? "Could not save changes. Try again." : null
2561
- ), ce && J(Ie ? "idle" : "saved"));
2562
- }, []), re = Ue(() => {
2563
- const b = L.current;
2564
- b && (p.current !== null && (window.clearTimeout(p.current), p.current = null), L.current = null, Pe(b));
2568
+ ), ue && J(Ie ? "idle" : "saved"));
2569
+ }, []), ne = Ue(() => {
2570
+ const b = I.current;
2571
+ b && (h.current !== null && (window.clearTimeout(h.current), h.current = null), I.current = null, Pe(b));
2565
2572
  }, [Pe]);
2566
- W(() => (ve.current = !0, () => {
2573
+ H(() => (ve.current = !0, () => {
2567
2574
  ve.current = !1;
2568
- }), []), W(() => () => {
2575
+ }), []), H(() => () => {
2569
2576
  var b;
2570
- ((b = L.current) == null ? void 0 : b.filesystem) === n && re();
2571
- }, [f, n, re]), W(() => {
2572
- M.current = !0, A(f), S(""), _(null), B(!0), G(O.IDLE), x(null), de(!1), $(null), me.current.clear(), Ne.current = !1;
2573
- }, [f, n]), W(() => {
2577
+ ((b = I.current) == null ? void 0 : b.filesystem) === n && ne();
2578
+ }, [f, n, ne]), H(() => {
2579
+ O.current = !0, T(f), k(""), D(null), j(!0), K(L.IDLE), m(null), Q(!1), $(null), me.current.clear(), Ne.current = !1;
2580
+ }, [f, n]), H(() => {
2574
2581
  if (!n || !l || Ne.current)
2575
2582
  return;
2576
2583
  let b = !1;
@@ -2580,9 +2587,9 @@ function Za({
2580
2587
  const le = await n.readFileAsText(l);
2581
2588
  if (b)
2582
2589
  return;
2583
- M.current = !0, _(l), S(le), B(!1), G(O.IDLE), x(null), setTimeout(() => {
2584
- var ce;
2585
- (ce = N.current) == null || ce.focus();
2590
+ O.current = !0, D(l), k(le), j(!1), K(L.IDLE), m(null), setTimeout(() => {
2591
+ var ue;
2592
+ (ue = N.current) == null || ue.focus();
2586
2593
  }, 100);
2587
2594
  }
2588
2595
  } catch (ie) {
@@ -2593,66 +2600,66 @@ function Za({
2593
2600
  })(), () => {
2594
2601
  b = !0;
2595
2602
  };
2596
- }, [n, l]), W(() => {
2597
- if (!n || !h) {
2598
- p.current !== null && (window.clearTimeout(p.current), p.current = null), L.current = null, h || G(O.IDLE);
2603
+ }, [n, l]), H(() => {
2604
+ if (!n || !v) {
2605
+ h.current !== null && (window.clearTimeout(h.current), h.current = null), I.current = null, v || K(L.IDLE);
2599
2606
  return;
2600
2607
  }
2601
- if (M.current) {
2602
- M.current = !1, L.current = null;
2608
+ if (O.current) {
2609
+ O.current = !1, I.current = null;
2603
2610
  return;
2604
2611
  }
2605
- p.current !== null && (window.clearTimeout(p.current), p.current = null), G(O.PENDING);
2612
+ h.current !== null && (window.clearTimeout(h.current), h.current = null), K(L.PENDING);
2606
2613
  const b = {
2607
2614
  filesystem: n,
2608
- path: h,
2609
- content: F
2615
+ path: v,
2616
+ content: _
2610
2617
  };
2611
- L.current = b;
2612
- const P = window.setTimeout(() => {
2613
- L.current === b && (p.current = null, L.current = null, G(O.SAVING), Pe(b));
2618
+ I.current = b;
2619
+ const S = window.setTimeout(() => {
2620
+ I.current === b && (h.current = null, I.current = null, K(L.SAVING), Pe(b));
2614
2621
  }, va);
2615
- return p.current = P, () => {
2616
- p.current === P && (window.clearTimeout(P), p.current = null);
2622
+ return h.current = S, () => {
2623
+ h.current === S && (window.clearTimeout(S), h.current = null);
2617
2624
  };
2618
- }, [F, h, n, Pe]), W(() => {
2619
- if (C !== O.SAVED)
2625
+ }, [_, v, n, Pe]), H(() => {
2626
+ if (x !== L.SAVED)
2620
2627
  return;
2621
2628
  const b = window.setTimeout(() => {
2622
- G(
2623
- (P) => P === O.SAVED ? O.IDLE : P
2629
+ K(
2630
+ (S) => S === L.SAVED ? L.IDLE : S
2624
2631
  );
2625
2632
  }, 2e3);
2626
2633
  return () => window.clearTimeout(b);
2627
- }, [C]), W(() => {
2628
- z === "idle" || C === O.SAVING || C === O.SAVED || J("idle");
2629
- }, [z, C]), W(() => {
2630
- if (z !== "saved")
2634
+ }, [x]), H(() => {
2635
+ V === "idle" || x === L.SAVING || x === L.SAVED || J("idle");
2636
+ }, [V, x]), H(() => {
2637
+ if (V !== "saved")
2631
2638
  return;
2632
2639
  const b = window.setTimeout(
2633
2640
  () => J("idle"),
2634
2641
  ga
2635
2642
  );
2636
2643
  return () => window.clearTimeout(b);
2637
- }, [z]), W(() => {
2638
- if (z !== "waiting")
2644
+ }, [V]), H(() => {
2645
+ if (V !== "waiting")
2639
2646
  return;
2640
2647
  const b = window.setTimeout(
2641
2648
  () => J(
2642
- (P) => P === "waiting" ? "saving" : P
2649
+ (S) => S === "waiting" ? "saving" : S
2643
2650
  ),
2644
2651
  wa
2645
2652
  );
2646
2653
  return () => window.clearTimeout(b);
2647
- }, [z]);
2654
+ }, [V]);
2648
2655
  const Oe = Ue(
2649
- async (b, P, ie = !0) => {
2650
- var ce;
2651
- const le = (ce = N.current) == null ? void 0 : ce.getCursorPosition();
2652
- le != null && Y.current && me.current.set(
2653
- Y.current,
2656
+ async (b, S, ie = !0) => {
2657
+ var ue;
2658
+ const le = (ue = N.current) == null ? void 0 : ue.getCursorPosition();
2659
+ le != null && G.current && me.current.set(
2660
+ G.current,
2654
2661
  le
2655
- ), M.current = !0, _(b), S(P), $(null), B(!1), G(O.IDLE), x(null), de(!1), setTimeout(() => {
2662
+ ), O.current = !0, D(b), k(S), $(null), j(!1), K(L.IDLE), m(null), Q(!1), setTimeout(() => {
2656
2663
  var $e, ge, Ie;
2657
2664
  const be = me.current.get(b);
2658
2665
  be !== void 0 && (($e = N.current) == null || $e.setCursorPosition(be)), ie ? (ge = N.current) == null || ge.focus() : (Ie = N.current) == null || Ie.blur();
@@ -2660,52 +2667,52 @@ function Za({
2660
2667
  },
2661
2668
  []
2662
2669
  );
2663
- W(() => {
2670
+ H(() => {
2664
2671
  var ie;
2665
- if (!h)
2672
+ if (!v)
2666
2673
  return;
2667
2674
  const b = setInterval(() => {
2668
- var ce;
2669
- const le = (ce = N.current) == null ? void 0 : ce.getCursorPosition();
2670
- le != null && me.current.set(h, le);
2671
- }, 1e3), P = (ie = N.current) == null ? void 0 : ie.getCursorPosition();
2672
- return P != null && me.current.set(h, P), () => {
2673
- var ce;
2675
+ var ue;
2676
+ const le = (ue = N.current) == null ? void 0 : ue.getCursorPosition();
2677
+ le != null && me.current.set(v, le);
2678
+ }, 1e3), S = (ie = N.current) == null ? void 0 : ie.getCursorPosition();
2679
+ return S != null && me.current.set(v, S), () => {
2680
+ var ue;
2674
2681
  clearInterval(b);
2675
- const le = (ce = N.current) == null ? void 0 : ce.getCursorPosition();
2676
- le != null && me.current.set(h, le);
2682
+ const le = (ue = N.current) == null ? void 0 : ue.getCursorPosition();
2683
+ le != null && me.current.set(v, le);
2677
2684
  };
2678
- }, [h]), W(() => {
2679
- if (!c || !h)
2685
+ }, [v]), H(() => {
2686
+ if (!c || !v)
2680
2687
  return;
2681
2688
  const b = setTimeout(() => {
2682
2689
  var ie;
2683
- const P = me.current.get(h);
2684
- P !== void 0 && ((ie = N.current) == null || ie.setCursorPosition(P));
2690
+ const S = me.current.get(v);
2691
+ S !== void 0 && ((ie = N.current) == null || ie.setCursorPosition(S));
2685
2692
  }, 100);
2686
2693
  return () => clearTimeout(b);
2687
- }, [c, h]);
2688
- const ne = Ue(async () => {
2689
- var P;
2690
- const b = (P = N.current) == null ? void 0 : P.getCursorPosition();
2691
- b != null && Y.current && me.current.set(Y.current, b), M.current = !0, _(null), S(""), $(null), B(!0), G(O.IDLE), x(null);
2694
+ }, [c, v]);
2695
+ const ae = Ue(async () => {
2696
+ var S;
2697
+ const b = (S = N.current) == null ? void 0 : S.getCursorPosition();
2698
+ b != null && G.current && me.current.set(G.current, b), O.current = !0, D(null), k(""), $(null), j(!0), K(L.IDLE), m(null);
2692
2699
  }, []), Me = Ue(
2693
- async (b, P) => {
2694
- M.current = !0, _(null), typeof P == "string" ? (S(P), $(null)) : (S(""), $(P)), B(!0), G(O.IDLE), x(null), de(!1);
2700
+ async (b, S) => {
2701
+ O.current = !0, D(null), typeof S == "string" ? (k(S), $(null)) : (k(""), $(S)), j(!0), K(L.IDLE), m(null), Q(!1);
2695
2702
  },
2696
2703
  []
2697
2704
  ), _e = Ue(() => {
2698
- L.current && (Q.current = L.current, J("waiting"), G(O.SAVING), re());
2699
- }, [re]), ke = Ue(() => {
2700
- !L.current && C === O.ERROR && n && h && (L.current = {
2705
+ I.current && (ee.current = I.current, J("waiting"), K(L.SAVING), ne());
2706
+ }, [ne]), ke = Ue(() => {
2707
+ !I.current && x === L.ERROR && n && v && (I.current = {
2701
2708
  filesystem: n,
2702
- path: h,
2703
- content: F
2704
- }), L.current && (x(null), _e());
2705
- }, [F, h, n, _e, C]), Fe = Ea(C, y), Se = ya(C, q), fe = _a(C);
2706
- let H = "Save";
2707
- C === O.ERROR ? H = "Retry" : C === O.SAVED && z === "saved" ? H = "Saved" : C === O.SAVING && z === "saving" && (H = "Saving…");
2708
- const w = C === O.PENDING || C === O.SAVING || C === O.ERROR;
2709
+ path: v,
2710
+ content: _
2711
+ }), I.current && (m(null), _e());
2712
+ }, [_, v, n, _e, x]), Fe = Ea(x, W), Se = ya(x, q), de = _a(x);
2713
+ let U = "Save";
2714
+ x === L.ERROR ? U = "Retry" : x === L.SAVED && V === "saved" ? U = "Saved" : x === L.SAVING && V === "saving" && (U = "Saving…");
2715
+ const E = x === L.PENDING || x === L.SAVING || x === L.ERROR;
2709
2716
  if (!n)
2710
2717
  return /* @__PURE__ */ r.createElement(
2711
2718
  "div",
@@ -2714,16 +2721,16 @@ function Za({
2714
2721
  [q.dockPresentation]: d
2715
2722
  })
2716
2723
  },
2717
- /* @__PURE__ */ r.createElement("div", { className: q.placeholder }, T)
2724
+ /* @__PURE__ */ r.createElement("div", { className: q.placeholder }, R)
2718
2725
  );
2719
- const he = h ? Le(h) : null, pe = h ? et(h) : null, we = /* @__PURE__ */ r.createElement(
2726
+ const he = v ? Le(v) : null, pe = v ? et(v) : null, we = /* @__PURE__ */ r.createElement(
2720
2727
  "div",
2721
2728
  {
2722
2729
  className: De(q.editorPath, {
2723
- [q.editorPathPlaceholder]: !(h != null && h.length),
2724
- [q.editorPathPortaled]: k
2730
+ [q.editorPathPlaceholder]: !(v != null && v.length),
2731
+ [q.editorPathPortaled]: P
2725
2732
  }),
2726
- title: h ?? void 0
2733
+ title: v ?? void 0
2727
2734
  },
2728
2735
  he && pe ? /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("span", { className: q.editorPathDirectory }, he === "/" ? "" : he), /* @__PURE__ */ r.createElement("span", { className: q.editorPathFilename }, "/", pe)) : `Browse files under ${f}`
2729
2736
  );
@@ -2738,25 +2745,25 @@ function Za({
2738
2745
  "div",
2739
2746
  {
2740
2747
  className: De(q.content, {
2741
- [q.sidebarOpen]: oe
2748
+ [q.sidebarOpen]: ce
2742
2749
  })
2743
2750
  },
2744
2751
  /* @__PURE__ */ r.createElement(
2745
2752
  "div",
2746
2753
  {
2747
2754
  className: q.mobileOverlay,
2748
- onClick: () => de(!1)
2755
+ onClick: () => Q(!1)
2749
2756
  }
2750
2757
  ),
2751
2758
  /* @__PURE__ */ r.createElement("aside", { className: q.sidebarWrapper }, /* @__PURE__ */ r.createElement(
2752
2759
  Wn,
2753
2760
  {
2754
2761
  filesystem: n,
2755
- currentPath: h,
2756
- selectedDirPath: D,
2757
- setSelectedDirPath: A,
2762
+ currentPath: v,
2763
+ selectedDirPath: A,
2764
+ setSelectedDirPath: T,
2758
2765
  onFileOpened: Oe,
2759
- onSelectionCleared: ne,
2766
+ onSelectionCleared: ae,
2760
2767
  onShowMessage: Me,
2761
2768
  documentRoot: f,
2762
2769
  dockPresentation: d,
@@ -2767,7 +2774,7 @@ function Za({
2767
2774
  "div",
2768
2775
  {
2769
2776
  className: De(q.editorHeader, {
2770
- [q.editorHeaderPathPortaled]: k
2777
+ [q.editorHeaderPathPortaled]: P
2771
2778
  })
2772
2779
  },
2773
2780
  /* @__PURE__ */ r.createElement(
@@ -2775,26 +2782,26 @@ function Za({
2775
2782
  {
2776
2783
  className: q.mobileToggle,
2777
2784
  variant: "secondary",
2778
- onClick: () => de((b) => !b)
2785
+ onClick: () => Q((b) => !b)
2779
2786
  },
2780
- oe ? "Hide files" : "Browse files"
2787
+ ce ? "Hide files" : "Browse files"
2781
2788
  ),
2782
- k ? Mr(we, k) : we,
2783
- d && !K && h ? /* @__PURE__ */ r.createElement("div", { className: q.editorHeaderActions }, w ? /* @__PURE__ */ r.createElement(
2789
+ P ? Mr(we, P) : we,
2790
+ d && !Z && v ? /* @__PURE__ */ r.createElement("div", { className: q.editorHeaderActions }, E ? /* @__PURE__ */ r.createElement(
2784
2791
  "span",
2785
2792
  {
2786
2793
  className: q.dockDirtyIndicator,
2787
2794
  "aria-hidden": "true"
2788
2795
  }
2789
- ) : null, /* @__PURE__ */ r.createElement(Ht, { text: fe, placement: "top" }, /* @__PURE__ */ r.createElement(
2796
+ ) : null, /* @__PURE__ */ r.createElement(Ht, { text: de, placement: "top" }, /* @__PURE__ */ r.createElement(
2790
2797
  tt,
2791
2798
  {
2792
2799
  variant: "secondary",
2793
2800
  className: q.dockSaveButton,
2794
- isDestructive: C === O.ERROR,
2801
+ isDestructive: x === L.ERROR,
2795
2802
  onClick: ke
2796
2803
  },
2797
- H
2804
+ U
2798
2805
  ))) : d ? null : /* @__PURE__ */ r.createElement(
2799
2806
  "div",
2800
2807
  {
@@ -2805,30 +2812,30 @@ function Za({
2805
2812
  },
2806
2813
  Fe
2807
2814
  ),
2808
- d && !K && h ? /* @__PURE__ */ r.createElement(ir, { role: "status", "aria-live": "polite" }, fe) : null
2809
- ), y ? /* @__PURE__ */ r.createElement("div", { style: { padding: "8px 16px" } }, /* @__PURE__ */ r.createElement(lr, { status: "error", isDismissible: !1 }, y)) : null, h || F || g ? g ? /* @__PURE__ */ r.createElement("div", { className: q.messageArea }, g) : /* @__PURE__ */ r.createElement(
2815
+ d && !Z && v ? /* @__PURE__ */ r.createElement(ir, { role: "status", "aria-live": "polite" }, de) : null
2816
+ ), W ? /* @__PURE__ */ r.createElement("div", { style: { padding: "8px 16px" } }, /* @__PURE__ */ r.createElement(lr, { status: "error", isDismissible: !1 }, W)) : null, v || _ || g ? g ? /* @__PURE__ */ r.createElement("div", { className: q.messageArea }, g) : /* @__PURE__ */ r.createElement(
2810
2817
  Gt,
2811
2818
  {
2812
2819
  ref: N,
2813
- code: F,
2814
- onChange: S,
2815
- currentPath: h,
2820
+ code: _,
2821
+ onChange: k,
2822
+ currentPath: v,
2816
2823
  className: q.editor,
2817
2824
  onSaveShortcut: _e,
2818
- readOnly: K
2825
+ readOnly: Z
2819
2826
  }
2820
- ) : /* @__PURE__ */ r.createElement("div", { className: q.placeholder }, T))
2827
+ ) : /* @__PURE__ */ r.createElement("div", { className: q.placeholder }, R))
2821
2828
  )
2822
2829
  );
2823
2830
  }
2824
2831
  function Ea(n, c) {
2825
2832
  switch (n) {
2826
- case O.PENDING:
2827
- case O.SAVING:
2833
+ case L.PENDING:
2834
+ case L.SAVING:
2828
2835
  return "Saving…";
2829
- case O.SAVED:
2836
+ case L.SAVED:
2830
2837
  return "Saved";
2831
- case O.ERROR:
2838
+ case L.ERROR:
2832
2839
  return c ?? "Save failed";
2833
2840
  default:
2834
2841
  return "";
@@ -2836,11 +2843,11 @@ function Ea(n, c) {
2836
2843
  }
2837
2844
  function ya(n, c) {
2838
2845
  switch (n) {
2839
- case O.PENDING:
2846
+ case L.PENDING:
2840
2847
  return c.saveStatusPending;
2841
- case O.SAVING:
2848
+ case L.SAVING:
2842
2849
  return c.saveStatusSaving;
2843
- case O.ERROR:
2850
+ case L.ERROR:
2844
2851
  return c.saveStatusError;
2845
2852
  default:
2846
2853
  return;
@@ -2848,11 +2855,11 @@ function ya(n, c) {
2848
2855
  }
2849
2856
  function _a(n) {
2850
2857
  switch (n) {
2851
- case O.PENDING:
2858
+ case L.PENDING:
2852
2859
  return "Unsaved changes. Click to save now.";
2853
- case O.SAVING:
2860
+ case L.SAVING:
2854
2861
  return "Saving changes…";
2855
- case O.ERROR:
2862
+ case L.ERROR:
2856
2863
  return "Saving failed. Click to retry.";
2857
2864
  default:
2858
2865
  return "All changes saved.";