"use strict";
(() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
  var __esm = (fn, res) => function() {
    return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  };
  var __commonJS = (cb, mod2) => function() {
    return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from == "object" || typeof from == "function")
      for (let key of __getOwnPropNames(from))
        !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    return to;
  };
  var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: !0 }) : target,
    mod2
  ));

  // <define:SVG_ICONS_FONTAWESOME>
  var init_define_SVG_ICONS_FONTAWESOME = __esm({
    "<define:SVG_ICONS_FONTAWESOME>"() {
    }
  });

  // node_modules/react/cjs/react.production.js
  var require_react_production = __commonJS({
    "node_modules/react/cjs/react.production.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
      function getIteratorFn(maybeIterable) {
        return maybeIterable === null || typeof maybeIterable != "object" ? null : (maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"], typeof maybeIterable == "function" ? maybeIterable : null);
      }
      var ReactNoopUpdateQueue = {
        isMounted: function() {
          return !1;
        },
        enqueueForceUpdate: function() {
        },
        enqueueReplaceState: function() {
        },
        enqueueSetState: function() {
        }
      }, assign = Object.assign, emptyObject = {};
      function Component4(props, context, updater) {
        this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
      }
      Component4.prototype.isReactComponent = {};
      Component4.prototype.setState = function(partialState, callback) {
        if (typeof partialState != "object" && typeof partialState != "function" && partialState != null)
          throw Error(
            "takes an object of state variables to update or a function which returns an object of state variables."
          );
        this.updater.enqueueSetState(this, partialState, callback, "setState");
      };
      Component4.prototype.forceUpdate = function(callback) {
        this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
      };
      function ComponentDummy() {
      }
      ComponentDummy.prototype = Component4.prototype;
      function PureComponent(props, context, updater) {
        this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
      }
      var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
      pureComponentPrototype.constructor = PureComponent;
      assign(pureComponentPrototype, Component4.prototype);
      pureComponentPrototype.isPureReactComponent = !0;
      var isArrayImpl = Array.isArray;
      function noop() {
      }
      var ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty;
      function ReactElement(type, key, props) {
        var refProp = props.ref;
        return {
          $$typeof: REACT_ELEMENT_TYPE,
          type,
          key,
          ref: refProp !== void 0 ? refProp : null,
          props
        };
      }
      function cloneAndReplaceKey(oldElement, newKey) {
        return ReactElement(oldElement.type, newKey, oldElement.props);
      }
      function isValidElement2(object) {
        return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
      }
      function escape(key) {
        var escaperLookup = { "=": "=0", ":": "=2" };
        return "$" + key.replace(/[=:]/g, function(match) {
          return escaperLookup[match];
        });
      }
      var userProvidedKeyEscapeRegex = /\/+/g;
      function getElementKey(element, index) {
        return typeof element == "object" && element !== null && element.key != null ? escape("" + element.key) : index.toString(36);
      }
      function resolveThenable(thenable) {
        switch (thenable.status) {
          case "fulfilled":
            return thenable.value;
          case "rejected":
            throw thenable.reason;
          default:
            switch (typeof thenable.status == "string" ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
              function(fulfilledValue) {
                thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
              },
              function(error) {
                thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error);
              }
            )), thenable.status) {
              case "fulfilled":
                return thenable.value;
              case "rejected":
                throw thenable.reason;
            }
        }
        throw thenable;
      }
      function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
        var type = typeof children;
        (type === "undefined" || type === "boolean") && (children = null);
        var invokeCallback = !1;
        if (children === null) invokeCallback = !0;
        else
          switch (type) {
            case "bigint":
            case "string":
            case "number":
              invokeCallback = !0;
              break;
            case "object":
              switch (children.$$typeof) {
                case REACT_ELEMENT_TYPE:
                case REACT_PORTAL_TYPE:
                  invokeCallback = !0;
                  break;
                case REACT_LAZY_TYPE:
                  return invokeCallback = children._init, mapIntoArray(
                    invokeCallback(children._payload),
                    array,
                    escapedPrefix,
                    nameSoFar,
                    callback
                  );
              }
          }
        if (invokeCallback)
          return callback = callback(children), invokeCallback = nameSoFar === "" ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", invokeCallback != null && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
            return c;
          })) : callback != null && (isValidElement2(callback) && (callback = cloneAndReplaceKey(
            callback,
            escapedPrefix + (callback.key == null || children && children.key === callback.key ? "" : ("" + callback.key).replace(
              userProvidedKeyEscapeRegex,
              "$&/"
            ) + "/") + invokeCallback
          )), array.push(callback)), 1;
        invokeCallback = 0;
        var nextNamePrefix = nameSoFar === "" ? "." : nameSoFar + ":";
        if (isArrayImpl(children))
          for (var i = 0; i < children.length; i++)
            nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
              nameSoFar,
              array,
              escapedPrefix,
              type,
              callback
            );
        else if (i = getIteratorFn(children), typeof i == "function")
          for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
            nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
              nameSoFar,
              array,
              escapedPrefix,
              type,
              callback
            );
        else if (type === "object") {
          if (typeof children.then == "function")
            return mapIntoArray(
              resolveThenable(children),
              array,
              escapedPrefix,
              nameSoFar,
              callback
            );
          throw array = String(children), Error(
            "Objects are not valid as a React child (found: " + (array === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
          );
        }
        return invokeCallback;
      }
      function mapChildren(children, func, context) {
        if (children == null) return children;
        var result = [], count = 0;
        return mapIntoArray(children, result, "", "", function(child) {
          return func.call(context, child, count++);
        }), result;
      }
      function lazyInitializer(payload) {
        if (payload._status === -1) {
          var ctor = payload._result;
          ctor = ctor(), ctor.then(
            function(moduleObject) {
              (payload._status === 0 || payload._status === -1) && (payload._status = 1, payload._result = moduleObject);
            },
            function(error) {
              (payload._status === 0 || payload._status === -1) && (payload._status = 2, payload._result = error);
            }
          ), payload._status === -1 && (payload._status = 0, payload._result = ctor);
        }
        if (payload._status === 1) return payload._result.default;
        throw payload._result;
      }
      var reportGlobalError = typeof reportError == "function" ? reportError : function(error) {
        if (typeof window == "object" && typeof window.ErrorEvent == "function") {
          var event = new window.ErrorEvent("error", {
            bubbles: !0,
            cancelable: !0,
            message: typeof error == "object" && error !== null && typeof error.message == "string" ? String(error.message) : String(error),
            error
          });
          if (!window.dispatchEvent(event)) return;
        } else if (typeof process == "object" && typeof process.emit == "function") {
          process.emit("uncaughtException", error);
          return;
        }
        console.error(error);
      }, Children2 = {
        map: mapChildren,
        forEach: function(children, forEachFunc, forEachContext) {
          mapChildren(
            children,
            function() {
              forEachFunc.apply(this, arguments);
            },
            forEachContext
          );
        },
        count: function(children) {
          var n = 0;
          return mapChildren(children, function() {
            n++;
          }), n;
        },
        toArray: function(children) {
          return mapChildren(children, function(child) {
            return child;
          }) || [];
        },
        only: function(children) {
          if (!isValidElement2(children))
            throw Error(
              "React.Children.only expected to receive a single React element child."
            );
          return children;
        }
      };
      exports.Activity = REACT_ACTIVITY_TYPE;
      exports.Children = Children2;
      exports.Component = Component4;
      exports.Fragment = REACT_FRAGMENT_TYPE;
      exports.Profiler = REACT_PROFILER_TYPE;
      exports.PureComponent = PureComponent;
      exports.StrictMode = REACT_STRICT_MODE_TYPE;
      exports.Suspense = REACT_SUSPENSE_TYPE;
      exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
      exports.__COMPILER_RUNTIME = {
        __proto__: null,
        c: function(size) {
          return ReactSharedInternals.H.useMemoCache(size);
        }
      };
      exports.cache = function(fn) {
        return function() {
          return fn.apply(null, arguments);
        };
      };
      exports.cacheSignal = function() {
        return null;
      };
      exports.cloneElement = function(element, config2, children) {
        if (element == null)
          throw Error(
            "The argument must be a React element, but you passed " + element + "."
          );
        var props = assign({}, element.props), key = element.key;
        if (config2 != null)
          for (propName in config2.key !== void 0 && (key = "" + config2.key), config2)
            !hasOwnProperty.call(config2, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config2.ref === void 0 || (props[propName] = config2[propName]);
        var propName = arguments.length - 2;
        if (propName === 1) props.children = children;
        else if (1 < propName) {
          for (var childArray = Array(propName), i = 0; i < propName; i++)
            childArray[i] = arguments[i + 2];
          props.children = childArray;
        }
        return ReactElement(element.type, key, props);
      };
      exports.createContext = function(defaultValue) {
        return defaultValue = {
          $$typeof: REACT_CONTEXT_TYPE,
          _currentValue: defaultValue,
          _currentValue2: defaultValue,
          _threadCount: 0,
          Provider: null,
          Consumer: null
        }, defaultValue.Provider = defaultValue, defaultValue.Consumer = {
          $$typeof: REACT_CONSUMER_TYPE,
          _context: defaultValue
        }, defaultValue;
      };
      exports.createElement = function(type, config2, children) {
        var propName, props = {}, key = null;
        if (config2 != null)
          for (propName in config2.key !== void 0 && (key = "" + config2.key), config2)
            hasOwnProperty.call(config2, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (props[propName] = config2[propName]);
        var childrenLength = arguments.length - 2;
        if (childrenLength === 1) props.children = children;
        else if (1 < childrenLength) {
          for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
            childArray[i] = arguments[i + 2];
          props.children = childArray;
        }
        if (type && type.defaultProps)
          for (propName in childrenLength = type.defaultProps, childrenLength)
            props[propName] === void 0 && (props[propName] = childrenLength[propName]);
        return ReactElement(type, key, props);
      };
      exports.createRef = function() {
        return { current: null };
      };
      exports.forwardRef = function(render) {
        return { $$typeof: REACT_FORWARD_REF_TYPE, render };
      };
      exports.isValidElement = isValidElement2;
      exports.lazy = function(ctor) {
        return {
          $$typeof: REACT_LAZY_TYPE,
          _payload: { _status: -1, _result: ctor },
          _init: lazyInitializer
        };
      };
      exports.memo = function(type, compare) {
        return {
          $$typeof: REACT_MEMO_TYPE,
          type,
          compare: compare === void 0 ? null : compare
        };
      };
      exports.startTransition = function(scope) {
        var prevTransition = ReactSharedInternals.T, currentTransition = {};
        ReactSharedInternals.T = currentTransition;
        try {
          var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
          onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue), typeof returnValue == "object" && returnValue !== null && typeof returnValue.then == "function" && returnValue.then(noop, reportGlobalError);
        } catch (error) {
          reportGlobalError(error);
        } finally {
          prevTransition !== null && currentTransition.types !== null && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
        }
      };
      exports.unstable_useCacheRefresh = function() {
        return ReactSharedInternals.H.useCacheRefresh();
      };
      exports.use = function(usable) {
        return ReactSharedInternals.H.use(usable);
      };
      exports.useActionState = function(action, initialState, permalink) {
        return ReactSharedInternals.H.useActionState(action, initialState, permalink);
      };
      exports.useCallback = function(callback, deps) {
        return ReactSharedInternals.H.useCallback(callback, deps);
      };
      exports.useContext = function(Context) {
        return ReactSharedInternals.H.useContext(Context);
      };
      exports.useDebugValue = function() {
      };
      exports.useDeferredValue = function(value, initialValue) {
        return ReactSharedInternals.H.useDeferredValue(value, initialValue);
      };
      exports.useEffect = function(create, deps) {
        return ReactSharedInternals.H.useEffect(create, deps);
      };
      exports.useEffectEvent = function(callback) {
        return ReactSharedInternals.H.useEffectEvent(callback);
      };
      exports.useId = function() {
        return ReactSharedInternals.H.useId();
      };
      exports.useImperativeHandle = function(ref, create, deps) {
        return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
      };
      exports.useInsertionEffect = function(create, deps) {
        return ReactSharedInternals.H.useInsertionEffect(create, deps);
      };
      exports.useLayoutEffect = function(create, deps) {
        return ReactSharedInternals.H.useLayoutEffect(create, deps);
      };
      exports.useMemo = function(create, deps) {
        return ReactSharedInternals.H.useMemo(create, deps);
      };
      exports.useOptimistic = function(passthrough, reducer2) {
        return ReactSharedInternals.H.useOptimistic(passthrough, reducer2);
      };
      exports.useReducer = function(reducer2, initialArg, init) {
        return ReactSharedInternals.H.useReducer(reducer2, initialArg, init);
      };
      exports.useRef = function(initialValue) {
        return ReactSharedInternals.H.useRef(initialValue);
      };
      exports.useState = function(initialState) {
        return ReactSharedInternals.H.useState(initialState);
      };
      exports.useSyncExternalStore = function(subscribe2, getSnapshot, getServerSnapshot) {
        return ReactSharedInternals.H.useSyncExternalStore(
          subscribe2,
          getSnapshot,
          getServerSnapshot
        );
      };
      exports.useTransition = function() {
        return ReactSharedInternals.H.useTransition();
      };
      exports.version = "19.2.1";
    }
  });

  // node_modules/react/index.js
  var require_react = __commonJS({
    "node_modules/react/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      module.exports = require_react_production();
    }
  });

  // node_modules/scheduler/cjs/scheduler.production.js
  var require_scheduler_production = __commonJS({
    "node_modules/scheduler/cjs/scheduler.production.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      function push(heap, node) {
        var index = heap.length;
        heap.push(node);
        a: for (; 0 < index; ) {
          var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
          if (0 < compare(parent, node))
            heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
          else break a;
        }
      }
      function peek(heap) {
        return heap.length === 0 ? null : heap[0];
      }
      function pop(heap) {
        if (heap.length === 0) return null;
        var first = heap[0], last = heap.pop();
        if (last !== first) {
          heap[0] = last;
          a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
            var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
            if (0 > compare(left, last))
              rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
            else if (rightIndex < length && 0 > compare(right, last))
              heap[index] = right, heap[rightIndex] = last, index = rightIndex;
            else break a;
          }
        }
        return first;
      }
      function compare(a, b) {
        var diff = a.sortIndex - b.sortIndex;
        return diff !== 0 ? diff : a.id - b.id;
      }
      exports.unstable_now = void 0;
      typeof performance == "object" && typeof performance.now == "function" ? (localPerformance = performance, exports.unstable_now = function() {
        return localPerformance.now();
      }) : (localDate = Date, initialTime = localDate.now(), exports.unstable_now = function() {
        return localDate.now() - initialTime;
      });
      var localPerformance, localDate, initialTime, taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1, needsPaint = !1, localSetTimeout = typeof setTimeout == "function" ? setTimeout : null, localClearTimeout = typeof clearTimeout == "function" ? clearTimeout : null, localSetImmediate = typeof setImmediate != "undefined" ? setImmediate : null;
      function advanceTimers(currentTime) {
        for (var timer = peek(timerQueue); timer !== null; ) {
          if (timer.callback === null) pop(timerQueue);
          else if (timer.startTime <= currentTime)
            pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
          else break;
          timer = peek(timerQueue);
        }
      }
      function handleTimeout(currentTime) {
        if (isHostTimeoutScheduled = !1, advanceTimers(currentTime), !isHostCallbackScheduled)
          if (peek(taskQueue) !== null)
            isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline());
          else {
            var firstTimer = peek(timerQueue);
            firstTimer !== null && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
          }
      }
      var isMessageLoopRunning = !1, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
      function shouldYieldToHost() {
        return needsPaint ? !0 : !(exports.unstable_now() - startTime < frameInterval);
      }
      function performWorkUntilDeadline() {
        if (needsPaint = !1, isMessageLoopRunning) {
          var currentTime = exports.unstable_now();
          startTime = currentTime;
          var hasMoreWork = !0;
          try {
            a: {
              isHostCallbackScheduled = !1, isHostTimeoutScheduled && (isHostTimeoutScheduled = !1, localClearTimeout(taskTimeoutID), taskTimeoutID = -1), isPerformingWork = !0;
              var previousPriorityLevel = currentPriorityLevel;
              try {
                b: {
                  for (advanceTimers(currentTime), currentTask = peek(taskQueue); currentTask !== null && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
                    var callback = currentTask.callback;
                    if (typeof callback == "function") {
                      currentTask.callback = null, currentPriorityLevel = currentTask.priorityLevel;
                      var continuationCallback = callback(
                        currentTask.expirationTime <= currentTime
                      );
                      if (currentTime = exports.unstable_now(), typeof continuationCallback == "function") {
                        currentTask.callback = continuationCallback, advanceTimers(currentTime), hasMoreWork = !0;
                        break b;
                      }
                      currentTask === peek(taskQueue) && pop(taskQueue), advanceTimers(currentTime);
                    } else pop(taskQueue);
                    currentTask = peek(taskQueue);
                  }
                  if (currentTask !== null) hasMoreWork = !0;
                  else {
                    var firstTimer = peek(timerQueue);
                    firstTimer !== null && requestHostTimeout(
                      handleTimeout,
                      firstTimer.startTime - currentTime
                    ), hasMoreWork = !1;
                  }
                }
                break a;
              } finally {
                currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = !1;
              }
              hasMoreWork = void 0;
            }
          } finally {
            hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = !1;
          }
        }
      }
      var schedulePerformWorkUntilDeadline;
      typeof localSetImmediate == "function" ? schedulePerformWorkUntilDeadline = function() {
        localSetImmediate(performWorkUntilDeadline);
      } : typeof MessageChannel != "undefined" ? (channel = new MessageChannel(), port = channel.port2, channel.port1.onmessage = performWorkUntilDeadline, schedulePerformWorkUntilDeadline = function() {
        port.postMessage(null);
      }) : schedulePerformWorkUntilDeadline = function() {
        localSetTimeout(performWorkUntilDeadline, 0);
      };
      var channel, port;
      function requestHostTimeout(callback, ms) {
        taskTimeoutID = localSetTimeout(function() {
          callback(exports.unstable_now());
        }, ms);
      }
      exports.unstable_IdlePriority = 5;
      exports.unstable_ImmediatePriority = 1;
      exports.unstable_LowPriority = 4;
      exports.unstable_NormalPriority = 3;
      exports.unstable_Profiling = null;
      exports.unstable_UserBlockingPriority = 2;
      exports.unstable_cancelCallback = function(task) {
        task.callback = null;
      };
      exports.unstable_forceFrameRate = function(fps) {
        0 > fps || 125 < fps ? console.error(
          "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
        ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
      };
      exports.unstable_getCurrentPriorityLevel = function() {
        return currentPriorityLevel;
      };
      exports.unstable_next = function(eventHandler) {
        switch (currentPriorityLevel) {
          case 1:
          case 2:
          case 3:
            var priorityLevel = 3;
            break;
          default:
            priorityLevel = currentPriorityLevel;
        }
        var previousPriorityLevel = currentPriorityLevel;
        currentPriorityLevel = priorityLevel;
        try {
          return eventHandler();
        } finally {
          currentPriorityLevel = previousPriorityLevel;
        }
      };
      exports.unstable_requestPaint = function() {
        needsPaint = !0;
      };
      exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
        switch (priorityLevel) {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            break;
          default:
            priorityLevel = 3;
        }
        var previousPriorityLevel = currentPriorityLevel;
        currentPriorityLevel = priorityLevel;
        try {
          return eventHandler();
        } finally {
          currentPriorityLevel = previousPriorityLevel;
        }
      };
      exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
        var currentTime = exports.unstable_now();
        switch (typeof options == "object" && options !== null ? (options = options.delay, options = typeof options == "number" && 0 < options ? currentTime + options : currentTime) : options = currentTime, priorityLevel) {
          case 1:
            var timeout = -1;
            break;
          case 2:
            timeout = 250;
            break;
          case 5:
            timeout = 1073741823;
            break;
          case 4:
            timeout = 1e4;
            break;
          default:
            timeout = 5e3;
        }
        return timeout = options + timeout, priorityLevel = {
          id: taskIdCounter++,
          callback,
          priorityLevel,
          startTime: options,
          expirationTime: timeout,
          sortIndex: -1
        }, options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), peek(taskQueue) === null && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline()))), priorityLevel;
      };
      exports.unstable_shouldYield = shouldYieldToHost;
      exports.unstable_wrapCallback = function(callback) {
        var parentPriorityLevel = currentPriorityLevel;
        return function() {
          var previousPriorityLevel = currentPriorityLevel;
          currentPriorityLevel = parentPriorityLevel;
          try {
            return callback.apply(this, arguments);
          } finally {
            currentPriorityLevel = previousPriorityLevel;
          }
        };
      };
    }
  });

  // node_modules/scheduler/index.js
  var require_scheduler = __commonJS({
    "node_modules/scheduler/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      module.exports = require_scheduler_production();
    }
  });

  // node_modules/react-dom/cjs/react-dom.production.js
  var require_react_dom_production = __commonJS({
    "node_modules/react-dom/cjs/react-dom.production.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var React69 = require_react();
      function formatProdErrorMessage(code) {
        var url = "https://react.dev/errors/" + code;
        if (1 < arguments.length) {
          url += "?args[]=" + encodeURIComponent(arguments[1]);
          for (var i = 2; i < arguments.length; i++)
            url += "&args[]=" + encodeURIComponent(arguments[i]);
        }
        return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
      }
      function noop() {
      }
      var Internals = {
        d: {
          f: noop,
          r: function() {
            throw Error(formatProdErrorMessage(522));
          },
          D: noop,
          C: noop,
          L: noop,
          m: noop,
          X: noop,
          S: noop,
          M: noop
        },
        p: 0,
        findDOMNode: null
      }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
      function createPortal$1(children, containerInfo, implementation) {
        var key = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
        return {
          $$typeof: REACT_PORTAL_TYPE,
          key: key == null ? null : "" + key,
          children,
          containerInfo,
          implementation
        };
      }
      var ReactSharedInternals = React69.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
      function getCrossOriginStringAs(as, input) {
        if (as === "font") return "";
        if (typeof input == "string")
          return input === "use-credentials" ? input : "";
      }
      exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
      exports.createPortal = function(children, container) {
        var key = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
        if (!container || container.nodeType !== 1 && container.nodeType !== 9 && container.nodeType !== 11)
          throw Error(formatProdErrorMessage(299));
        return createPortal$1(children, container, null, key);
      };
      exports.flushSync = function(fn) {
        var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
        try {
          if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
        } finally {
          ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
        }
      };
      exports.preconnect = function(href, options) {
        typeof href == "string" && (options ? (options = options.crossOrigin, options = typeof options == "string" ? options === "use-credentials" ? options : "" : void 0) : options = null, Internals.d.C(href, options));
      };
      exports.prefetchDNS = function(href) {
        typeof href == "string" && Internals.d.D(href);
      };
      exports.preinit = function(href, options) {
        if (typeof href == "string" && options && typeof options.as == "string") {
          var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = typeof options.integrity == "string" ? options.integrity : void 0, fetchPriority = typeof options.fetchPriority == "string" ? options.fetchPriority : void 0;
          as === "style" ? Internals.d.S(
            href,
            typeof options.precedence == "string" ? options.precedence : void 0,
            {
              crossOrigin,
              integrity,
              fetchPriority
            }
          ) : as === "script" && Internals.d.X(href, {
            crossOrigin,
            integrity,
            fetchPriority,
            nonce: typeof options.nonce == "string" ? options.nonce : void 0
          });
        }
      };
      exports.preinitModule = function(href, options) {
        if (typeof href == "string")
          if (typeof options == "object" && options !== null) {
            if (options.as == null || options.as === "script") {
              var crossOrigin = getCrossOriginStringAs(
                options.as,
                options.crossOrigin
              );
              Internals.d.M(href, {
                crossOrigin,
                integrity: typeof options.integrity == "string" ? options.integrity : void 0,
                nonce: typeof options.nonce == "string" ? options.nonce : void 0
              });
            }
          } else options == null && Internals.d.M(href);
      };
      exports.preload = function(href, options) {
        if (typeof href == "string" && typeof options == "object" && options !== null && typeof options.as == "string") {
          var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
          Internals.d.L(href, as, {
            crossOrigin,
            integrity: typeof options.integrity == "string" ? options.integrity : void 0,
            nonce: typeof options.nonce == "string" ? options.nonce : void 0,
            type: typeof options.type == "string" ? options.type : void 0,
            fetchPriority: typeof options.fetchPriority == "string" ? options.fetchPriority : void 0,
            referrerPolicy: typeof options.referrerPolicy == "string" ? options.referrerPolicy : void 0,
            imageSrcSet: typeof options.imageSrcSet == "string" ? options.imageSrcSet : void 0,
            imageSizes: typeof options.imageSizes == "string" ? options.imageSizes : void 0,
            media: typeof options.media == "string" ? options.media : void 0
          });
        }
      };
      exports.preloadModule = function(href, options) {
        if (typeof href == "string")
          if (options) {
            var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
            Internals.d.m(href, {
              as: typeof options.as == "string" && options.as !== "script" ? options.as : void 0,
              crossOrigin,
              integrity: typeof options.integrity == "string" ? options.integrity : void 0
            });
          } else Internals.d.m(href);
      };
      exports.requestFormReset = function(form) {
        Internals.d.r(form);
      };
      exports.unstable_batchedUpdates = function(fn, a) {
        return fn(a);
      };
      exports.useFormState = function(action, initialState, permalink) {
        return ReactSharedInternals.H.useFormState(action, initialState, permalink);
      };
      exports.useFormStatus = function() {
        return ReactSharedInternals.H.useHostTransitionStatus();
      };
      exports.version = "19.2.1";
    }
  });

  // node_modules/react-dom/index.js
  var require_react_dom = __commonJS({
    "node_modules/react-dom/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      function checkDCE() {
        if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ == "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
          try {
            __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
          } catch (err) {
            console.error(err);
          }
      }
      checkDCE(), module.exports = require_react_dom_production();
    }
  });

  // node_modules/react-dom/cjs/react-dom-client.production.js
  var require_react_dom_client_production = __commonJS({
    "node_modules/react-dom/cjs/react-dom-client.production.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var Scheduler = require_scheduler(), React69 = require_react(), ReactDOM3 = require_react_dom();
      function formatProdErrorMessage(code) {
        var url = "https://react.dev/errors/" + code;
        if (1 < arguments.length) {
          url += "?args[]=" + encodeURIComponent(arguments[1]);
          for (var i = 2; i < arguments.length; i++)
            url += "&args[]=" + encodeURIComponent(arguments[i]);
        }
        return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
      }
      function isValidContainer(node) {
        return !(!node || node.nodeType !== 1 && node.nodeType !== 9 && node.nodeType !== 11);
      }
      function getNearestMountedFiber(fiber) {
        var node = fiber, nearestMounted = fiber;
        if (fiber.alternate) for (; node.return; ) node = node.return;
        else {
          fiber = node;
          do
            node = fiber, (node.flags & 4098) !== 0 && (nearestMounted = node.return), fiber = node.return;
          while (fiber);
        }
        return node.tag === 3 ? nearestMounted : null;
      }
      function getSuspenseInstanceFromFiber(fiber) {
        if (fiber.tag === 13) {
          var suspenseState = fiber.memoizedState;
          if (suspenseState === null && (fiber = fiber.alternate, fiber !== null && (suspenseState = fiber.memoizedState)), suspenseState !== null) return suspenseState.dehydrated;
        }
        return null;
      }
      function getActivityInstanceFromFiber(fiber) {
        if (fiber.tag === 31) {
          var activityState = fiber.memoizedState;
          if (activityState === null && (fiber = fiber.alternate, fiber !== null && (activityState = fiber.memoizedState)), activityState !== null) return activityState.dehydrated;
        }
        return null;
      }
      function assertIsMounted(fiber) {
        if (getNearestMountedFiber(fiber) !== fiber)
          throw Error(formatProdErrorMessage(188));
      }
      function findCurrentFiberUsingSlowPath(fiber) {
        var alternate = fiber.alternate;
        if (!alternate) {
          if (alternate = getNearestMountedFiber(fiber), alternate === null) throw Error(formatProdErrorMessage(188));
          return alternate !== fiber ? null : fiber;
        }
        for (var a = fiber, b = alternate; ; ) {
          var parentA = a.return;
          if (parentA === null) break;
          var parentB = parentA.alternate;
          if (parentB === null) {
            if (b = parentA.return, b !== null) {
              a = b;
              continue;
            }
            break;
          }
          if (parentA.child === parentB.child) {
            for (parentB = parentA.child; parentB; ) {
              if (parentB === a) return assertIsMounted(parentA), fiber;
              if (parentB === b) return assertIsMounted(parentA), alternate;
              parentB = parentB.sibling;
            }
            throw Error(formatProdErrorMessage(188));
          }
          if (a.return !== b.return) a = parentA, b = parentB;
          else {
            for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
              if (child$0 === a) {
                didFindChild = !0, a = parentA, b = parentB;
                break;
              }
              if (child$0 === b) {
                didFindChild = !0, b = parentA, a = parentB;
                break;
              }
              child$0 = child$0.sibling;
            }
            if (!didFindChild) {
              for (child$0 = parentB.child; child$0; ) {
                if (child$0 === a) {
                  didFindChild = !0, a = parentB, b = parentA;
                  break;
                }
                if (child$0 === b) {
                  didFindChild = !0, b = parentB, a = parentA;
                  break;
                }
                child$0 = child$0.sibling;
              }
              if (!didFindChild) throw Error(formatProdErrorMessage(189));
            }
          }
          if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
        }
        if (a.tag !== 3) throw Error(formatProdErrorMessage(188));
        return a.stateNode.current === a ? fiber : alternate;
      }
      function findCurrentHostFiberImpl(node) {
        var tag = node.tag;
        if (tag === 5 || tag === 26 || tag === 27 || tag === 6) return node;
        for (node = node.child; node !== null; ) {
          if (tag = findCurrentHostFiberImpl(node), tag !== null) return tag;
          node = node.sibling;
        }
        return null;
      }
      var assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
      function getIteratorFn(maybeIterable) {
        return maybeIterable === null || typeof maybeIterable != "object" ? null : (maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"], typeof maybeIterable == "function" ? maybeIterable : null);
      }
      var REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
      function getComponentNameFromType(type) {
        if (type == null) return null;
        if (typeof type == "function")
          return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
        if (typeof type == "string") return type;
        switch (type) {
          case REACT_FRAGMENT_TYPE:
            return "Fragment";
          case REACT_PROFILER_TYPE:
            return "Profiler";
          case REACT_STRICT_MODE_TYPE:
            return "StrictMode";
          case REACT_SUSPENSE_TYPE:
            return "Suspense";
          case REACT_SUSPENSE_LIST_TYPE:
            return "SuspenseList";
          case REACT_ACTIVITY_TYPE:
            return "Activity";
        }
        if (typeof type == "object")
          switch (type.$$typeof) {
            case REACT_PORTAL_TYPE:
              return "Portal";
            case REACT_CONTEXT_TYPE:
              return type.displayName || "Context";
            case REACT_CONSUMER_TYPE:
              return (type._context.displayName || "Context") + ".Consumer";
            case REACT_FORWARD_REF_TYPE:
              var innerType = type.render;
              return type = type.displayName, type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef"), type;
            case REACT_MEMO_TYPE:
              return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
            case REACT_LAZY_TYPE:
              innerType = type._payload, type = type._init;
              try {
                return getComponentNameFromType(type(innerType));
              } catch (x) {
              }
          }
        return null;
      }
      var isArrayImpl = Array.isArray, ReactSharedInternals = React69.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM3.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, sharedNotPendingObject = {
        pending: !1,
        data: null,
        method: null,
        action: null
      }, valueStack = [], index = -1;
      function createCursor(defaultValue) {
        return { current: defaultValue };
      }
      function pop(cursor) {
        0 > index || (cursor.current = valueStack[index], valueStack[index] = null, index--);
      }
      function push(cursor, value) {
        index++, valueStack[index] = cursor.current, cursor.current = value;
      }
      var contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null);
      function pushHostContainer(fiber, nextRootInstance) {
        switch (push(rootInstanceStackCursor, nextRootInstance), push(contextFiberStackCursor, fiber), push(contextStackCursor, null), nextRootInstance.nodeType) {
          case 9:
          case 11:
            fiber = (fiber = nextRootInstance.documentElement) && (fiber = fiber.namespaceURI) ? getOwnHostContext(fiber) : 0;
            break;
          default:
            if (fiber = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
              nextRootInstance = getOwnHostContext(nextRootInstance), fiber = getChildHostContextProd(nextRootInstance, fiber);
            else
              switch (fiber) {
                case "svg":
                  fiber = 1;
                  break;
                case "math":
                  fiber = 2;
                  break;
                default:
                  fiber = 0;
              }
        }
        pop(contextStackCursor), push(contextStackCursor, fiber);
      }
      function popHostContainer() {
        pop(contextStackCursor), pop(contextFiberStackCursor), pop(rootInstanceStackCursor);
      }
      function pushHostContext(fiber) {
        fiber.memoizedState !== null && push(hostTransitionProviderCursor, fiber);
        var context = contextStackCursor.current, JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);
        context !== JSCompiler_inline_result && (push(contextFiberStackCursor, fiber), push(contextStackCursor, JSCompiler_inline_result));
      }
      function popHostContext(fiber) {
        contextFiberStackCursor.current === fiber && (pop(contextStackCursor), pop(contextFiberStackCursor)), hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), HostTransitionContext._currentValue = sharedNotPendingObject);
      }
      var prefix, suffix;
      function describeBuiltInComponentFrame(name) {
        if (prefix === void 0)
          try {
            throw Error();
          } catch (x) {
            var match = x.stack.trim().match(/\n( *(at )?)/);
            prefix = match && match[1] || "", suffix = -1 < x.stack.indexOf(`
    at`) ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
          }
        return `
` + prefix + name + suffix;
      }
      var reentry = !1;
      function describeNativeComponentFrame(fn, construct) {
        if (!fn || reentry) return "";
        reentry = !0;
        var previousPrepareStackTrace = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        try {
          var RunInRootFrame = {
            DetermineComponentFrameRoot: function() {
              try {
                if (construct) {
                  var Fake = function() {
                    throw Error();
                  };
                  if (Object.defineProperty(Fake.prototype, "props", {
                    set: function() {
                      throw Error();
                    }
                  }), typeof Reflect == "object" && Reflect.construct) {
                    try {
                      Reflect.construct(Fake, []);
                    } catch (x) {
                      var control = x;
                    }
                    Reflect.construct(fn, [], Fake);
                  } else {
                    try {
                      Fake.call();
                    } catch (x$1) {
                      control = x$1;
                    }
                    fn.call(Fake.prototype);
                  }
                } else {
                  try {
                    throw Error();
                  } catch (x$2) {
                    control = x$2;
                  }
                  (Fake = fn()) && typeof Fake.catch == "function" && Fake.catch(function() {
                  });
                }
              } catch (sample) {
                if (sample && control && typeof sample.stack == "string")
                  return [sample.stack, control.stack];
              }
              return [null, null];
            }
          };
          RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
          var namePropDescriptor = Object.getOwnPropertyDescriptor(
            RunInRootFrame.DetermineComponentFrameRoot,
            "name"
          );
          namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
            RunInRootFrame.DetermineComponentFrameRoot,
            "name",
            { value: "DetermineComponentFrameRoot" }
          );
          var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
          if (sampleStack && controlStack) {
            var sampleLines = sampleStack.split(`
`), controlLines = controlStack.split(`
`);
            for (namePropDescriptor = RunInRootFrame = 0; RunInRootFrame < sampleLines.length && !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); )
              RunInRootFrame++;
            for (; namePropDescriptor < controlLines.length && !controlLines[namePropDescriptor].includes(
              "DetermineComponentFrameRoot"
            ); )
              namePropDescriptor++;
            if (RunInRootFrame === sampleLines.length || namePropDescriptor === controlLines.length)
              for (RunInRootFrame = sampleLines.length - 1, namePropDescriptor = controlLines.length - 1; 1 <= RunInRootFrame && 0 <= namePropDescriptor && sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; )
                namePropDescriptor--;
            for (; 1 <= RunInRootFrame && 0 <= namePropDescriptor; RunInRootFrame--, namePropDescriptor--)
              if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
                if (RunInRootFrame !== 1 || namePropDescriptor !== 1)
                  do
                    if (RunInRootFrame--, namePropDescriptor--, 0 > namePropDescriptor || sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
                      var frame = `
` + sampleLines[RunInRootFrame].replace(" at new ", " at ");
                      return fn.displayName && frame.includes("<anonymous>") && (frame = frame.replace("<anonymous>", fn.displayName)), frame;
                    }
                  while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
                break;
              }
          }
        } finally {
          reentry = !1, Error.prepareStackTrace = previousPrepareStackTrace;
        }
        return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(previousPrepareStackTrace) : "";
      }
      function describeFiber(fiber, childFiber) {
        switch (fiber.tag) {
          case 26:
          case 27:
          case 5:
            return describeBuiltInComponentFrame(fiber.type);
          case 16:
            return describeBuiltInComponentFrame("Lazy");
          case 13:
            return fiber.child !== childFiber && childFiber !== null ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense");
          case 19:
            return describeBuiltInComponentFrame("SuspenseList");
          case 0:
          case 15:
            return describeNativeComponentFrame(fiber.type, !1);
          case 11:
            return describeNativeComponentFrame(fiber.type.render, !1);
          case 1:
            return describeNativeComponentFrame(fiber.type, !0);
          case 31:
            return describeBuiltInComponentFrame("Activity");
          default:
            return "";
        }
      }
      function getStackByFiberInDevAndProd(workInProgress2) {
        try {
          var info = "", previous = null;
          do
            info += describeFiber(workInProgress2, previous), previous = workInProgress2, workInProgress2 = workInProgress2.return;
          while (workInProgress2);
          return info;
        } catch (x) {
          return `
Error generating stack: ` + x.message + `
` + x.stack;
        }
      }
      var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null;
      function setIsStrictModeForDevtools(newIsStrictMode) {
        if (typeof log$1 == "function" && unstable_setDisableYieldValue(newIsStrictMode), injectedHook && typeof injectedHook.setStrictMode == "function")
          try {
            injectedHook.setStrictMode(rendererID, newIsStrictMode);
          } catch (err) {
          }
      }
      var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2;
      function clz32Fallback(x) {
        return x >>>= 0, x === 0 ? 32 : 31 - (log(x) / LN2 | 0) | 0;
      }
      var nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, nextRetryLane = 4194304;
      function getHighestPriorityLanes(lanes) {
        var pendingSyncLanes = lanes & 42;
        if (pendingSyncLanes !== 0) return pendingSyncLanes;
        switch (lanes & -lanes) {
          case 1:
            return 1;
          case 2:
            return 2;
          case 4:
            return 4;
          case 8:
            return 8;
          case 16:
            return 16;
          case 32:
            return 32;
          case 64:
            return 64;
          case 128:
            return 128;
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
            return lanes & 261888;
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
            return lanes & 3932160;
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
            return lanes & 62914560;
          case 67108864:
            return 67108864;
          case 134217728:
            return 134217728;
          case 268435456:
            return 268435456;
          case 536870912:
            return 536870912;
          case 1073741824:
            return 0;
          default:
            return lanes;
        }
      }
      function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
        var pendingLanes = root2.pendingLanes;
        if (pendingLanes === 0) return 0;
        var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
        root2 = root2.warmLanes;
        var nonIdlePendingLanes = pendingLanes & 134217727;
        return nonIdlePendingLanes !== 0 ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, pendingLanes !== 0 ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, pingedLanes !== 0 ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, rootHasPendingCommit !== 0 && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, nonIdlePendingLanes !== 0 ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : pingedLanes !== 0 ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, rootHasPendingCommit !== 0 && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))), nextLanes === 0 ? 0 : wipLanes !== 0 && wipLanes !== nextLanes && (wipLanes & suspendedLanes) === 0 && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || suspendedLanes === 32 && (rootHasPendingCommit & 4194048) !== 0) ? wipLanes : nextLanes;
      }
      function checkIfRootIsPrerendering(root2, renderLanes2) {
        return (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2) === 0;
      }
      function computeExpirationTime(lane, currentTime) {
        switch (lane) {
          case 1:
          case 2:
          case 4:
          case 8:
          case 64:
            return currentTime + 250;
          case 16:
          case 32:
          case 128:
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
            return currentTime + 5e3;
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
            return -1;
          case 67108864:
          case 134217728:
          case 268435456:
          case 536870912:
          case 1073741824:
            return -1;
          default:
            return -1;
        }
      }
      function claimNextRetryLane() {
        var lane = nextRetryLane;
        return nextRetryLane <<= 1, (nextRetryLane & 62914560) === 0 && (nextRetryLane = 4194304), lane;
      }
      function createLaneMap(initial) {
        for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
        return laneMap;
      }
      function markRootUpdated$1(root2, updateLane) {
        root2.pendingLanes |= updateLane, updateLane !== 268435456 && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
      }
      function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
        var previouslyPendingLanes = root2.pendingLanes;
        root2.pendingLanes = remainingLanes, root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0, root2.expiredLanes &= remainingLanes, root2.entangledLanes &= remainingLanes, root2.errorRecoveryDisabledLanes &= remainingLanes, root2.shellSuspendCounter = 0;
        var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
        for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
          var index$7 = 31 - clz32(remainingLanes), lane = 1 << index$7;
          entanglements[index$7] = 0, expirationTimes[index$7] = -1;
          var hiddenUpdatesForLane = hiddenUpdates[index$7];
          if (hiddenUpdatesForLane !== null)
            for (hiddenUpdates[index$7] = null, index$7 = 0; index$7 < hiddenUpdatesForLane.length; index$7++) {
              var update = hiddenUpdatesForLane[index$7];
              update !== null && (update.lane &= -536870913);
            }
          remainingLanes &= ~lane;
        }
        spawnedLane !== 0 && markSpawnedDeferredLane(root2, spawnedLane, 0), suspendedRetryLanes !== 0 && updatedLanes === 0 && root2.tag !== 0 && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
      }
      function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
        root2.pendingLanes |= spawnedLane, root2.suspendedLanes &= ~spawnedLane;
        var spawnedLaneIndex = 31 - clz32(spawnedLane);
        root2.entangledLanes |= spawnedLane, root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930;
      }
      function markRootEntangled(root2, entangledLanes) {
        var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
        for (root2 = root2.entanglements; rootEntangledLanes; ) {
          var index$8 = 31 - clz32(rootEntangledLanes), lane = 1 << index$8;
          lane & entangledLanes | root2[index$8] & entangledLanes && (root2[index$8] |= entangledLanes), rootEntangledLanes &= ~lane;
        }
      }
      function getBumpedLaneForHydration(root2, renderLanes2) {
        var renderLane = renderLanes2 & -renderLanes2;
        return renderLane = (renderLane & 42) !== 0 ? 1 : getBumpedLaneForHydrationByLane(renderLane), (renderLane & (root2.suspendedLanes | renderLanes2)) !== 0 ? 0 : renderLane;
      }
      function getBumpedLaneForHydrationByLane(lane) {
        switch (lane) {
          case 2:
            lane = 1;
            break;
          case 8:
            lane = 4;
            break;
          case 32:
            lane = 16;
            break;
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
            lane = 128;
            break;
          case 268435456:
            lane = 134217728;
            break;
          default:
            lane = 0;
        }
        return lane;
      }
      function lanesToEventPriority(lanes) {
        return lanes &= -lanes, 2 < lanes ? 8 < lanes ? (lanes & 134217727) !== 0 ? 32 : 268435456 : 8 : 2;
      }
      function resolveUpdatePriority() {
        var updatePriority = ReactDOMSharedInternals.p;
        return updatePriority !== 0 ? updatePriority : (updatePriority = window.event, updatePriority === void 0 ? 32 : getEventPriority(updatePriority.type));
      }
      function runWithPriority(priority, fn) {
        var previousPriority = ReactDOMSharedInternals.p;
        try {
          return ReactDOMSharedInternals.p = priority, fn();
        } finally {
          ReactDOMSharedInternals.p = previousPriority;
        }
      }
      var randomKey = Math.random().toString(36).slice(2), internalInstanceKey = "__reactFiber$" + randomKey, internalPropsKey = "__reactProps$" + randomKey, internalContainerInstanceKey = "__reactContainer$" + randomKey, internalEventHandlersKey = "__reactEvents$" + randomKey, internalEventHandlerListenersKey = "__reactListeners$" + randomKey, internalEventHandlesSetKey = "__reactHandles$" + randomKey, internalRootNodeResourcesKey = "__reactResources$" + randomKey, internalHoistableMarker = "__reactMarker$" + randomKey;
      function detachDeletedInstance(node) {
        delete node[internalInstanceKey], delete node[internalPropsKey], delete node[internalEventHandlersKey], delete node[internalEventHandlerListenersKey], delete node[internalEventHandlesSetKey];
      }
      function getClosestInstanceFromNode(targetNode) {
        var targetInst = targetNode[internalInstanceKey];
        if (targetInst) return targetInst;
        for (var parentNode = targetNode.parentNode; parentNode; ) {
          if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
            if (parentNode = targetInst.alternate, targetInst.child !== null || parentNode !== null && parentNode.child !== null)
              for (targetNode = getParentHydrationBoundary(targetNode); targetNode !== null; ) {
                if (parentNode = targetNode[internalInstanceKey]) return parentNode;
                targetNode = getParentHydrationBoundary(targetNode);
              }
            return targetInst;
          }
          targetNode = parentNode, parentNode = targetNode.parentNode;
        }
        return null;
      }
      function getInstanceFromNode(node) {
        if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
          var tag = node.tag;
          if (tag === 5 || tag === 6 || tag === 13 || tag === 31 || tag === 26 || tag === 27 || tag === 3)
            return node;
        }
        return null;
      }
      function getNodeFromInstance(inst) {
        var tag = inst.tag;
        if (tag === 5 || tag === 26 || tag === 27 || tag === 6) return inst.stateNode;
        throw Error(formatProdErrorMessage(33));
      }
      function getResourcesFromRoot(root2) {
        var resources = root2[internalRootNodeResourcesKey];
        return resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), resources;
      }
      function markNodeAsHoistable(node) {
        node[internalHoistableMarker] = !0;
      }
      var allNativeEvents = /* @__PURE__ */ new Set(), registrationNameDependencies = {};
      function registerTwoPhaseEvent(registrationName, dependencies) {
        registerDirectEvent(registrationName, dependencies), registerDirectEvent(registrationName + "Capture", dependencies);
      }
      function registerDirectEvent(registrationName, dependencies) {
        for (registrationNameDependencies[registrationName] = dependencies, registrationName = 0; registrationName < dependencies.length; registrationName++)
          allNativeEvents.add(dependencies[registrationName]);
      }
      var VALID_ATTRIBUTE_NAME_REGEX = RegExp(
        "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
      ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {};
      function isAttributeNameSafe(attributeName) {
        return hasOwnProperty.call(validatedAttributeNameCache, attributeName) ? !0 : hasOwnProperty.call(illegalAttributeNameCache, attributeName) ? !1 : VALID_ATTRIBUTE_NAME_REGEX.test(attributeName) ? validatedAttributeNameCache[attributeName] = !0 : (illegalAttributeNameCache[attributeName] = !0, !1);
      }
      function setValueForAttribute(node, name, value) {
        if (isAttributeNameSafe(name))
          if (value === null) node.removeAttribute(name);
          else {
            switch (typeof value) {
              case "undefined":
              case "function":
              case "symbol":
                node.removeAttribute(name);
                return;
              case "boolean":
                var prefix$10 = name.toLowerCase().slice(0, 5);
                if (prefix$10 !== "data-" && prefix$10 !== "aria-") {
                  node.removeAttribute(name);
                  return;
                }
            }
            node.setAttribute(name, "" + value);
          }
      }
      function setValueForKnownAttribute(node, name, value) {
        if (value === null) node.removeAttribute(name);
        else {
          switch (typeof value) {
            case "undefined":
            case "function":
            case "symbol":
            case "boolean":
              node.removeAttribute(name);
              return;
          }
          node.setAttribute(name, "" + value);
        }
      }
      function setValueForNamespacedAttribute(node, namespace, name, value) {
        if (value === null) node.removeAttribute(name);
        else {
          switch (typeof value) {
            case "undefined":
            case "function":
            case "symbol":
            case "boolean":
              node.removeAttribute(name);
              return;
          }
          node.setAttributeNS(namespace, name, "" + value);
        }
      }
      function getToStringValue(value) {
        switch (typeof value) {
          case "bigint":
          case "boolean":
          case "number":
          case "string":
          case "undefined":
            return value;
          case "object":
            return value;
          default:
            return "";
        }
      }
      function isCheckable(elem) {
        var type = elem.type;
        return (elem = elem.nodeName) && elem.toLowerCase() === "input" && (type === "checkbox" || type === "radio");
      }
      function trackValueOnNode(node, valueField, currentValue) {
        var descriptor = Object.getOwnPropertyDescriptor(
          node.constructor.prototype,
          valueField
        );
        if (!node.hasOwnProperty(valueField) && typeof descriptor != "undefined" && typeof descriptor.get == "function" && typeof descriptor.set == "function") {
          var get2 = descriptor.get, set = descriptor.set;
          return Object.defineProperty(node, valueField, {
            configurable: !0,
            get: function() {
              return get2.call(this);
            },
            set: function(value) {
              currentValue = "" + value, set.call(this, value);
            }
          }), Object.defineProperty(node, valueField, {
            enumerable: descriptor.enumerable
          }), {
            getValue: function() {
              return currentValue;
            },
            setValue: function(value) {
              currentValue = "" + value;
            },
            stopTracking: function() {
              node._valueTracker = null, delete node[valueField];
            }
          };
        }
      }
      function track(node) {
        if (!node._valueTracker) {
          var valueField = isCheckable(node) ? "checked" : "value";
          node._valueTracker = trackValueOnNode(
            node,
            valueField,
            "" + node[valueField]
          );
        }
      }
      function updateValueIfChanged(node) {
        if (!node) return !1;
        var tracker = node._valueTracker;
        if (!tracker) return !0;
        var lastValue = tracker.getValue(), value = "";
        return node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value), node = value, node !== lastValue ? (tracker.setValue(node), !0) : !1;
      }
      function getActiveElement(doc) {
        if (doc = doc || (typeof document != "undefined" ? document : void 0), typeof doc == "undefined") return null;
        try {
          return doc.activeElement || doc.body;
        } catch (e) {
          return doc.body;
        }
      }
      var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g;
      function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
        return value.replace(
          escapeSelectorAttributeValueInsideDoubleQuotesRegex,
          function(ch) {
            return "\\" + ch.charCodeAt(0).toString(16) + " ";
          }
        );
      }
      function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
        element.name = "", type != null && typeof type != "function" && typeof type != "symbol" && typeof type != "boolean" ? element.type = type : element.removeAttribute("type"), value != null ? type === "number" ? (value === 0 && element.value === "" || element.value != value) && (element.value = "" + getToStringValue(value)) : element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value)) : type !== "submit" && type !== "reset" || element.removeAttribute("value"), value != null ? setDefaultValue(element, type, getToStringValue(value)) : defaultValue != null ? setDefaultValue(element, type, getToStringValue(defaultValue)) : lastDefaultValue != null && element.removeAttribute("value"), checked == null && defaultChecked != null && (element.defaultChecked = !!defaultChecked), checked != null && (element.checked = checked && typeof checked != "function" && typeof checked != "symbol"), name != null && typeof name != "function" && typeof name != "symbol" && typeof name != "boolean" ? element.name = "" + getToStringValue(name) : element.removeAttribute("name");
      }
      function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
        if (type != null && typeof type != "function" && typeof type != "symbol" && typeof type != "boolean" && (element.type = type), value != null || defaultValue != null) {
          if (!(type !== "submit" && type !== "reset" || value != null)) {
            track(element);
            return;
          }
          defaultValue = defaultValue != null ? "" + getToStringValue(defaultValue) : "", value = value != null ? "" + getToStringValue(value) : defaultValue, isHydrating2 || value === element.value || (element.value = value), element.defaultValue = value;
        }
        checked = checked != null ? checked : defaultChecked, checked = typeof checked != "function" && typeof checked != "symbol" && !!checked, element.checked = isHydrating2 ? element.checked : !!checked, element.defaultChecked = !!checked, name != null && typeof name != "function" && typeof name != "symbol" && typeof name != "boolean" && (element.name = name), track(element);
      }
      function setDefaultValue(node, type, value) {
        type === "number" && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
      }
      function updateOptions(node, multiple, propValue, setDefaultSelected) {
        if (node = node.options, multiple) {
          multiple = {};
          for (var i = 0; i < propValue.length; i++)
            multiple["$" + propValue[i]] = !0;
          for (propValue = 0; propValue < node.length; propValue++)
            i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = !0);
        } else {
          for (propValue = "" + getToStringValue(propValue), multiple = null, i = 0; i < node.length; i++) {
            if (node[i].value === propValue) {
              node[i].selected = !0, setDefaultSelected && (node[i].defaultSelected = !0);
              return;
            }
            multiple !== null || node[i].disabled || (multiple = node[i]);
          }
          multiple !== null && (multiple.selected = !0);
        }
      }
      function updateTextarea(element, value, defaultValue) {
        if (value != null && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), defaultValue == null)) {
          element.defaultValue !== value && (element.defaultValue = value);
          return;
        }
        element.defaultValue = defaultValue != null ? "" + getToStringValue(defaultValue) : "";
      }
      function initTextarea(element, value, defaultValue, children) {
        if (value == null) {
          if (children != null) {
            if (defaultValue != null) throw Error(formatProdErrorMessage(92));
            if (isArrayImpl(children)) {
              if (1 < children.length) throw Error(formatProdErrorMessage(93));
              children = children[0];
            }
            defaultValue = children;
          }
          defaultValue == null && (defaultValue = ""), value = defaultValue;
        }
        defaultValue = getToStringValue(value), element.defaultValue = defaultValue, children = element.textContent, children === defaultValue && children !== "" && children !== null && (element.value = children), track(element);
      }
      function setTextContent(node, text) {
        if (text) {
          var firstChild = node.firstChild;
          if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
            firstChild.nodeValue = text;
            return;
          }
        }
        node.textContent = text;
      }
      var unitlessNumbers = new Set(
        "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
          " "
        )
      );
      function setValueForStyle(style2, styleName, value) {
        var isCustomProperty = styleName.indexOf("--") === 0;
        value == null || typeof value == "boolean" || value === "" ? isCustomProperty ? style2.setProperty(styleName, "") : styleName === "float" ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value) : typeof value != "number" || value === 0 || unitlessNumbers.has(styleName) ? styleName === "float" ? style2.cssFloat = value : style2[styleName] = ("" + value).trim() : style2[styleName] = value + "px";
      }
      function setValueForStyles(node, styles, prevStyles) {
        if (styles != null && typeof styles != "object")
          throw Error(formatProdErrorMessage(62));
        if (node = node.style, prevStyles != null) {
          for (var styleName in prevStyles)
            !prevStyles.hasOwnProperty(styleName) || styles != null && styles.hasOwnProperty(styleName) || (styleName.indexOf("--") === 0 ? node.setProperty(styleName, "") : styleName === "float" ? node.cssFloat = "" : node[styleName] = "");
          for (var styleName$16 in styles)
            styleName = styles[styleName$16], styles.hasOwnProperty(styleName$16) && prevStyles[styleName$16] !== styleName && setValueForStyle(node, styleName$16, styleName);
        } else
          for (var styleName$17 in styles)
            styles.hasOwnProperty(styleName$17) && setValueForStyle(node, styleName$17, styles[styleName$17]);
      }
      function isCustomElement(tagName) {
        if (tagName.indexOf("-") === -1) return !1;
        switch (tagName) {
          case "annotation-xml":
          case "color-profile":
          case "font-face":
          case "font-face-src":
          case "font-face-uri":
          case "font-face-format":
          case "font-face-name":
          case "missing-glyph":
            return !1;
          default:
            return !0;
        }
      }
      var aliases = /* @__PURE__ */ new Map([
        ["acceptCharset", "accept-charset"],
        ["htmlFor", "for"],
        ["httpEquiv", "http-equiv"],
        ["crossOrigin", "crossorigin"],
        ["accentHeight", "accent-height"],
        ["alignmentBaseline", "alignment-baseline"],
        ["arabicForm", "arabic-form"],
        ["baselineShift", "baseline-shift"],
        ["capHeight", "cap-height"],
        ["clipPath", "clip-path"],
        ["clipRule", "clip-rule"],
        ["colorInterpolation", "color-interpolation"],
        ["colorInterpolationFilters", "color-interpolation-filters"],
        ["colorProfile", "color-profile"],
        ["colorRendering", "color-rendering"],
        ["dominantBaseline", "dominant-baseline"],
        ["enableBackground", "enable-background"],
        ["fillOpacity", "fill-opacity"],
        ["fillRule", "fill-rule"],
        ["floodColor", "flood-color"],
        ["floodOpacity", "flood-opacity"],
        ["fontFamily", "font-family"],
        ["fontSize", "font-size"],
        ["fontSizeAdjust", "font-size-adjust"],
        ["fontStretch", "font-stretch"],
        ["fontStyle", "font-style"],
        ["fontVariant", "font-variant"],
        ["fontWeight", "font-weight"],
        ["glyphName", "glyph-name"],
        ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
        ["glyphOrientationVertical", "glyph-orientation-vertical"],
        ["horizAdvX", "horiz-adv-x"],
        ["horizOriginX", "horiz-origin-x"],
        ["imageRendering", "image-rendering"],
        ["letterSpacing", "letter-spacing"],
        ["lightingColor", "lighting-color"],
        ["markerEnd", "marker-end"],
        ["markerMid", "marker-mid"],
        ["markerStart", "marker-start"],
        ["overlinePosition", "overline-position"],
        ["overlineThickness", "overline-thickness"],
        ["paintOrder", "paint-order"],
        ["panose-1", "panose-1"],
        ["pointerEvents", "pointer-events"],
        ["renderingIntent", "rendering-intent"],
        ["shapeRendering", "shape-rendering"],
        ["stopColor", "stop-color"],
        ["stopOpacity", "stop-opacity"],
        ["strikethroughPosition", "strikethrough-position"],
        ["strikethroughThickness", "strikethrough-thickness"],
        ["strokeDasharray", "stroke-dasharray"],
        ["strokeDashoffset", "stroke-dashoffset"],
        ["strokeLinecap", "stroke-linecap"],
        ["strokeLinejoin", "stroke-linejoin"],
        ["strokeMiterlimit", "stroke-miterlimit"],
        ["strokeOpacity", "stroke-opacity"],
        ["strokeWidth", "stroke-width"],
        ["textAnchor", "text-anchor"],
        ["textDecoration", "text-decoration"],
        ["textRendering", "text-rendering"],
        ["transformOrigin", "transform-origin"],
        ["underlinePosition", "underline-position"],
        ["underlineThickness", "underline-thickness"],
        ["unicodeBidi", "unicode-bidi"],
        ["unicodeRange", "unicode-range"],
        ["unitsPerEm", "units-per-em"],
        ["vAlphabetic", "v-alphabetic"],
        ["vHanging", "v-hanging"],
        ["vIdeographic", "v-ideographic"],
        ["vMathematical", "v-mathematical"],
        ["vectorEffect", "vector-effect"],
        ["vertAdvY", "vert-adv-y"],
        ["vertOriginX", "vert-origin-x"],
        ["vertOriginY", "vert-origin-y"],
        ["wordSpacing", "word-spacing"],
        ["writingMode", "writing-mode"],
        ["xmlnsXlink", "xmlns:xlink"],
        ["xHeight", "x-height"]
      ]), isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
      function sanitizeURL(url) {
        return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
      }
      function noop$1() {
      }
      var currentReplayingEvent = null;
      function getEventTarget(nativeEvent) {
        return nativeEvent = nativeEvent.target || nativeEvent.srcElement || window, nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement), nativeEvent.nodeType === 3 ? nativeEvent.parentNode : nativeEvent;
      }
      var restoreTarget = null, restoreQueue = null;
      function restoreStateOfTarget(target) {
        var internalInstance = getInstanceFromNode(target);
        if (internalInstance && (target = internalInstance.stateNode)) {
          var props = target[internalPropsKey] || null;
          a: switch (target = internalInstance.stateNode, internalInstance.type) {
            case "input":
              if (updateInput(
                target,
                props.value,
                props.defaultValue,
                props.defaultValue,
                props.checked,
                props.defaultChecked,
                props.type,
                props.name
              ), internalInstance = props.name, props.type === "radio" && internalInstance != null) {
                for (props = target; props.parentNode; ) props = props.parentNode;
                for (props = props.querySelectorAll(
                  'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
                    "" + internalInstance
                  ) + '"][type="radio"]'
                ), internalInstance = 0; internalInstance < props.length; internalInstance++) {
                  var otherNode = props[internalInstance];
                  if (otherNode !== target && otherNode.form === target.form) {
                    var otherProps = otherNode[internalPropsKey] || null;
                    if (!otherProps) throw Error(formatProdErrorMessage(90));
                    updateInput(
                      otherNode,
                      otherProps.value,
                      otherProps.defaultValue,
                      otherProps.defaultValue,
                      otherProps.checked,
                      otherProps.defaultChecked,
                      otherProps.type,
                      otherProps.name
                    );
                  }
                }
                for (internalInstance = 0; internalInstance < props.length; internalInstance++)
                  otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
              }
              break a;
            case "textarea":
              updateTextarea(target, props.value, props.defaultValue);
              break a;
            case "select":
              internalInstance = props.value, internalInstance != null && updateOptions(target, !!props.multiple, internalInstance, !1);
          }
        }
      }
      var isInsideEventHandler = !1;
      function batchedUpdates$1(fn, a, b) {
        if (isInsideEventHandler) return fn(a, b);
        isInsideEventHandler = !0;
        try {
          var JSCompiler_inline_result = fn(a);
          return JSCompiler_inline_result;
        } finally {
          if (isInsideEventHandler = !1, (restoreTarget !== null || restoreQueue !== null) && (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn)))
            for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
        }
      }
      function getListener(inst, registrationName) {
        var stateNode = inst.stateNode;
        if (stateNode === null) return null;
        var props = stateNode[internalPropsKey] || null;
        if (props === null) return null;
        stateNode = props[registrationName];
        a: switch (registrationName) {
          case "onClick":
          case "onClickCapture":
          case "onDoubleClick":
          case "onDoubleClickCapture":
          case "onMouseDown":
          case "onMouseDownCapture":
          case "onMouseMove":
          case "onMouseMoveCapture":
          case "onMouseUp":
          case "onMouseUpCapture":
          case "onMouseEnter":
            (props = !props.disabled) || (inst = inst.type, props = !(inst === "button" || inst === "input" || inst === "select" || inst === "textarea")), inst = !props;
            break a;
          default:
            inst = !1;
        }
        if (inst) return null;
        if (stateNode && typeof stateNode != "function")
          throw Error(
            formatProdErrorMessage(231, registrationName, typeof stateNode)
          );
        return stateNode;
      }
      var canUseDOM = !(typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined"), passiveBrowserEventsSupported = !1;
      if (canUseDOM)
        try {
          options = {}, Object.defineProperty(options, "passive", {
            get: function() {
              passiveBrowserEventsSupported = !0;
            }
          }), window.addEventListener("test", options, options), window.removeEventListener("test", options, options);
        } catch (e) {
          passiveBrowserEventsSupported = !1;
        }
      var options, root = null, startText = null, fallbackText = null;
      function getData() {
        if (fallbackText) return fallbackText;
        var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
        for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
        var minEnd = startLength - start;
        for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
        return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
      }
      function getEventCharCode(nativeEvent) {
        var keyCode = nativeEvent.keyCode;
        return "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, nativeEvent === 0 && keyCode === 13 && (nativeEvent = 13)) : nativeEvent = keyCode, nativeEvent === 10 && (nativeEvent = 13), 32 <= nativeEvent || nativeEvent === 13 ? nativeEvent : 0;
      }
      function functionThatReturnsTrue() {
        return !0;
      }
      function functionThatReturnsFalse() {
        return !1;
      }
      function createSyntheticEvent(Interface) {
        function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
          this._reactName = reactName, this._targetInst = targetInst, this.type = reactEventType, this.nativeEvent = nativeEvent, this.target = nativeEventTarget, this.currentTarget = null;
          for (var propName in Interface)
            Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
          return this.isDefaultPrevented = (nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === !1) ? functionThatReturnsTrue : functionThatReturnsFalse, this.isPropagationStopped = functionThatReturnsFalse, this;
        }
        return assign(SyntheticBaseEvent.prototype, {
          preventDefault: function() {
            this.defaultPrevented = !0;
            var event = this.nativeEvent;
            event && (event.preventDefault ? event.preventDefault() : typeof event.returnValue != "unknown" && (event.returnValue = !1), this.isDefaultPrevented = functionThatReturnsTrue);
          },
          stopPropagation: function() {
            var event = this.nativeEvent;
            event && (event.stopPropagation ? event.stopPropagation() : typeof event.cancelBubble != "unknown" && (event.cancelBubble = !0), this.isPropagationStopped = functionThatReturnsTrue);
          },
          persist: function() {
          },
          isPersistent: functionThatReturnsTrue
        }), SyntheticBaseEvent;
      }
      var EventInterface = {
        eventPhase: 0,
        bubbles: 0,
        cancelable: 0,
        timeStamp: function(event) {
          return event.timeStamp || Date.now();
        },
        defaultPrevented: 0,
        isTrusted: 0
      }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
        screenX: 0,
        screenY: 0,
        clientX: 0,
        clientY: 0,
        pageX: 0,
        pageY: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        getModifierState: getEventModifierState,
        button: 0,
        buttons: 0,
        relatedTarget: function(event) {
          return event.relatedTarget === void 0 ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
        },
        movementX: function(event) {
          return "movementX" in event ? event.movementX : (event !== lastMouseEvent && (lastMouseEvent && event.type === "mousemove" ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event), lastMovementX);
        },
        movementY: function(event) {
          return "movementY" in event ? event.movementY : lastMovementY;
        }
      }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
        animationName: 0,
        elapsedTime: 0,
        pseudoElement: 0
      }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
        clipboardData: function(event) {
          return "clipboardData" in event ? event.clipboardData : window.clipboardData;
        }
      }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface), normalizeKey = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified"
      }, translateToKey = {
        8: "Backspace",
        9: "Tab",
        12: "Clear",
        13: "Enter",
        16: "Shift",
        17: "Control",
        18: "Alt",
        19: "Pause",
        20: "CapsLock",
        27: "Escape",
        32: " ",
        33: "PageUp",
        34: "PageDown",
        35: "End",
        36: "Home",
        37: "ArrowLeft",
        38: "ArrowUp",
        39: "ArrowRight",
        40: "ArrowDown",
        45: "Insert",
        46: "Delete",
        112: "F1",
        113: "F2",
        114: "F3",
        115: "F4",
        116: "F5",
        117: "F6",
        118: "F7",
        119: "F8",
        120: "F9",
        121: "F10",
        122: "F11",
        123: "F12",
        144: "NumLock",
        145: "ScrollLock",
        224: "Meta"
      }, modifierKeyToProp = {
        Alt: "altKey",
        Control: "ctrlKey",
        Meta: "metaKey",
        Shift: "shiftKey"
      };
      function modifierStateGetter(keyArg) {
        var nativeEvent = this.nativeEvent;
        return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : !1;
      }
      function getEventModifierState() {
        return modifierStateGetter;
      }
      var KeyboardEventInterface = assign({}, UIEventInterface, {
        key: function(nativeEvent) {
          if (nativeEvent.key) {
            var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
            if (key !== "Unidentified") return key;
          }
          return nativeEvent.type === "keypress" ? (nativeEvent = getEventCharCode(nativeEvent), nativeEvent === 13 ? "Enter" : String.fromCharCode(nativeEvent)) : nativeEvent.type === "keydown" || nativeEvent.type === "keyup" ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
        },
        code: 0,
        location: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        repeat: 0,
        locale: 0,
        getModifierState: getEventModifierState,
        charCode: function(event) {
          return event.type === "keypress" ? getEventCharCode(event) : 0;
        },
        keyCode: function(event) {
          return event.type === "keydown" || event.type === "keyup" ? event.keyCode : 0;
        },
        which: function(event) {
          return event.type === "keypress" ? getEventCharCode(event) : event.type === "keydown" || event.type === "keyup" ? event.keyCode : 0;
        }
      }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
        pointerId: 0,
        width: 0,
        height: 0,
        pressure: 0,
        tangentialPressure: 0,
        tiltX: 0,
        tiltY: 0,
        twist: 0,
        pointerType: 0,
        isPrimary: 0
      }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
        touches: 0,
        targetTouches: 0,
        changedTouches: 0,
        altKey: 0,
        metaKey: 0,
        ctrlKey: 0,
        shiftKey: 0,
        getModifierState: getEventModifierState
      }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
        propertyName: 0,
        elapsedTime: 0,
        pseudoElement: 0
      }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
        deltaX: function(event) {
          return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
        },
        deltaY: function(event) {
          return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
        },
        deltaZ: 0,
        deltaMode: 0
      }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
        newState: 0,
        oldState: 0
      }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
      canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
      var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode, useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode), SPACEBAR_CHAR = " ", hasSpaceKeypress = !1;
      function isFallbackCompositionEnd(domEventName, nativeEvent) {
        switch (domEventName) {
          case "keyup":
            return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
          case "keydown":
            return nativeEvent.keyCode !== 229;
          case "keypress":
          case "mousedown":
          case "focusout":
            return !0;
          default:
            return !1;
        }
      }
      function getDataFromCustomEvent(nativeEvent) {
        return nativeEvent = nativeEvent.detail, typeof nativeEvent == "object" && "data" in nativeEvent ? nativeEvent.data : null;
      }
      var isComposing = !1;
      function getNativeBeforeInputChars(domEventName, nativeEvent) {
        switch (domEventName) {
          case "compositionend":
            return getDataFromCustomEvent(nativeEvent);
          case "keypress":
            return nativeEvent.which !== 32 ? null : (hasSpaceKeypress = !0, SPACEBAR_CHAR);
          case "textInput":
            return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
          default:
            return null;
        }
      }
      function getFallbackBeforeInputChars(domEventName, nativeEvent) {
        if (isComposing)
          return domEventName === "compositionend" || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = !1, domEventName) : null;
        switch (domEventName) {
          case "paste":
            return null;
          case "keypress":
            if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
              if (nativeEvent.char && 1 < nativeEvent.char.length)
                return nativeEvent.char;
              if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);
            }
            return null;
          case "compositionend":
            return useFallbackCompositionData && nativeEvent.locale !== "ko" ? null : nativeEvent.data;
          default:
            return null;
        }
      }
      var supportedInputTypes = {
        color: !0,
        date: !0,
        datetime: !0,
        "datetime-local": !0,
        email: !0,
        month: !0,
        number: !0,
        password: !0,
        range: !0,
        search: !0,
        tel: !0,
        text: !0,
        time: !0,
        url: !0,
        week: !0
      };
      function isTextInputElement(elem) {
        var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
        return nodeName === "input" ? !!supportedInputTypes[elem.type] : nodeName === "textarea";
      }
      function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
        restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target, inst = accumulateTwoPhaseListeners(inst, "onChange"), 0 < inst.length && (nativeEvent = new SyntheticEvent(
          "onChange",
          "change",
          null,
          nativeEvent,
          target
        ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
      }
      var activeElement$1 = null, activeElementInst$1 = null;
      function runEventInBatch(dispatchQueue) {
        processDispatchQueue(dispatchQueue, 0);
      }
      function getInstIfValueChanged(targetInst) {
        var targetNode = getNodeFromInstance(targetInst);
        if (updateValueIfChanged(targetNode)) return targetInst;
      }
      function getTargetInstForChangeEvent(domEventName, targetInst) {
        if (domEventName === "change") return targetInst;
      }
      var isInputEventSupported = !1;
      canUseDOM && (canUseDOM ? (isSupported$jscomp$inline_427 = "oninput" in document, isSupported$jscomp$inline_427 || (element$jscomp$inline_428 = document.createElement("div"), element$jscomp$inline_428.setAttribute("oninput", "return;"), isSupported$jscomp$inline_427 = typeof element$jscomp$inline_428.oninput == "function"), JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427) : JSCompiler_inline_result$jscomp$286 = !1, isInputEventSupported = JSCompiler_inline_result$jscomp$286 && (!document.documentMode || 9 < document.documentMode));
      var JSCompiler_inline_result$jscomp$286, isSupported$jscomp$inline_427, element$jscomp$inline_428;
      function stopWatchingForValueChange() {
        activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
      }
      function handlePropertyChange(nativeEvent) {
        if (nativeEvent.propertyName === "value" && getInstIfValueChanged(activeElementInst$1)) {
          var dispatchQueue = [];
          createAndAccumulateChangeEvent(
            dispatchQueue,
            activeElementInst$1,
            nativeEvent,
            getEventTarget(nativeEvent)
          ), batchedUpdates$1(runEventInBatch, dispatchQueue);
        }
      }
      function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
        domEventName === "focusin" ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : domEventName === "focusout" && stopWatchingForValueChange();
      }
      function getTargetInstForInputEventPolyfill(domEventName) {
        if (domEventName === "selectionchange" || domEventName === "keyup" || domEventName === "keydown")
          return getInstIfValueChanged(activeElementInst$1);
      }
      function getTargetInstForClickEvent(domEventName, targetInst) {
        if (domEventName === "click") return getInstIfValueChanged(targetInst);
      }
      function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
        if (domEventName === "input" || domEventName === "change")
          return getInstIfValueChanged(targetInst);
      }
      function is(x, y) {
        return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
      }
      var objectIs = typeof Object.is == "function" ? Object.is : is;
      function shallowEqual(objA, objB) {
        if (objectIs(objA, objB)) return !0;
        if (typeof objA != "object" || objA === null || typeof objB != "object" || objB === null)
          return !1;
        var keysA = Object.keys(objA), keysB = Object.keys(objB);
        if (keysA.length !== keysB.length) return !1;
        for (keysB = 0; keysB < keysA.length; keysB++) {
          var currentKey = keysA[keysB];
          if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
            return !1;
        }
        return !0;
      }
      function getLeafNode(node) {
        for (; node && node.firstChild; ) node = node.firstChild;
        return node;
      }
      function getNodeForCharacterOffset(root2, offset) {
        var node = getLeafNode(root2);
        root2 = 0;
        for (var nodeEnd; node; ) {
          if (node.nodeType === 3) {
            if (nodeEnd = root2 + node.textContent.length, root2 <= offset && nodeEnd >= offset)
              return { node, offset: offset - root2 };
            root2 = nodeEnd;
          }
          a: {
            for (; node; ) {
              if (node.nextSibling) {
                node = node.nextSibling;
                break a;
              }
              node = node.parentNode;
            }
            node = void 0;
          }
          node = getLeafNode(node);
        }
      }
      function containsNode(outerNode, innerNode) {
        return outerNode && innerNode ? outerNode === innerNode ? !0 : outerNode && outerNode.nodeType === 3 ? !1 : innerNode && innerNode.nodeType === 3 ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : !1 : !1;
      }
      function getActiveElementDeep(containerInfo) {
        containerInfo = containerInfo != null && containerInfo.ownerDocument != null && containerInfo.ownerDocument.defaultView != null ? containerInfo.ownerDocument.defaultView : window;
        for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
          try {
            var JSCompiler_inline_result = typeof element.contentWindow.location.href == "string";
          } catch (err) {
            JSCompiler_inline_result = !1;
          }
          if (JSCompiler_inline_result) containerInfo = element.contentWindow;
          else break;
          element = getActiveElement(containerInfo.document);
        }
        return element;
      }
      function hasSelectionCapabilities(elem) {
        var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
        return nodeName && (nodeName === "input" && (elem.type === "text" || elem.type === "search" || elem.type === "tel" || elem.type === "url" || elem.type === "password") || nodeName === "textarea" || elem.contentEditable === "true");
      }
      var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = !1;
      function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
        var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument;
        mouseDown || activeElement == null || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = {
          anchorNode: doc.anchorNode,
          anchorOffset: doc.anchorOffset,
          focusNode: doc.focusNode,
          focusOffset: doc.focusOffset
        }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
          "onSelect",
          "select",
          null,
          nativeEvent,
          nativeEventTarget
        ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
      }
      function makePrefixMap(styleProp, eventName) {
        var prefixes = {};
        return prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(), prefixes["Webkit" + styleProp] = "webkit" + eventName, prefixes["Moz" + styleProp] = "moz" + eventName, prefixes;
      }
      var vendorPrefixes = {
        animationend: makePrefixMap("Animation", "AnimationEnd"),
        animationiteration: makePrefixMap("Animation", "AnimationIteration"),
        animationstart: makePrefixMap("Animation", "AnimationStart"),
        transitionrun: makePrefixMap("Transition", "TransitionRun"),
        transitionstart: makePrefixMap("Transition", "TransitionStart"),
        transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
        transitionend: makePrefixMap("Transition", "TransitionEnd")
      }, prefixedEventNames = {}, style = {};
      canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition);
      function getVendorPrefixedEventName(eventName) {
        if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
        if (!vendorPrefixes[eventName]) return eventName;
        var prefixMap = vendorPrefixes[eventName], styleProp;
        for (styleProp in prefixMap)
          if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
            return prefixedEventNames[eventName] = prefixMap[styleProp];
        return eventName;
      }
      var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
        " "
      );
      simpleEventPluginEvents.push("scrollEnd");
      function registerSimpleEvent(domEventName, reactName) {
        topLevelEventsToReactNames.set(domEventName, reactName), registerTwoPhaseEvent(reactName, [domEventName]);
      }
      var reportGlobalError = typeof reportError == "function" ? reportError : function(error) {
        if (typeof window == "object" && typeof window.ErrorEvent == "function") {
          var event = new window.ErrorEvent("error", {
            bubbles: !0,
            cancelable: !0,
            message: typeof error == "object" && error !== null && typeof error.message == "string" ? String(error.message) : String(error),
            error
          });
          if (!window.dispatchEvent(event)) return;
        } else if (typeof process == "object" && typeof process.emit == "function") {
          process.emit("uncaughtException", error);
          return;
        }
        console.error(error);
      }, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0;
      function finishQueueingConcurrentUpdates() {
        for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
          var fiber = concurrentQueues[i];
          concurrentQueues[i++] = null;
          var queue = concurrentQueues[i];
          concurrentQueues[i++] = null;
          var update = concurrentQueues[i];
          concurrentQueues[i++] = null;
          var lane = concurrentQueues[i];
          if (concurrentQueues[i++] = null, queue !== null && update !== null) {
            var pending = queue.pending;
            pending === null ? update.next = update : (update.next = pending.next, pending.next = update), queue.pending = update;
          }
          lane !== 0 && markUpdateLaneFromFiberToRoot(fiber, update, lane);
        }
      }
      function enqueueUpdate$1(fiber, queue, update, lane) {
        concurrentQueues[concurrentQueuesIndex++] = fiber, concurrentQueues[concurrentQueuesIndex++] = queue, concurrentQueues[concurrentQueuesIndex++] = update, concurrentQueues[concurrentQueuesIndex++] = lane, concurrentlyUpdatedLanes |= lane, fiber.lanes |= lane, fiber = fiber.alternate, fiber !== null && (fiber.lanes |= lane);
      }
      function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
        return enqueueUpdate$1(fiber, queue, update, lane), getRootForUpdatedFiber(fiber);
      }
      function enqueueConcurrentRenderForLane(fiber, lane) {
        return enqueueUpdate$1(fiber, null, null, lane), getRootForUpdatedFiber(fiber);
      }
      function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
        sourceFiber.lanes |= lane;
        var alternate = sourceFiber.alternate;
        alternate !== null && (alternate.lanes |= lane);
        for (var isHidden = !1, parent = sourceFiber.return; parent !== null; )
          parent.childLanes |= lane, alternate = parent.alternate, alternate !== null && (alternate.childLanes |= lane), parent.tag === 22 && (sourceFiber = parent.stateNode, sourceFiber === null || sourceFiber._visibility & 1 || (isHidden = !0)), sourceFiber = parent, parent = parent.return;
        return sourceFiber.tag === 3 ? (parent = sourceFiber.stateNode, isHidden && update !== null && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], alternate === null ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
      }
      function getRootForUpdatedFiber(sourceFiber) {
        if (50 < nestedUpdateCount)
          throw nestedUpdateCount = 0, rootWithNestedUpdates = null, Error(formatProdErrorMessage(185));
        for (var parent = sourceFiber.return; parent !== null; )
          sourceFiber = parent, parent = sourceFiber.return;
        return sourceFiber.tag === 3 ? sourceFiber.stateNode : null;
      }
      var emptyContextObject = {};
      function FiberNode(tag, pendingProps, key, mode) {
        this.tag = tag, this.key = key, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.refCleanup = this.ref = null, this.pendingProps = pendingProps, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = mode, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
      }
      function createFiberImplClass(tag, pendingProps, key, mode) {
        return new FiberNode(tag, pendingProps, key, mode);
      }
      function shouldConstruct(Component4) {
        return Component4 = Component4.prototype, !(!Component4 || !Component4.isReactComponent);
      }
      function createWorkInProgress(current, pendingProps) {
        var workInProgress2 = current.alternate;
        return workInProgress2 === null ? (workInProgress2 = createFiberImplClass(
          current.tag,
          pendingProps,
          current.key,
          current.mode
        ), workInProgress2.elementType = current.elementType, workInProgress2.type = current.type, workInProgress2.stateNode = current.stateNode, workInProgress2.alternate = current, current.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null), workInProgress2.flags = current.flags & 65011712, workInProgress2.childLanes = current.childLanes, workInProgress2.lanes = current.lanes, workInProgress2.child = current.child, workInProgress2.memoizedProps = current.memoizedProps, workInProgress2.memoizedState = current.memoizedState, workInProgress2.updateQueue = current.updateQueue, pendingProps = current.dependencies, workInProgress2.dependencies = pendingProps === null ? null : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext }, workInProgress2.sibling = current.sibling, workInProgress2.index = current.index, workInProgress2.ref = current.ref, workInProgress2.refCleanup = current.refCleanup, workInProgress2;
      }
      function resetWorkInProgress(workInProgress2, renderLanes2) {
        workInProgress2.flags &= 65011714;
        var current = workInProgress2.alternate;
        return current === null ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null) : (workInProgress2.childLanes = current.childLanes, workInProgress2.lanes = current.lanes, workInProgress2.child = current.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current.memoizedProps, workInProgress2.memoizedState = current.memoizedState, workInProgress2.updateQueue = current.updateQueue, workInProgress2.type = current.type, renderLanes2 = current.dependencies, workInProgress2.dependencies = renderLanes2 === null ? null : {
          lanes: renderLanes2.lanes,
          firstContext: renderLanes2.firstContext
        }), workInProgress2;
      }
      function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
        var fiberTag = 0;
        if (owner = type, typeof type == "function") shouldConstruct(type) && (fiberTag = 1);
        else if (typeof type == "string")
          fiberTag = isHostHoistableType(
            type,
            pendingProps,
            contextStackCursor.current
          ) ? 26 : type === "html" || type === "head" || type === "body" ? 27 : 5;
        else
          a: switch (type) {
            case REACT_ACTIVITY_TYPE:
              return type = createFiberImplClass(31, pendingProps, key, mode), type.elementType = REACT_ACTIVITY_TYPE, type.lanes = lanes, type;
            case REACT_FRAGMENT_TYPE:
              return createFiberFromFragment(pendingProps.children, mode, lanes, key);
            case REACT_STRICT_MODE_TYPE:
              fiberTag = 8, mode |= 24;
              break;
            case REACT_PROFILER_TYPE:
              return type = createFiberImplClass(12, pendingProps, key, mode | 2), type.elementType = REACT_PROFILER_TYPE, type.lanes = lanes, type;
            case REACT_SUSPENSE_TYPE:
              return type = createFiberImplClass(13, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_TYPE, type.lanes = lanes, type;
            case REACT_SUSPENSE_LIST_TYPE:
              return type = createFiberImplClass(19, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_LIST_TYPE, type.lanes = lanes, type;
            default:
              if (typeof type == "object" && type !== null)
                switch (type.$$typeof) {
                  case REACT_CONTEXT_TYPE:
                    fiberTag = 10;
                    break a;
                  case REACT_CONSUMER_TYPE:
                    fiberTag = 9;
                    break a;
                  case REACT_FORWARD_REF_TYPE:
                    fiberTag = 11;
                    break a;
                  case REACT_MEMO_TYPE:
                    fiberTag = 14;
                    break a;
                  case REACT_LAZY_TYPE:
                    fiberTag = 16, owner = null;
                    break a;
                }
              fiberTag = 29, pendingProps = Error(
                formatProdErrorMessage(130, type === null ? "null" : typeof type, "")
              ), owner = null;
          }
        return key = createFiberImplClass(fiberTag, pendingProps, key, mode), key.elementType = type, key.type = owner, key.lanes = lanes, key;
      }
      function createFiberFromFragment(elements, mode, lanes, key) {
        return elements = createFiberImplClass(7, elements, key, mode), elements.lanes = lanes, elements;
      }
      function createFiberFromText(content, mode, lanes) {
        return content = createFiberImplClass(6, content, null, mode), content.lanes = lanes, content;
      }
      function createFiberFromDehydratedFragment(dehydratedNode) {
        var fiber = createFiberImplClass(18, null, null, 0);
        return fiber.stateNode = dehydratedNode, fiber;
      }
      function createFiberFromPortal(portal, mode, lanes) {
        return mode = createFiberImplClass(
          4,
          portal.children !== null ? portal.children : [],
          portal.key,
          mode
        ), mode.lanes = lanes, mode.stateNode = {
          containerInfo: portal.containerInfo,
          pendingChildren: null,
          implementation: portal.implementation
        }, mode;
      }
      var CapturedStacks = /* @__PURE__ */ new WeakMap();
      function createCapturedValueAtFiber(value, source) {
        if (typeof value == "object" && value !== null) {
          var existing = CapturedStacks.get(value);
          return existing !== void 0 ? existing : (source = {
            value,
            source,
            stack: getStackByFiberInDevAndProd(source)
          }, CapturedStacks.set(value, source), source);
        }
        return {
          value,
          source,
          stack: getStackByFiberInDevAndProd(source)
        };
      }
      var forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "";
      function pushTreeFork(workInProgress2, totalChildren) {
        forkStack[forkStackIndex++] = treeForkCount, forkStack[forkStackIndex++] = treeForkProvider, treeForkProvider = workInProgress2, treeForkCount = totalChildren;
      }
      function pushTreeId(workInProgress2, totalChildren, index2) {
        idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextProvider = workInProgress2;
        var baseIdWithLeadingBit = treeContextId;
        workInProgress2 = treeContextOverflow;
        var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
        baseIdWithLeadingBit &= ~(1 << baseLength), index2 += 1;
        var length = 32 - clz32(totalChildren) + baseLength;
        if (30 < length) {
          var numberOfOverflowBits = baseLength - baseLength % 5;
          length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32), baseIdWithLeadingBit >>= numberOfOverflowBits, baseLength -= numberOfOverflowBits, treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index2 << baseLength | baseIdWithLeadingBit, treeContextOverflow = length + workInProgress2;
        } else
          treeContextId = 1 << length | index2 << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
      }
      function pushMaterializedTreeId(workInProgress2) {
        workInProgress2.return !== null && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
      }
      function popTreeContext(workInProgress2) {
        for (; workInProgress2 === treeForkProvider; )
          treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
        for (; workInProgress2 === treeContextProvider; )
          treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
      }
      function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
        idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = suspendedContext.id, treeContextOverflow = suspendedContext.overflow, treeContextProvider = workInProgress2;
      }
      var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1, HydrationMismatchException = Error(formatProdErrorMessage(519));
      function throwOnHydrationMismatch(fiber) {
        var error = Error(
          formatProdErrorMessage(
            418,
            1 < arguments.length && arguments[1] !== void 0 && arguments[1] ? "text" : "HTML",
            ""
          )
        );
        throw queueHydrationError(createCapturedValueAtFiber(error, fiber)), HydrationMismatchException;
      }
      function prepareToHydrateHostInstance(fiber) {
        var instance = fiber.stateNode, type = fiber.type, props = fiber.memoizedProps;
        switch (instance[internalInstanceKey] = fiber, instance[internalPropsKey] = props, type) {
          case "dialog":
            listenToNonDelegatedEvent("cancel", instance), listenToNonDelegatedEvent("close", instance);
            break;
          case "iframe":
          case "object":
          case "embed":
            listenToNonDelegatedEvent("load", instance);
            break;
          case "video":
          case "audio":
            for (type = 0; type < mediaEventTypes.length; type++)
              listenToNonDelegatedEvent(mediaEventTypes[type], instance);
            break;
          case "source":
            listenToNonDelegatedEvent("error", instance);
            break;
          case "img":
          case "image":
          case "link":
            listenToNonDelegatedEvent("error", instance), listenToNonDelegatedEvent("load", instance);
            break;
          case "details":
            listenToNonDelegatedEvent("toggle", instance);
            break;
          case "input":
            listenToNonDelegatedEvent("invalid", instance), initInput(
              instance,
              props.value,
              props.defaultValue,
              props.checked,
              props.defaultChecked,
              props.type,
              props.name,
              !0
            );
            break;
          case "select":
            listenToNonDelegatedEvent("invalid", instance);
            break;
          case "textarea":
            listenToNonDelegatedEvent("invalid", instance), initTextarea(instance, props.value, props.defaultValue, props.children);
        }
        type = props.children, typeof type != "string" && typeof type != "number" && typeof type != "bigint" || instance.textContent === "" + type || props.suppressHydrationWarning === !0 || checkForUnmatchedText(instance.textContent, type) ? (props.popover != null && (listenToNonDelegatedEvent("beforetoggle", instance), listenToNonDelegatedEvent("toggle", instance)), props.onScroll != null && listenToNonDelegatedEvent("scroll", instance), props.onScrollEnd != null && listenToNonDelegatedEvent("scrollend", instance), props.onClick != null && (instance.onclick = noop$1), instance = !0) : instance = !1, instance || throwOnHydrationMismatch(fiber, !0);
      }
      function popToNextHostParent(fiber) {
        for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
          switch (hydrationParentFiber.tag) {
            case 5:
            case 31:
            case 13:
              rootOrSingletonContext = !1;
              return;
            case 27:
            case 3:
              rootOrSingletonContext = !0;
              return;
            default:
              hydrationParentFiber = hydrationParentFiber.return;
          }
      }
      function popHydrationState(fiber) {
        if (fiber !== hydrationParentFiber) return !1;
        if (!isHydrating) return popToNextHostParent(fiber), isHydrating = !0, !1;
        var tag = fiber.tag, JSCompiler_temp;
        if ((JSCompiler_temp = tag !== 3 && tag !== 27) && ((JSCompiler_temp = tag === 5) && (JSCompiler_temp = fiber.type, JSCompiler_temp = !(JSCompiler_temp !== "form" && JSCompiler_temp !== "button") || shouldSetTextContent(fiber.type, fiber.memoizedProps)), JSCompiler_temp = !JSCompiler_temp), JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber), popToNextHostParent(fiber), tag === 13) {
          if (fiber = fiber.memoizedState, fiber = fiber !== null ? fiber.dehydrated : null, !fiber) throw Error(formatProdErrorMessage(317));
          nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
        } else if (tag === 31) {
          if (fiber = fiber.memoizedState, fiber = fiber !== null ? fiber.dehydrated : null, !fiber) throw Error(formatProdErrorMessage(317));
          nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
        } else
          tag === 27 ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
        return !0;
      }
      function resetHydrationState() {
        nextHydratableInstance = hydrationParentFiber = null, isHydrating = !1;
      }
      function upgradeHydrationErrorsToRecoverable() {
        var queuedErrors = hydrationErrors;
        return queuedErrors !== null && (workInProgressRootRecoverableErrors === null ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
          workInProgressRootRecoverableErrors,
          queuedErrors
        ), hydrationErrors = null), queuedErrors;
      }
      function queueHydrationError(error) {
        hydrationErrors === null ? hydrationErrors = [error] : hydrationErrors.push(error);
      }
      var valueCursor = createCursor(null), currentlyRenderingFiber$1 = null, lastContextDependency = null;
      function pushProvider(providerFiber, context, nextValue) {
        push(valueCursor, context._currentValue), context._currentValue = nextValue;
      }
      function popProvider(context) {
        context._currentValue = valueCursor.current, pop(valueCursor);
      }
      function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
        for (; parent !== null; ) {
          var alternate = parent.alternate;
          if ((parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, alternate !== null && (alternate.childLanes |= renderLanes2)) : alternate !== null && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2), parent === propagationRoot) break;
          parent = parent.return;
        }
      }
      function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
        var fiber = workInProgress2.child;
        for (fiber !== null && (fiber.return = workInProgress2); fiber !== null; ) {
          var list = fiber.dependencies;
          if (list !== null) {
            var nextFiber = fiber.child;
            list = list.firstContext;
            a: for (; list !== null; ) {
              var dependency = list;
              list = fiber;
              for (var i = 0; i < contexts.length; i++)
                if (dependency.context === contexts[i]) {
                  list.lanes |= renderLanes2, dependency = list.alternate, dependency !== null && (dependency.lanes |= renderLanes2), scheduleContextWorkOnParentPath(
                    list.return,
                    renderLanes2,
                    workInProgress2
                  ), forcePropagateEntireTree || (nextFiber = null);
                  break a;
                }
              list = dependency.next;
            }
          } else if (fiber.tag === 18) {
            if (nextFiber = fiber.return, nextFiber === null) throw Error(formatProdErrorMessage(341));
            nextFiber.lanes |= renderLanes2, list = nextFiber.alternate, list !== null && (list.lanes |= renderLanes2), scheduleContextWorkOnParentPath(nextFiber, renderLanes2, workInProgress2), nextFiber = null;
          } else nextFiber = fiber.child;
          if (nextFiber !== null) nextFiber.return = fiber;
          else
            for (nextFiber = fiber; nextFiber !== null; ) {
              if (nextFiber === workInProgress2) {
                nextFiber = null;
                break;
              }
              if (fiber = nextFiber.sibling, fiber !== null) {
                fiber.return = nextFiber.return, nextFiber = fiber;
                break;
              }
              nextFiber = nextFiber.return;
            }
          fiber = nextFiber;
        }
      }
      function propagateParentContextChanges(current, workInProgress2, renderLanes2, forcePropagateEntireTree) {
        current = null;
        for (var parent = workInProgress2, isInsidePropagationBailout = !1; parent !== null; ) {
          if (!isInsidePropagationBailout) {
            if ((parent.flags & 524288) !== 0) isInsidePropagationBailout = !0;
            else if ((parent.flags & 262144) !== 0) break;
          }
          if (parent.tag === 10) {
            var currentParent = parent.alternate;
            if (currentParent === null) throw Error(formatProdErrorMessage(387));
            if (currentParent = currentParent.memoizedProps, currentParent !== null) {
              var context = parent.type;
              objectIs(parent.pendingProps.value, currentParent.value) || (current !== null ? current.push(context) : current = [context]);
            }
          } else if (parent === hostTransitionProviderCursor.current) {
            if (currentParent = parent.alternate, currentParent === null) throw Error(formatProdErrorMessage(387));
            currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (current !== null ? current.push(HostTransitionContext) : current = [HostTransitionContext]);
          }
          parent = parent.return;
        }
        current !== null && propagateContextChanges(
          workInProgress2,
          current,
          renderLanes2,
          forcePropagateEntireTree
        ), workInProgress2.flags |= 262144;
      }
      function checkIfContextChanged(currentDependencies) {
        for (currentDependencies = currentDependencies.firstContext; currentDependencies !== null; ) {
          if (!objectIs(
            currentDependencies.context._currentValue,
            currentDependencies.memoizedValue
          ))
            return !0;
          currentDependencies = currentDependencies.next;
        }
        return !1;
      }
      function prepareToReadContext(workInProgress2) {
        currentlyRenderingFiber$1 = workInProgress2, lastContextDependency = null, workInProgress2 = workInProgress2.dependencies, workInProgress2 !== null && (workInProgress2.firstContext = null);
      }
      function readContext(context) {
        return readContextForConsumer(currentlyRenderingFiber$1, context);
      }
      function readContextDuringReconciliation(consumer, context) {
        return currentlyRenderingFiber$1 === null && prepareToReadContext(consumer), readContextForConsumer(consumer, context);
      }
      function readContextForConsumer(consumer, context) {
        var value = context._currentValue;
        if (context = { context, memoizedValue: value, next: null }, lastContextDependency === null) {
          if (consumer === null) throw Error(formatProdErrorMessage(308));
          lastContextDependency = context, consumer.dependencies = { lanes: 0, firstContext: context }, consumer.flags |= 524288;
        } else lastContextDependency = lastContextDependency.next = context;
        return value;
      }
      var AbortControllerLocal = typeof AbortController != "undefined" ? AbortController : function() {
        var listeners = [], signal = this.signal = {
          aborted: !1,
          addEventListener: function(type, listener) {
            listeners.push(listener);
          }
        };
        this.abort = function() {
          signal.aborted = !0, listeners.forEach(function(listener) {
            return listener();
          });
        };
      }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
        $$typeof: REACT_CONTEXT_TYPE,
        Consumer: null,
        Provider: null,
        _currentValue: null,
        _currentValue2: null,
        _threadCount: 0
      };
      function createCache() {
        return {
          controller: new AbortControllerLocal(),
          data: /* @__PURE__ */ new Map(),
          refCount: 0
        };
      }
      function releaseCache(cache) {
        cache.refCount--, cache.refCount === 0 && scheduleCallback$2(NormalPriority, function() {
          cache.controller.abort();
        });
      }
      var currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null;
      function entangleAsyncAction(transition, thenable) {
        if (currentEntangledListeners === null) {
          var entangledListeners = currentEntangledListeners = [];
          currentEntangledPendingCount = 0, currentEntangledLane = requestTransitionLane(), currentEntangledActionThenable = {
            status: "pending",
            value: void 0,
            then: function(resolve) {
              entangledListeners.push(resolve);
            }
          };
        }
        return currentEntangledPendingCount++, thenable.then(pingEngtangledActionScope, pingEngtangledActionScope), thenable;
      }
      function pingEngtangledActionScope() {
        if (--currentEntangledPendingCount === 0 && currentEntangledListeners !== null) {
          currentEntangledActionThenable !== null && (currentEntangledActionThenable.status = "fulfilled");
          var listeners = currentEntangledListeners;
          currentEntangledListeners = null, currentEntangledLane = 0, currentEntangledActionThenable = null;
          for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
        }
      }
      function chainThenableValue(thenable, result) {
        var listeners = [], thenableWithOverride = {
          status: "pending",
          value: null,
          reason: null,
          then: function(resolve) {
            listeners.push(resolve);
          }
        };
        return thenable.then(
          function() {
            thenableWithOverride.status = "fulfilled", thenableWithOverride.value = result;
            for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
          },
          function(error) {
            for (thenableWithOverride.status = "rejected", thenableWithOverride.reason = error, error = 0; error < listeners.length; error++)
              (0, listeners[error])(void 0);
          }
        ), thenableWithOverride;
      }
      var prevOnStartTransitionFinish = ReactSharedInternals.S;
      ReactSharedInternals.S = function(transition, returnValue) {
        globalMostRecentTransitionTime = now(), typeof returnValue == "object" && returnValue !== null && typeof returnValue.then == "function" && entangleAsyncAction(transition, returnValue), prevOnStartTransitionFinish !== null && prevOnStartTransitionFinish(transition, returnValue);
      };
      var resumedCache = createCursor(null);
      function peekCacheFromPool() {
        var cacheResumedFromPreviousRender = resumedCache.current;
        return cacheResumedFromPreviousRender !== null ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
      }
      function pushTransition(offscreenWorkInProgress, prevCachePool) {
        prevCachePool === null ? push(resumedCache, resumedCache.current) : push(resumedCache, prevCachePool.pool);
      }
      function getSuspendedCache() {
        var cacheFromPool = peekCacheFromPool();
        return cacheFromPool === null ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
      }
      var SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), SuspenseActionException = Error(formatProdErrorMessage(542)), noopSuspenseyCommitThenable = { then: function() {
      } };
      function isThenableResolved(thenable) {
        return thenable = thenable.status, thenable === "fulfilled" || thenable === "rejected";
      }
      function trackUsedThenable(thenableState2, thenable, index2) {
        switch (index2 = thenableState2[index2], index2 === void 0 ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop$1, noop$1), thenable = index2), thenable.status) {
          case "fulfilled":
            return thenable.value;
          case "rejected":
            throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
          default:
            if (typeof thenable.status == "string") thenable.then(noop$1, noop$1);
            else {
              if (thenableState2 = workInProgressRoot, thenableState2 !== null && 100 < thenableState2.shellSuspendCounter)
                throw Error(formatProdErrorMessage(482));
              thenableState2 = thenable, thenableState2.status = "pending", thenableState2.then(
                function(fulfilledValue) {
                  if (thenable.status === "pending") {
                    var fulfilledThenable = thenable;
                    fulfilledThenable.status = "fulfilled", fulfilledThenable.value = fulfilledValue;
                  }
                },
                function(error) {
                  if (thenable.status === "pending") {
                    var rejectedThenable = thenable;
                    rejectedThenable.status = "rejected", rejectedThenable.reason = error;
                  }
                }
              );
            }
            switch (thenable.status) {
              case "fulfilled":
                return thenable.value;
              case "rejected":
                throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
            }
            throw suspendedThenable = thenable, SuspenseException;
        }
      }
      function resolveLazy(lazyType) {
        try {
          var init = lazyType._init;
          return init(lazyType._payload);
        } catch (x) {
          throw x !== null && typeof x == "object" && typeof x.then == "function" ? (suspendedThenable = x, SuspenseException) : x;
        }
      }
      var suspendedThenable = null;
      function getSuspendedThenable() {
        if (suspendedThenable === null) throw Error(formatProdErrorMessage(459));
        var thenable = suspendedThenable;
        return suspendedThenable = null, thenable;
      }
      function checkIfUseWrappedInAsyncCatch(rejectedReason) {
        if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
          throw Error(formatProdErrorMessage(483));
      }
      var thenableState$1 = null, thenableIndexCounter$1 = 0;
      function unwrapThenable(thenable) {
        var index2 = thenableIndexCounter$1;
        return thenableIndexCounter$1 += 1, thenableState$1 === null && (thenableState$1 = []), trackUsedThenable(thenableState$1, thenable, index2);
      }
      function coerceRef(workInProgress2, element) {
        element = element.props.ref, workInProgress2.ref = element !== void 0 ? element : null;
      }
      function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
        throw newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE ? Error(formatProdErrorMessage(525)) : (returnFiber = Object.prototype.toString.call(newChild), Error(
          formatProdErrorMessage(
            31,
            returnFiber === "[object Object]" ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber
          )
        ));
      }
      function createChildReconciler(shouldTrackSideEffects) {
        function deleteChild(returnFiber, childToDelete) {
          if (shouldTrackSideEffects) {
            var deletions = returnFiber.deletions;
            deletions === null ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
          }
        }
        function deleteRemainingChildren(returnFiber, currentFirstChild) {
          if (!shouldTrackSideEffects) return null;
          for (; currentFirstChild !== null; )
            deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
          return null;
        }
        function mapRemainingChildren(currentFirstChild) {
          for (var existingChildren = /* @__PURE__ */ new Map(); currentFirstChild !== null; )
            currentFirstChild.key !== null ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
          return existingChildren;
        }
        function useFiber(fiber, pendingProps) {
          return fiber = createWorkInProgress(fiber, pendingProps), fiber.index = 0, fiber.sibling = null, fiber;
        }
        function placeChild(newFiber, lastPlacedIndex, newIndex) {
          return newFiber.index = newIndex, shouldTrackSideEffects ? (newIndex = newFiber.alternate, newIndex !== null ? (newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex) : (newFiber.flags |= 67108866, lastPlacedIndex)) : (newFiber.flags |= 1048576, lastPlacedIndex);
        }
        function placeSingleChild(newFiber) {
          return shouldTrackSideEffects && newFiber.alternate === null && (newFiber.flags |= 67108866), newFiber;
        }
        function updateTextNode(returnFiber, current, textContent, lanes) {
          return current === null || current.tag !== 6 ? (current = createFiberFromText(textContent, returnFiber.mode, lanes), current.return = returnFiber, current) : (current = useFiber(current, textContent), current.return = returnFiber, current);
        }
        function updateElement(returnFiber, current, element, lanes) {
          var elementType = element.type;
          return elementType === REACT_FRAGMENT_TYPE ? updateFragment(
            returnFiber,
            current,
            element.props.children,
            lanes,
            element.key
          ) : current !== null && (current.elementType === elementType || typeof elementType == "object" && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) ? (current = useFiber(current, element.props), coerceRef(current, element), current.return = returnFiber, current) : (current = createFiberFromTypeAndProps(
            element.type,
            element.key,
            element.props,
            null,
            returnFiber.mode,
            lanes
          ), coerceRef(current, element), current.return = returnFiber, current);
        }
        function updatePortal(returnFiber, current, portal, lanes) {
          return current === null || current.tag !== 4 || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation ? (current = createFiberFromPortal(portal, returnFiber.mode, lanes), current.return = returnFiber, current) : (current = useFiber(current, portal.children || []), current.return = returnFiber, current);
        }
        function updateFragment(returnFiber, current, fragment, lanes, key) {
          return current === null || current.tag !== 7 ? (current = createFiberFromFragment(
            fragment,
            returnFiber.mode,
            lanes,
            key
          ), current.return = returnFiber, current) : (current = useFiber(current, fragment), current.return = returnFiber, current);
        }
        function createChild(returnFiber, newChild, lanes) {
          if (typeof newChild == "string" && newChild !== "" || typeof newChild == "number" || typeof newChild == "bigint")
            return newChild = createFiberFromText(
              "" + newChild,
              returnFiber.mode,
              lanes
            ), newChild.return = returnFiber, newChild;
          if (typeof newChild == "object" && newChild !== null) {
            switch (newChild.$$typeof) {
              case REACT_ELEMENT_TYPE:
                return lanes = createFiberFromTypeAndProps(
                  newChild.type,
                  newChild.key,
                  newChild.props,
                  null,
                  returnFiber.mode,
                  lanes
                ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes;
              case REACT_PORTAL_TYPE:
                return newChild = createFiberFromPortal(
                  newChild,
                  returnFiber.mode,
                  lanes
                ), newChild.return = returnFiber, newChild;
              case REACT_LAZY_TYPE:
                return newChild = resolveLazy(newChild), createChild(returnFiber, newChild, lanes);
            }
            if (isArrayImpl(newChild) || getIteratorFn(newChild))
              return newChild = createFiberFromFragment(
                newChild,
                returnFiber.mode,
                lanes,
                null
              ), newChild.return = returnFiber, newChild;
            if (typeof newChild.then == "function")
              return createChild(returnFiber, unwrapThenable(newChild), lanes);
            if (newChild.$$typeof === REACT_CONTEXT_TYPE)
              return createChild(
                returnFiber,
                readContextDuringReconciliation(returnFiber, newChild),
                lanes
              );
            throwOnInvalidObjectTypeImpl(returnFiber, newChild);
          }
          return null;
        }
        function updateSlot(returnFiber, oldFiber, newChild, lanes) {
          var key = oldFiber !== null ? oldFiber.key : null;
          if (typeof newChild == "string" && newChild !== "" || typeof newChild == "number" || typeof newChild == "bigint")
            return key !== null ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
          if (typeof newChild == "object" && newChild !== null) {
            switch (newChild.$$typeof) {
              case REACT_ELEMENT_TYPE:
                return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null;
              case REACT_PORTAL_TYPE:
                return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
              case REACT_LAZY_TYPE:
                return newChild = resolveLazy(newChild), updateSlot(returnFiber, oldFiber, newChild, lanes);
            }
            if (isArrayImpl(newChild) || getIteratorFn(newChild))
              return key !== null ? null : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
            if (typeof newChild.then == "function")
              return updateSlot(
                returnFiber,
                oldFiber,
                unwrapThenable(newChild),
                lanes
              );
            if (newChild.$$typeof === REACT_CONTEXT_TYPE)
              return updateSlot(
                returnFiber,
                oldFiber,
                readContextDuringReconciliation(returnFiber, newChild),
                lanes
              );
            throwOnInvalidObjectTypeImpl(returnFiber, newChild);
          }
          return null;
        }
        function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
          if (typeof newChild == "string" && newChild !== "" || typeof newChild == "number" || typeof newChild == "bigint")
            return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
          if (typeof newChild == "object" && newChild !== null) {
            switch (newChild.$$typeof) {
              case REACT_ELEMENT_TYPE:
                return existingChildren = existingChildren.get(
                  newChild.key === null ? newIdx : newChild.key
                ) || null, updateElement(returnFiber, existingChildren, newChild, lanes);
              case REACT_PORTAL_TYPE:
                return existingChildren = existingChildren.get(
                  newChild.key === null ? newIdx : newChild.key
                ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
              case REACT_LAZY_TYPE:
                return newChild = resolveLazy(newChild), updateFromMap(
                  existingChildren,
                  returnFiber,
                  newIdx,
                  newChild,
                  lanes
                );
            }
            if (isArrayImpl(newChild) || getIteratorFn(newChild))
              return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, lanes, null);
            if (typeof newChild.then == "function")
              return updateFromMap(
                existingChildren,
                returnFiber,
                newIdx,
                unwrapThenable(newChild),
                lanes
              );
            if (newChild.$$typeof === REACT_CONTEXT_TYPE)
              return updateFromMap(
                existingChildren,
                returnFiber,
                newIdx,
                readContextDuringReconciliation(returnFiber, newChild),
                lanes
              );
            throwOnInvalidObjectTypeImpl(returnFiber, newChild);
          }
          return null;
        }
        function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
          for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
            oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
            var newFiber = updateSlot(
              returnFiber,
              oldFiber,
              newChildren[newIdx],
              lanes
            );
            if (newFiber === null) {
              oldFiber === null && (oldFiber = nextOldFiber);
              break;
            }
            shouldTrackSideEffects && oldFiber && newFiber.alternate === null && deleteChild(returnFiber, oldFiber), currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx), previousNewFiber === null ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber, previousNewFiber = newFiber, oldFiber = nextOldFiber;
          }
          if (newIdx === newChildren.length)
            return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
          if (oldFiber === null) {
            for (; newIdx < newChildren.length; newIdx++)
              oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), oldFiber !== null && (currentFirstChild = placeChild(
                oldFiber,
                currentFirstChild,
                newIdx
              ), previousNewFiber === null ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
            return isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
          }
          for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
            nextOldFiber = updateFromMap(
              oldFiber,
              returnFiber,
              newIdx,
              newChildren[newIdx],
              lanes
            ), nextOldFiber !== null && (shouldTrackSideEffects && nextOldFiber.alternate !== null && oldFiber.delete(
              nextOldFiber.key === null ? newIdx : nextOldFiber.key
            ), currentFirstChild = placeChild(
              nextOldFiber,
              currentFirstChild,
              newIdx
            ), previousNewFiber === null ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
          return shouldTrackSideEffects && oldFiber.forEach(function(child) {
            return deleteChild(returnFiber, child);
          }), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
        }
        function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
          if (newChildren == null) throw Error(formatProdErrorMessage(151));
          for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildren.next(); oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
            oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
            var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
            if (newFiber === null) {
              oldFiber === null && (oldFiber = nextOldFiber);
              break;
            }
            shouldTrackSideEffects && oldFiber && newFiber.alternate === null && deleteChild(returnFiber, oldFiber), currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx), previousNewFiber === null ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber, previousNewFiber = newFiber, oldFiber = nextOldFiber;
          }
          if (step.done)
            return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
          if (oldFiber === null) {
            for (; !step.done; newIdx++, step = newChildren.next())
              step = createChild(returnFiber, step.value, lanes), step !== null && (currentFirstChild = placeChild(step, currentFirstChild, newIdx), previousNewFiber === null ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step);
            return isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
          }
          for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
            step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes), step !== null && (shouldTrackSideEffects && step.alternate !== null && oldFiber.delete(step.key === null ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), previousNewFiber === null ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step);
          return shouldTrackSideEffects && oldFiber.forEach(function(child) {
            return deleteChild(returnFiber, child);
          }), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
        }
        function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
          if (typeof newChild == "object" && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null && (newChild = newChild.props.children), typeof newChild == "object" && newChild !== null) {
            switch (newChild.$$typeof) {
              case REACT_ELEMENT_TYPE:
                a: {
                  for (var key = newChild.key; currentFirstChild !== null; ) {
                    if (currentFirstChild.key === key) {
                      if (key = newChild.type, key === REACT_FRAGMENT_TYPE) {
                        if (currentFirstChild.tag === 7) {
                          deleteRemainingChildren(
                            returnFiber,
                            currentFirstChild.sibling
                          ), lanes = useFiber(
                            currentFirstChild,
                            newChild.props.children
                          ), lanes.return = returnFiber, returnFiber = lanes;
                          break a;
                        }
                      } else if (currentFirstChild.elementType === key || typeof key == "object" && key !== null && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
                        deleteRemainingChildren(
                          returnFiber,
                          currentFirstChild.sibling
                        ), lanes = useFiber(currentFirstChild, newChild.props), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes;
                        break a;
                      }
                      deleteRemainingChildren(returnFiber, currentFirstChild);
                      break;
                    } else deleteChild(returnFiber, currentFirstChild);
                    currentFirstChild = currentFirstChild.sibling;
                  }
                  newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
                    newChild.props.children,
                    returnFiber.mode,
                    lanes,
                    newChild.key
                  ), lanes.return = returnFiber, returnFiber = lanes) : (lanes = createFiberFromTypeAndProps(
                    newChild.type,
                    newChild.key,
                    newChild.props,
                    null,
                    returnFiber.mode,
                    lanes
                  ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes);
                }
                return placeSingleChild(returnFiber);
              case REACT_PORTAL_TYPE:
                a: {
                  for (key = newChild.key; currentFirstChild !== null; ) {
                    if (currentFirstChild.key === key)
                      if (currentFirstChild.tag === 4 && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) {
                        deleteRemainingChildren(
                          returnFiber,
                          currentFirstChild.sibling
                        ), lanes = useFiber(currentFirstChild, newChild.children || []), lanes.return = returnFiber, returnFiber = lanes;
                        break a;
                      } else {
                        deleteRemainingChildren(returnFiber, currentFirstChild);
                        break;
                      }
                    else deleteChild(returnFiber, currentFirstChild);
                    currentFirstChild = currentFirstChild.sibling;
                  }
                  lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes;
                }
                return placeSingleChild(returnFiber);
              case REACT_LAZY_TYPE:
                return newChild = resolveLazy(newChild), reconcileChildFibersImpl(
                  returnFiber,
                  currentFirstChild,
                  newChild,
                  lanes
                );
            }
            if (isArrayImpl(newChild))
              return reconcileChildrenArray(
                returnFiber,
                currentFirstChild,
                newChild,
                lanes
              );
            if (getIteratorFn(newChild)) {
              if (key = getIteratorFn(newChild), typeof key != "function") throw Error(formatProdErrorMessage(150));
              return newChild = key.call(newChild), reconcileChildrenIterator(
                returnFiber,
                currentFirstChild,
                newChild,
                lanes
              );
            }
            if (typeof newChild.then == "function")
              return reconcileChildFibersImpl(
                returnFiber,
                currentFirstChild,
                unwrapThenable(newChild),
                lanes
              );
            if (newChild.$$typeof === REACT_CONTEXT_TYPE)
              return reconcileChildFibersImpl(
                returnFiber,
                currentFirstChild,
                readContextDuringReconciliation(returnFiber, newChild),
                lanes
              );
            throwOnInvalidObjectTypeImpl(returnFiber, newChild);
          }
          return typeof newChild == "string" && newChild !== "" || typeof newChild == "number" || typeof newChild == "bigint" ? (newChild = "" + newChild, currentFirstChild !== null && currentFirstChild.tag === 6 ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), lanes = useFiber(currentFirstChild, newChild), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes), placeSingleChild(returnFiber)) : deleteRemainingChildren(returnFiber, currentFirstChild);
        }
        return function(returnFiber, currentFirstChild, newChild, lanes) {
          try {
            thenableIndexCounter$1 = 0;
            var firstChildFiber = reconcileChildFibersImpl(
              returnFiber,
              currentFirstChild,
              newChild,
              lanes
            );
            return thenableState$1 = null, firstChildFiber;
          } catch (x) {
            if (x === SuspenseException || x === SuspenseActionException) throw x;
            var fiber = createFiberImplClass(29, x, null, returnFiber.mode);
            return fiber.lanes = lanes, fiber.return = returnFiber, fiber;
          }
        };
      }
      var reconcileChildFibers = createChildReconciler(!0), mountChildFibers = createChildReconciler(!1), hasForceUpdate = !1;
      function initializeUpdateQueue(fiber) {
        fiber.updateQueue = {
          baseState: fiber.memoizedState,
          firstBaseUpdate: null,
          lastBaseUpdate: null,
          shared: { pending: null, lanes: 0, hiddenCallbacks: null },
          callbacks: null
        };
      }
      function cloneUpdateQueue(current, workInProgress2) {
        current = current.updateQueue, workInProgress2.updateQueue === current && (workInProgress2.updateQueue = {
          baseState: current.baseState,
          firstBaseUpdate: current.firstBaseUpdate,
          lastBaseUpdate: current.lastBaseUpdate,
          shared: current.shared,
          callbacks: null
        });
      }
      function createUpdate(lane) {
        return { lane, tag: 0, payload: null, callback: null, next: null };
      }
      function enqueueUpdate(fiber, update, lane) {
        var updateQueue = fiber.updateQueue;
        if (updateQueue === null) return null;
        if (updateQueue = updateQueue.shared, (executionContext & 2) !== 0) {
          var pending = updateQueue.pending;
          return pending === null ? update.next = update : (update.next = pending.next, pending.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
        }
        return enqueueUpdate$1(fiber, updateQueue, update, lane), getRootForUpdatedFiber(fiber);
      }
      function entangleTransitions(root2, fiber, lane) {
        if (fiber = fiber.updateQueue, fiber !== null && (fiber = fiber.shared, (lane & 4194048) !== 0)) {
          var queueLanes = fiber.lanes;
          queueLanes &= root2.pendingLanes, lane |= queueLanes, fiber.lanes = lane, markRootEntangled(root2, lane);
        }
      }
      function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
        var queue = workInProgress2.updateQueue, current = workInProgress2.alternate;
        if (current !== null && (current = current.updateQueue, queue === current)) {
          var newFirst = null, newLast = null;
          if (queue = queue.firstBaseUpdate, queue !== null) {
            do {
              var clone = {
                lane: queue.lane,
                tag: queue.tag,
                payload: queue.payload,
                callback: null,
                next: null
              };
              newLast === null ? newFirst = newLast = clone : newLast = newLast.next = clone, queue = queue.next;
            } while (queue !== null);
            newLast === null ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
          } else newFirst = newLast = capturedUpdate;
          queue = {
            baseState: current.baseState,
            firstBaseUpdate: newFirst,
            lastBaseUpdate: newLast,
            shared: current.shared,
            callbacks: current.callbacks
          }, workInProgress2.updateQueue = queue;
          return;
        }
        workInProgress2 = queue.lastBaseUpdate, workInProgress2 === null ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate, queue.lastBaseUpdate = capturedUpdate;
      }
      var didReadFromEntangledAsyncAction = !1;
      function suspendIfUpdateReadFromEntangledAsyncAction() {
        if (didReadFromEntangledAsyncAction) {
          var entangledActionThenable = currentEntangledActionThenable;
          if (entangledActionThenable !== null) throw entangledActionThenable;
        }
      }
      function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes2) {
        didReadFromEntangledAsyncAction = !1;
        var queue = workInProgress$jscomp$0.updateQueue;
        hasForceUpdate = !1;
        var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
        if (pendingQueue !== null) {
          queue.shared.pending = null;
          var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
          lastPendingUpdate.next = null, lastBaseUpdate === null ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate, lastBaseUpdate = lastPendingUpdate;
          var current = workInProgress$jscomp$0.alternate;
          current !== null && (current = current.updateQueue, pendingQueue = current.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (pendingQueue === null ? current.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current.lastBaseUpdate = lastPendingUpdate));
        }
        if (firstBaseUpdate !== null) {
          var newState = queue.baseState;
          lastBaseUpdate = 0, current = firstPendingUpdate = lastPendingUpdate = null, pendingQueue = firstBaseUpdate;
          do {
            var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
            if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
              updateLane !== 0 && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = !0), current !== null && (current = current.next = {
                lane: 0,
                tag: pendingQueue.tag,
                payload: pendingQueue.payload,
                callback: null,
                next: null
              });
              a: {
                var workInProgress2 = workInProgress$jscomp$0, update = pendingQueue;
                updateLane = props;
                var instance = instance$jscomp$0;
                switch (update.tag) {
                  case 1:
                    if (workInProgress2 = update.payload, typeof workInProgress2 == "function") {
                      newState = workInProgress2.call(instance, newState, updateLane);
                      break a;
                    }
                    newState = workInProgress2;
                    break a;
                  case 3:
                    workInProgress2.flags = workInProgress2.flags & -65537 | 128;
                  case 0:
                    if (workInProgress2 = update.payload, updateLane = typeof workInProgress2 == "function" ? workInProgress2.call(instance, newState, updateLane) : workInProgress2, updateLane == null) break a;
                    newState = assign({}, newState, updateLane);
                    break a;
                  case 2:
                    hasForceUpdate = !0;
                }
              }
              updateLane = pendingQueue.callback, updateLane !== null && (workInProgress$jscomp$0.flags |= 64, isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), isHiddenUpdate = queue.callbacks, isHiddenUpdate === null ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
            } else
              isHiddenUpdate = {
                lane: updateLane,
                tag: pendingQueue.tag,
                payload: pendingQueue.payload,
                callback: pendingQueue.callback,
                next: null
              }, current === null ? (firstPendingUpdate = current = isHiddenUpdate, lastPendingUpdate = newState) : current = current.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
            if (pendingQueue = pendingQueue.next, pendingQueue === null) {
              if (pendingQueue = queue.shared.pending, pendingQueue === null)
                break;
              isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
            }
          } while (!0);
          current === null && (lastPendingUpdate = newState), queue.baseState = lastPendingUpdate, queue.firstBaseUpdate = firstPendingUpdate, queue.lastBaseUpdate = current, firstBaseUpdate === null && (queue.shared.lanes = 0), workInProgressRootSkippedLanes |= lastBaseUpdate, workInProgress$jscomp$0.lanes = lastBaseUpdate, workInProgress$jscomp$0.memoizedState = newState;
        }
      }
      function callCallback(callback, context) {
        if (typeof callback != "function")
          throw Error(formatProdErrorMessage(191, callback));
        callback.call(context);
      }
      function commitCallbacks(updateQueue, context) {
        var callbacks = updateQueue.callbacks;
        if (callbacks !== null)
          for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
            callCallback(callbacks[updateQueue], context);
      }
      var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0);
      function pushHiddenContext(fiber, context) {
        fiber = entangledRenderLanes, push(prevEntangledRenderLanesCursor, fiber), push(currentTreeHiddenStackCursor, context), entangledRenderLanes = fiber | context.baseLanes;
      }
      function reuseHiddenContextOnStack() {
        push(prevEntangledRenderLanesCursor, entangledRenderLanes), push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
      }
      function popHiddenContext() {
        entangledRenderLanes = prevEntangledRenderLanesCursor.current, pop(currentTreeHiddenStackCursor), pop(prevEntangledRenderLanesCursor);
      }
      var suspenseHandlerStackCursor = createCursor(null), shellBoundary = null;
      function pushPrimaryTreeSuspenseHandler(handler) {
        var current = handler.alternate;
        push(suspenseStackCursor, suspenseStackCursor.current & 1), push(suspenseHandlerStackCursor, handler), shellBoundary === null && (current === null || currentTreeHiddenStackCursor.current !== null || current.memoizedState !== null) && (shellBoundary = handler);
      }
      function pushDehydratedActivitySuspenseHandler(fiber) {
        push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), shellBoundary === null && (shellBoundary = fiber);
      }
      function pushOffscreenSuspenseHandler(fiber) {
        fiber.tag === 22 ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), shellBoundary === null && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
      }
      function reuseSuspenseHandlerOnStack() {
        push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
      }
      function popSuspenseHandler(fiber) {
        pop(suspenseHandlerStackCursor), shellBoundary === fiber && (shellBoundary = null), pop(suspenseStackCursor);
      }
      var suspenseStackCursor = createCursor(0);
      function findFirstSuspended(row) {
        for (var node = row; node !== null; ) {
          if (node.tag === 13) {
            var state = node.memoizedState;
            if (state !== null && (state = state.dehydrated, state === null || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
              return node;
          } else if (node.tag === 19 && (node.memoizedProps.revealOrder === "forwards" || node.memoizedProps.revealOrder === "backwards" || node.memoizedProps.revealOrder === "unstable_legacy-backwards" || node.memoizedProps.revealOrder === "together")) {
            if ((node.flags & 128) !== 0) return node;
          } else if (node.child !== null) {
            node.child.return = node, node = node.child;
            continue;
          }
          if (node === row) break;
          for (; node.sibling === null; ) {
            if (node.return === null || node.return === row) return null;
            node = node.return;
          }
          node.sibling.return = node.return, node = node.sibling;
        }
        return null;
      }
      var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, didScheduleRenderPhaseUpdateDuringThisPass = !1, shouldDoubleInvokeUserFnsInHooksDEV = !1, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0;
      function throwInvalidHookError() {
        throw Error(formatProdErrorMessage(321));
      }
      function areHookInputsEqual(nextDeps, prevDeps) {
        if (prevDeps === null) return !1;
        for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
          if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
        return !0;
      }
      function renderWithHooks(current, workInProgress2, Component4, props, secondArg, nextRenderLanes) {
        return renderLanes = nextRenderLanes, currentlyRenderingFiber = workInProgress2, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.lanes = 0, ReactSharedInternals.H = current === null || current.memoizedState === null ? HooksDispatcherOnMount : HooksDispatcherOnUpdate, shouldDoubleInvokeUserFnsInHooksDEV = !1, nextRenderLanes = Component4(props, secondArg), shouldDoubleInvokeUserFnsInHooksDEV = !1, didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain(
          workInProgress2,
          Component4,
          props,
          secondArg
        )), finishRenderingHooks(current), nextRenderLanes;
      }
      function finishRenderingHooks(current) {
        ReactSharedInternals.H = ContextOnlyDispatcher;
        var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
        if (renderLanes = 0, workInProgressHook = currentHook = currentlyRenderingFiber = null, didScheduleRenderPhaseUpdate = !1, thenableIndexCounter = 0, thenableState = null, didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
        current === null || didReceiveUpdate || (current = current.dependencies, current !== null && checkIfContextChanged(current) && (didReceiveUpdate = !0));
      }
      function renderWithHooksAgain(workInProgress2, Component4, props, secondArg) {
        currentlyRenderingFiber = workInProgress2;
        var numberOfReRenders = 0;
        do {
          if (didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null), thenableIndexCounter = 0, didScheduleRenderPhaseUpdateDuringThisPass = !1, 25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
          if (numberOfReRenders += 1, workInProgressHook = currentHook = null, workInProgress2.updateQueue != null) {
            var children = workInProgress2.updateQueue;
            children.lastEffect = null, children.events = null, children.stores = null, children.memoCache != null && (children.memoCache.index = 0);
          }
          ReactSharedInternals.H = HooksDispatcherOnRerender, children = Component4(props, secondArg);
        } while (didScheduleRenderPhaseUpdateDuringThisPass);
        return children;
      }
      function TransitionAwareHostComponent() {
        var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
        return maybeThenable = typeof maybeThenable.then == "function" ? useThenable(maybeThenable) : maybeThenable, dispatcher = dispatcher.useState()[0], (currentHook !== null ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024), maybeThenable;
      }
      function checkDidRenderIdHook() {
        var didRenderIdHook = localIdCounter !== 0;
        return localIdCounter = 0, didRenderIdHook;
      }
      function bailoutHooks(current, workInProgress2, lanes) {
        workInProgress2.updateQueue = current.updateQueue, workInProgress2.flags &= -2053, current.lanes &= ~lanes;
      }
      function resetHooksOnUnwind(workInProgress2) {
        if (didScheduleRenderPhaseUpdate) {
          for (workInProgress2 = workInProgress2.memoizedState; workInProgress2 !== null; ) {
            var queue = workInProgress2.queue;
            queue !== null && (queue.pending = null), workInProgress2 = workInProgress2.next;
          }
          didScheduleRenderPhaseUpdate = !1;
        }
        renderLanes = 0, workInProgressHook = currentHook = currentlyRenderingFiber = null, didScheduleRenderPhaseUpdateDuringThisPass = !1, thenableIndexCounter = localIdCounter = 0, thenableState = null;
      }
      function mountWorkInProgressHook() {
        var hook = {
          memoizedState: null,
          baseState: null,
          baseQueue: null,
          queue: null,
          next: null
        };
        return workInProgressHook === null ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook, workInProgressHook;
      }
      function updateWorkInProgressHook() {
        if (currentHook === null) {
          var nextCurrentHook = currentlyRenderingFiber.alternate;
          nextCurrentHook = nextCurrentHook !== null ? nextCurrentHook.memoizedState : null;
        } else nextCurrentHook = currentHook.next;
        var nextWorkInProgressHook = workInProgressHook === null ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
        if (nextWorkInProgressHook !== null)
          workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
        else {
          if (nextCurrentHook === null)
            throw currentlyRenderingFiber.alternate === null ? Error(formatProdErrorMessage(467)) : Error(formatProdErrorMessage(310));
          currentHook = nextCurrentHook, nextCurrentHook = {
            memoizedState: currentHook.memoizedState,
            baseState: currentHook.baseState,
            baseQueue: currentHook.baseQueue,
            queue: currentHook.queue,
            next: null
          }, workInProgressHook === null ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
        }
        return workInProgressHook;
      }
      function createFunctionComponentUpdateQueue() {
        return { lastEffect: null, events: null, stores: null, memoCache: null };
      }
      function useThenable(thenable) {
        var index2 = thenableIndexCounter;
        return thenableIndexCounter += 1, thenableState === null && (thenableState = []), thenable = trackUsedThenable(thenableState, thenable, index2), index2 = currentlyRenderingFiber, (workInProgressHook === null ? index2.memoizedState : workInProgressHook.next) === null && (index2 = index2.alternate, ReactSharedInternals.H = index2 === null || index2.memoizedState === null ? HooksDispatcherOnMount : HooksDispatcherOnUpdate), thenable;
      }
      function use(usable) {
        if (usable !== null && typeof usable == "object") {
          if (typeof usable.then == "function") return useThenable(usable);
          if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
        }
        throw Error(formatProdErrorMessage(438, String(usable)));
      }
      function useMemoCache(size) {
        var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
        if (updateQueue !== null && (memoCache = updateQueue.memoCache), memoCache == null) {
          var current = currentlyRenderingFiber.alternate;
          current !== null && (current = current.updateQueue, current !== null && (current = current.memoCache, current != null && (memoCache = {
            data: current.data.map(function(array) {
              return array.slice();
            }),
            index: 0
          })));
        }
        if (memoCache == null && (memoCache = { data: [], index: 0 }), updateQueue === null && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue), updateQueue.memoCache = memoCache, updateQueue = memoCache.data[memoCache.index], updateQueue === void 0)
          for (updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; current < size; current++)
            updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;
        return memoCache.index++, updateQueue;
      }
      function basicStateReducer(state, action) {
        return typeof action == "function" ? action(state) : action;
      }
      function updateReducer(reducer2) {
        var hook = updateWorkInProgressHook();
        return updateReducerImpl(hook, currentHook, reducer2);
      }
      function updateReducerImpl(hook, current, reducer2) {
        var queue = hook.queue;
        if (queue === null) throw Error(formatProdErrorMessage(311));
        queue.lastRenderedReducer = reducer2;
        var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
        if (pendingQueue !== null) {
          if (baseQueue !== null) {
            var baseFirst = baseQueue.next;
            baseQueue.next = pendingQueue.next, pendingQueue.next = baseFirst;
          }
          current.baseQueue = baseQueue = pendingQueue, queue.pending = null;
        }
        if (pendingQueue = hook.baseState, baseQueue === null) hook.memoizedState = pendingQueue;
        else {
          current = baseQueue.next;
          var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current, didReadFromEntangledAsyncAction$60 = !1;
          do {
            var updateLane = update.lane & -536870913;
            if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
              var revertLane = update.revertLane;
              if (revertLane === 0)
                newBaseQueueLast !== null && (newBaseQueueLast = newBaseQueueLast.next = {
                  lane: 0,
                  revertLane: 0,
                  gesture: null,
                  action: update.action,
                  hasEagerState: update.hasEagerState,
                  eagerState: update.eagerState,
                  next: null
                }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction$60 = !0);
              else if ((renderLanes & revertLane) === revertLane) {
                update = update.next, revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction$60 = !0);
                continue;
              } else
                updateLane = {
                  lane: 0,
                  revertLane: update.revertLane,
                  gesture: null,
                  action: update.action,
                  hasEagerState: update.hasEagerState,
                  eagerState: update.eagerState,
                  next: null
                }, newBaseQueueLast === null ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
              updateLane = update.action, shouldDoubleInvokeUserFnsInHooksDEV && reducer2(pendingQueue, updateLane), pendingQueue = update.hasEagerState ? update.eagerState : reducer2(pendingQueue, updateLane);
            } else
              revertLane = {
                lane: updateLane,
                revertLane: update.revertLane,
                gesture: update.gesture,
                action: update.action,
                hasEagerState: update.hasEagerState,
                eagerState: update.eagerState,
                next: null
              }, newBaseQueueLast === null ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
            update = update.next;
          } while (update !== null && update !== current);
          if (newBaseQueueLast === null ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst, !objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = !0, didReadFromEntangledAsyncAction$60 && (reducer2 = currentEntangledActionThenable, reducer2 !== null)))
            throw reducer2;
          hook.memoizedState = pendingQueue, hook.baseState = baseFirst, hook.baseQueue = newBaseQueueLast, queue.lastRenderedState = pendingQueue;
        }
        return baseQueue === null && (queue.lanes = 0), [hook.memoizedState, queue.dispatch];
      }
      function rerenderReducer(reducer2) {
        var hook = updateWorkInProgressHook(), queue = hook.queue;
        if (queue === null) throw Error(formatProdErrorMessage(311));
        queue.lastRenderedReducer = reducer2;
        var dispatch2 = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
        if (lastRenderPhaseUpdate !== null) {
          queue.pending = null;
          var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
          do
            newState = reducer2(newState, update.action), update = update.next;
          while (update !== lastRenderPhaseUpdate);
          objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0), hook.memoizedState = newState, hook.baseQueue === null && (hook.baseState = newState), queue.lastRenderedState = newState;
        }
        return [newState, dispatch2];
      }
      function updateSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot) {
        var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
        if (isHydrating$jscomp$0) {
          if (getServerSnapshot === void 0) throw Error(formatProdErrorMessage(407));
          getServerSnapshot = getServerSnapshot();
        } else getServerSnapshot = getSnapshot();
        var snapshotChanged = !objectIs(
          (currentHook || hook).memoizedState,
          getServerSnapshot
        );
        if (snapshotChanged && (hook.memoizedState = getServerSnapshot, didReceiveUpdate = !0), hook = hook.queue, updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe2), [
          subscribe2
        ]), hook.getSnapshot !== getSnapshot || snapshotChanged || workInProgressHook !== null && workInProgressHook.memoizedState.tag & 1) {
          if (fiber.flags |= 2048, pushSimpleEffect(
            9,
            { destroy: void 0 },
            updateStoreInstance.bind(
              null,
              fiber,
              hook,
              getServerSnapshot,
              getSnapshot
            ),
            null
          ), workInProgressRoot === null) throw Error(formatProdErrorMessage(349));
          isHydrating$jscomp$0 || (renderLanes & 127) !== 0 || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
        }
        return getServerSnapshot;
      }
      function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
        fiber.flags |= 16384, fiber = { getSnapshot, value: renderedSnapshot }, getSnapshot = currentlyRenderingFiber.updateQueue, getSnapshot === null ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, renderedSnapshot === null ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
      }
      function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
        inst.value = nextSnapshot, inst.getSnapshot = getSnapshot, checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
      }
      function subscribeToStore(fiber, inst, subscribe2) {
        return subscribe2(function() {
          checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
        });
      }
      function checkIfSnapshotChanged(inst) {
        var latestGetSnapshot = inst.getSnapshot;
        inst = inst.value;
        try {
          var nextValue = latestGetSnapshot();
          return !objectIs(inst, nextValue);
        } catch (error) {
          return !0;
        }
      }
      function forceStoreRerender(fiber) {
        var root2 = enqueueConcurrentRenderForLane(fiber, 2);
        root2 !== null && scheduleUpdateOnFiber(root2, fiber, 2);
      }
      function mountStateImpl(initialState) {
        var hook = mountWorkInProgressHook();
        if (typeof initialState == "function") {
          var initialStateInitializer = initialState;
          if (initialState = initialStateInitializer(), shouldDoubleInvokeUserFnsInHooksDEV) {
            setIsStrictModeForDevtools(!0);
            try {
              initialStateInitializer();
            } finally {
              setIsStrictModeForDevtools(!1);
            }
          }
        }
        return hook.memoizedState = hook.baseState = initialState, hook.queue = {
          pending: null,
          lanes: 0,
          dispatch: null,
          lastRenderedReducer: basicStateReducer,
          lastRenderedState: initialState
        }, hook;
      }
      function updateOptimisticImpl(hook, current, passthrough, reducer2) {
        return hook.baseState = passthrough, updateReducerImpl(
          hook,
          currentHook,
          typeof reducer2 == "function" ? reducer2 : basicStateReducer
        );
      }
      function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
        if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
        if (fiber = actionQueue.action, fiber !== null) {
          var actionNode = {
            payload,
            action: fiber,
            next: null,
            isTransition: !0,
            status: "pending",
            value: null,
            reason: null,
            listeners: [],
            then: function(listener) {
              actionNode.listeners.push(listener);
            }
          };
          ReactSharedInternals.T !== null ? setPendingState(!0) : actionNode.isTransition = !1, setState(actionNode), setPendingState = actionQueue.pending, setPendingState === null ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
        }
      }
      function runActionStateAction(actionQueue, node) {
        var action = node.action, payload = node.payload, prevState = actionQueue.state;
        if (node.isTransition) {
          var prevTransition = ReactSharedInternals.T, currentTransition = {};
          ReactSharedInternals.T = currentTransition;
          try {
            var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
            onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue), handleActionReturnValue(actionQueue, node, returnValue);
          } catch (error) {
            onActionError(actionQueue, node, error);
          } finally {
            prevTransition !== null && currentTransition.types !== null && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
          }
        } else
          try {
            prevTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, prevTransition);
          } catch (error$66) {
            onActionError(actionQueue, node, error$66);
          }
      }
      function handleActionReturnValue(actionQueue, node, returnValue) {
        returnValue !== null && typeof returnValue == "object" && typeof returnValue.then == "function" ? returnValue.then(
          function(nextState) {
            onActionSuccess(actionQueue, node, nextState);
          },
          function(error) {
            return onActionError(actionQueue, node, error);
          }
        ) : onActionSuccess(actionQueue, node, returnValue);
      }
      function onActionSuccess(actionQueue, actionNode, nextState) {
        actionNode.status = "fulfilled", actionNode.value = nextState, notifyActionListeners(actionNode), actionQueue.state = nextState, actionNode = actionQueue.pending, actionNode !== null && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
      }
      function onActionError(actionQueue, actionNode, error) {
        var last = actionQueue.pending;
        if (actionQueue.pending = null, last !== null) {
          last = last.next;
          do
            actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
          while (actionNode !== last);
        }
        actionQueue.action = null;
      }
      function notifyActionListeners(actionNode) {
        actionNode = actionNode.listeners;
        for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
      }
      function actionStateReducer(oldState, newState) {
        return newState;
      }
      function mountActionState(action, initialStateProp) {
        if (isHydrating) {
          var ssrFormState = workInProgressRoot.formState;
          if (ssrFormState !== null) {
            a: {
              var JSCompiler_inline_result = currentlyRenderingFiber;
              if (isHydrating) {
                if (nextHydratableInstance) {
                  b: {
                    for (var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance, inRootOrSingleton = rootOrSingletonContext; JSCompiler_inline_result$jscomp$0.nodeType !== 8; ) {
                      if (!inRootOrSingleton) {
                        JSCompiler_inline_result$jscomp$0 = null;
                        break b;
                      }
                      if (JSCompiler_inline_result$jscomp$0 = getNextHydratable(
                        JSCompiler_inline_result$jscomp$0.nextSibling
                      ), JSCompiler_inline_result$jscomp$0 === null) {
                        JSCompiler_inline_result$jscomp$0 = null;
                        break b;
                      }
                    }
                    inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data, JSCompiler_inline_result$jscomp$0 = inRootOrSingleton === "F!" || inRootOrSingleton === "F" ? JSCompiler_inline_result$jscomp$0 : null;
                  }
                  if (JSCompiler_inline_result$jscomp$0) {
                    nextHydratableInstance = getNextHydratable(
                      JSCompiler_inline_result$jscomp$0.nextSibling
                    ), JSCompiler_inline_result = JSCompiler_inline_result$jscomp$0.data === "F!";
                    break a;
                  }
                }
                throwOnHydrationMismatch(JSCompiler_inline_result);
              }
              JSCompiler_inline_result = !1;
            }
            JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
          }
        }
        return ssrFormState = mountWorkInProgressHook(), ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp, JSCompiler_inline_result = {
          pending: null,
          lanes: 0,
          dispatch: null,
          lastRenderedReducer: actionStateReducer,
          lastRenderedState: initialStateProp
        }, ssrFormState.queue = JSCompiler_inline_result, ssrFormState = dispatchSetState.bind(
          null,
          currentlyRenderingFiber,
          JSCompiler_inline_result
        ), JSCompiler_inline_result.dispatch = ssrFormState, JSCompiler_inline_result = mountStateImpl(!1), inRootOrSingleton = dispatchOptimisticSetState.bind(
          null,
          currentlyRenderingFiber,
          !1,
          JSCompiler_inline_result.queue
        ), JSCompiler_inline_result = mountWorkInProgressHook(), JSCompiler_inline_result$jscomp$0 = {
          state: initialStateProp,
          dispatch: null,
          action,
          pending: null
        }, JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0, ssrFormState = dispatchActionState.bind(
          null,
          currentlyRenderingFiber,
          JSCompiler_inline_result$jscomp$0,
          inRootOrSingleton,
          ssrFormState
        ), JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState, JSCompiler_inline_result.memoizedState = action, [initialStateProp, ssrFormState, !1];
      }
      function updateActionState(action) {
        var stateHook = updateWorkInProgressHook();
        return updateActionStateImpl(stateHook, currentHook, action);
      }
      function updateActionStateImpl(stateHook, currentStateHook, action) {
        if (currentStateHook = updateReducerImpl(
          stateHook,
          currentStateHook,
          actionStateReducer
        )[0], stateHook = updateReducer(basicStateReducer)[0], typeof currentStateHook == "object" && currentStateHook !== null && typeof currentStateHook.then == "function")
          try {
            var state = useThenable(currentStateHook);
          } catch (x) {
            throw x === SuspenseException ? SuspenseActionException : x;
          }
        else state = currentStateHook;
        currentStateHook = updateWorkInProgressHook();
        var actionQueue = currentStateHook.queue, dispatch2 = actionQueue.dispatch;
        return action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
          9,
          { destroy: void 0 },
          actionStateActionEffect.bind(null, actionQueue, action),
          null
        )), [state, dispatch2, stateHook];
      }
      function actionStateActionEffect(actionQueue, action) {
        actionQueue.action = action;
      }
      function rerenderActionState(action) {
        var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
        if (currentStateHook !== null)
          return updateActionStateImpl(stateHook, currentStateHook, action);
        updateWorkInProgressHook(), stateHook = stateHook.memoizedState, currentStateHook = updateWorkInProgressHook();
        var dispatch2 = currentStateHook.queue.dispatch;
        return currentStateHook.memoizedState = action, [stateHook, dispatch2, !1];
      }
      function pushSimpleEffect(tag, inst, create, deps) {
        return tag = { tag, create, deps, inst, next: null }, inst = currentlyRenderingFiber.updateQueue, inst === null && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst), create = inst.lastEffect, create === null ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag), tag;
      }
      function updateRef() {
        return updateWorkInProgressHook().memoizedState;
      }
      function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
        var hook = mountWorkInProgressHook();
        currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
          1 | hookFlags,
          { destroy: void 0 },
          create,
          deps === void 0 ? null : deps
        );
      }
      function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
        var hook = updateWorkInProgressHook();
        deps = deps === void 0 ? null : deps;
        var inst = hook.memoizedState.inst;
        currentHook !== null && deps !== null && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
          1 | hookFlags,
          inst,
          create,
          deps
        ));
      }
      function mountEffect(create, deps) {
        mountEffectImpl(8390656, 8, create, deps);
      }
      function updateEffect(create, deps) {
        updateEffectImpl(2048, 8, create, deps);
      }
      function useEffectEventImpl(payload) {
        currentlyRenderingFiber.flags |= 4;
        var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
        if (componentUpdateQueue === null)
          componentUpdateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = componentUpdateQueue, componentUpdateQueue.events = [payload];
        else {
          var events = componentUpdateQueue.events;
          events === null ? componentUpdateQueue.events = [payload] : events.push(payload);
        }
      }
      function updateEvent(callback) {
        var ref = updateWorkInProgressHook().memoizedState;
        return useEffectEventImpl({ ref, nextImpl: callback }), function() {
          if ((executionContext & 2) !== 0) throw Error(formatProdErrorMessage(440));
          return ref.impl.apply(void 0, arguments);
        };
      }
      function updateInsertionEffect(create, deps) {
        return updateEffectImpl(4, 2, create, deps);
      }
      function updateLayoutEffect(create, deps) {
        return updateEffectImpl(4, 4, create, deps);
      }
      function imperativeHandleEffect(create, ref) {
        if (typeof ref == "function") {
          create = create();
          var refCleanup = ref(create);
          return function() {
            typeof refCleanup == "function" ? refCleanup() : ref(null);
          };
        }
        if (ref != null)
          return create = create(), ref.current = create, function() {
            ref.current = null;
          };
      }
      function updateImperativeHandle(ref, create, deps) {
        deps = deps != null ? deps.concat([ref]) : null, updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
      }
      function mountDebugValue() {
      }
      function updateCallback(callback, deps) {
        var hook = updateWorkInProgressHook();
        deps = deps === void 0 ? null : deps;
        var prevState = hook.memoizedState;
        return deps !== null && areHookInputsEqual(deps, prevState[1]) ? prevState[0] : (hook.memoizedState = [callback, deps], callback);
      }
      function updateMemo(nextCreate, deps) {
        var hook = updateWorkInProgressHook();
        deps = deps === void 0 ? null : deps;
        var prevState = hook.memoizedState;
        if (deps !== null && areHookInputsEqual(deps, prevState[1]))
          return prevState[0];
        if (prevState = nextCreate(), shouldDoubleInvokeUserFnsInHooksDEV) {
          setIsStrictModeForDevtools(!0);
          try {
            nextCreate();
          } finally {
            setIsStrictModeForDevtools(!1);
          }
        }
        return hook.memoizedState = [prevState, deps], prevState;
      }
      function mountDeferredValueImpl(hook, value, initialValue) {
        return initialValue === void 0 || (renderLanes & 1073741824) !== 0 && (workInProgressRootRenderLanes & 261930) === 0 ? hook.memoizedState = value : (hook.memoizedState = initialValue, hook = requestDeferredLane(), currentlyRenderingFiber.lanes |= hook, workInProgressRootSkippedLanes |= hook, initialValue);
      }
      function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
        return objectIs(value, prevValue) ? value : currentTreeHiddenStackCursor.current !== null ? (hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = !0), hook) : (renderLanes & 42) === 0 || (renderLanes & 1073741824) !== 0 && (workInProgressRootRenderLanes & 261930) === 0 ? (didReceiveUpdate = !0, hook.memoizedState = value) : (hook = requestDeferredLane(), currentlyRenderingFiber.lanes |= hook, workInProgressRootSkippedLanes |= hook, prevValue);
      }
      function startTransition4(fiber, queue, pendingState, finishedState, callback) {
        var previousPriority = ReactDOMSharedInternals.p;
        ReactDOMSharedInternals.p = previousPriority !== 0 && 8 > previousPriority ? previousPriority : 8;
        var prevTransition = ReactSharedInternals.T, currentTransition = {};
        ReactSharedInternals.T = currentTransition, dispatchOptimisticSetState(fiber, !1, queue, pendingState);
        try {
          var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
          if (onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue), returnValue !== null && typeof returnValue == "object" && typeof returnValue.then == "function") {
            var thenableForFinishedState = chainThenableValue(
              returnValue,
              finishedState
            );
            dispatchSetStateInternal(
              fiber,
              queue,
              thenableForFinishedState,
              requestUpdateLane(fiber)
            );
          } else
            dispatchSetStateInternal(
              fiber,
              queue,
              finishedState,
              requestUpdateLane(fiber)
            );
        } catch (error) {
          dispatchSetStateInternal(
            fiber,
            queue,
            { then: function() {
            }, status: "rejected", reason: error },
            requestUpdateLane()
          );
        } finally {
          ReactDOMSharedInternals.p = previousPriority, prevTransition !== null && currentTransition.types !== null && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
        }
      }
      function noop() {
      }
      function startHostTransition(formFiber, pendingState, action, formData) {
        if (formFiber.tag !== 5) throw Error(formatProdErrorMessage(476));
        var queue = ensureFormComponentIsStateful(formFiber).queue;
        startTransition4(
          formFiber,
          queue,
          pendingState,
          sharedNotPendingObject,
          action === null ? noop : function() {
            return requestFormReset$1(formFiber), action(formData);
          }
        );
      }
      function ensureFormComponentIsStateful(formFiber) {
        var existingStateHook = formFiber.memoizedState;
        if (existingStateHook !== null) return existingStateHook;
        existingStateHook = {
          memoizedState: sharedNotPendingObject,
          baseState: sharedNotPendingObject,
          baseQueue: null,
          queue: {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: basicStateReducer,
            lastRenderedState: sharedNotPendingObject
          },
          next: null
        };
        var initialResetState = {};
        return existingStateHook.next = {
          memoizedState: initialResetState,
          baseState: initialResetState,
          baseQueue: null,
          queue: {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: basicStateReducer,
            lastRenderedState: initialResetState
          },
          next: null
        }, formFiber.memoizedState = existingStateHook, formFiber = formFiber.alternate, formFiber !== null && (formFiber.memoizedState = existingStateHook), existingStateHook;
      }
      function requestFormReset$1(formFiber) {
        var stateHook = ensureFormComponentIsStateful(formFiber);
        stateHook.next === null && (stateHook = formFiber.alternate.memoizedState), dispatchSetStateInternal(
          formFiber,
          stateHook.next.queue,
          {},
          requestUpdateLane()
        );
      }
      function useHostTransitionStatus() {
        return readContext(HostTransitionContext);
      }
      function updateId() {
        return updateWorkInProgressHook().memoizedState;
      }
      function updateRefresh() {
        return updateWorkInProgressHook().memoizedState;
      }
      function refreshCache(fiber) {
        for (var provider = fiber.return; provider !== null; ) {
          switch (provider.tag) {
            case 24:
            case 3:
              var lane = requestUpdateLane();
              fiber = createUpdate(lane);
              var root$69 = enqueueUpdate(provider, fiber, lane);
              root$69 !== null && (scheduleUpdateOnFiber(root$69, provider, lane), entangleTransitions(root$69, provider, lane)), provider = { cache: createCache() }, fiber.payload = provider;
              return;
          }
          provider = provider.return;
        }
      }
      function dispatchReducerAction(fiber, queue, action) {
        var lane = requestUpdateLane();
        action = {
          lane,
          revertLane: 0,
          gesture: null,
          action,
          hasEagerState: !1,
          eagerState: null,
          next: null
        }, isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, action) : (action = enqueueConcurrentHookUpdate(fiber, queue, action, lane), action !== null && (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)));
      }
      function dispatchSetState(fiber, queue, action) {
        var lane = requestUpdateLane();
        dispatchSetStateInternal(fiber, queue, action, lane);
      }
      function dispatchSetStateInternal(fiber, queue, action, lane) {
        var update = {
          lane,
          revertLane: 0,
          gesture: null,
          action,
          hasEagerState: !1,
          eagerState: null,
          next: null
        };
        if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
        else {
          var alternate = fiber.alternate;
          if (fiber.lanes === 0 && (alternate === null || alternate.lanes === 0) && (alternate = queue.lastRenderedReducer, alternate !== null))
            try {
              var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
              if (update.hasEagerState = !0, update.eagerState = eagerState, objectIs(eagerState, currentState))
                return enqueueUpdate$1(fiber, queue, update, 0), workInProgressRoot === null && finishQueueingConcurrentUpdates(), !1;
            } catch (error) {
            }
          if (action = enqueueConcurrentHookUpdate(fiber, queue, update, lane), action !== null)
            return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), !0;
        }
        return !1;
      }
      function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
        if (action = {
          lane: 2,
          revertLane: requestTransitionLane(),
          gesture: null,
          action,
          hasEagerState: !1,
          eagerState: null,
          next: null
        }, isRenderPhaseUpdate(fiber)) {
          if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
        } else
          throwIfDuringRender = enqueueConcurrentHookUpdate(
            fiber,
            queue,
            action,
            2
          ), throwIfDuringRender !== null && scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
      }
      function isRenderPhaseUpdate(fiber) {
        var alternate = fiber.alternate;
        return fiber === currentlyRenderingFiber || alternate !== null && alternate === currentlyRenderingFiber;
      }
      function enqueueRenderPhaseUpdate(queue, update) {
        didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = !0;
        var pending = queue.pending;
        pending === null ? update.next = update : (update.next = pending.next, pending.next = update), queue.pending = update;
      }
      function entangleTransitionUpdate(root2, queue, lane) {
        if ((lane & 4194048) !== 0) {
          var queueLanes = queue.lanes;
          queueLanes &= root2.pendingLanes, lane |= queueLanes, queue.lanes = lane, markRootEntangled(root2, lane);
        }
      }
      var ContextOnlyDispatcher = {
        readContext,
        use,
        useCallback: throwInvalidHookError,
        useContext: throwInvalidHookError,
        useEffect: throwInvalidHookError,
        useImperativeHandle: throwInvalidHookError,
        useLayoutEffect: throwInvalidHookError,
        useInsertionEffect: throwInvalidHookError,
        useMemo: throwInvalidHookError,
        useReducer: throwInvalidHookError,
        useRef: throwInvalidHookError,
        useState: throwInvalidHookError,
        useDebugValue: throwInvalidHookError,
        useDeferredValue: throwInvalidHookError,
        useTransition: throwInvalidHookError,
        useSyncExternalStore: throwInvalidHookError,
        useId: throwInvalidHookError,
        useHostTransitionStatus: throwInvalidHookError,
        useFormState: throwInvalidHookError,
        useActionState: throwInvalidHookError,
        useOptimistic: throwInvalidHookError,
        useMemoCache: throwInvalidHookError,
        useCacheRefresh: throwInvalidHookError
      };
      ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
      var HooksDispatcherOnMount = {
        readContext,
        use,
        useCallback: function(callback, deps) {
          return mountWorkInProgressHook().memoizedState = [
            callback,
            deps === void 0 ? null : deps
          ], callback;
        },
        useContext: readContext,
        useEffect: mountEffect,
        useImperativeHandle: function(ref, create, deps) {
          deps = deps != null ? deps.concat([ref]) : null, mountEffectImpl(
            4194308,
            4,
            imperativeHandleEffect.bind(null, create, ref),
            deps
          );
        },
        useLayoutEffect: function(create, deps) {
          return mountEffectImpl(4194308, 4, create, deps);
        },
        useInsertionEffect: function(create, deps) {
          mountEffectImpl(4, 2, create, deps);
        },
        useMemo: function(nextCreate, deps) {
          var hook = mountWorkInProgressHook();
          deps = deps === void 0 ? null : deps;
          var nextValue = nextCreate();
          if (shouldDoubleInvokeUserFnsInHooksDEV) {
            setIsStrictModeForDevtools(!0);
            try {
              nextCreate();
            } finally {
              setIsStrictModeForDevtools(!1);
            }
          }
          return hook.memoizedState = [nextValue, deps], nextValue;
        },
        useReducer: function(reducer2, initialArg, init) {
          var hook = mountWorkInProgressHook();
          if (init !== void 0) {
            var initialState = init(initialArg);
            if (shouldDoubleInvokeUserFnsInHooksDEV) {
              setIsStrictModeForDevtools(!0);
              try {
                init(initialArg);
              } finally {
                setIsStrictModeForDevtools(!1);
              }
            }
          } else initialState = initialArg;
          return hook.memoizedState = hook.baseState = initialState, reducer2 = {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: reducer2,
            lastRenderedState: initialState
          }, hook.queue = reducer2, reducer2 = reducer2.dispatch = dispatchReducerAction.bind(
            null,
            currentlyRenderingFiber,
            reducer2
          ), [hook.memoizedState, reducer2];
        },
        useRef: function(initialValue) {
          var hook = mountWorkInProgressHook();
          return initialValue = { current: initialValue }, hook.memoizedState = initialValue;
        },
        useState: function(initialState) {
          initialState = mountStateImpl(initialState);
          var queue = initialState.queue, dispatch2 = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
          return queue.dispatch = dispatch2, [initialState.memoizedState, dispatch2];
        },
        useDebugValue: mountDebugValue,
        useDeferredValue: function(value, initialValue) {
          var hook = mountWorkInProgressHook();
          return mountDeferredValueImpl(hook, value, initialValue);
        },
        useTransition: function() {
          var stateHook = mountStateImpl(!1);
          return stateHook = startTransition4.bind(
            null,
            currentlyRenderingFiber,
            stateHook.queue,
            !0,
            !1
          ), mountWorkInProgressHook().memoizedState = stateHook, [!1, stateHook];
        },
        useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot) {
          var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
          if (isHydrating) {
            if (getServerSnapshot === void 0)
              throw Error(formatProdErrorMessage(407));
            getServerSnapshot = getServerSnapshot();
          } else {
            if (getServerSnapshot = getSnapshot(), workInProgressRoot === null)
              throw Error(formatProdErrorMessage(349));
            (workInProgressRootRenderLanes & 127) !== 0 || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
          }
          hook.memoizedState = getServerSnapshot;
          var inst = { value: getServerSnapshot, getSnapshot };
          return hook.queue = inst, mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe2), [
            subscribe2
          ]), fiber.flags |= 2048, pushSimpleEffect(
            9,
            { destroy: void 0 },
            updateStoreInstance.bind(
              null,
              fiber,
              inst,
              getServerSnapshot,
              getSnapshot
            ),
            null
          ), getServerSnapshot;
        },
        useId: function() {
          var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
          if (isHydrating) {
            var JSCompiler_inline_result = treeContextOverflow, idWithLeadingBit = treeContextId;
            JSCompiler_inline_result = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + JSCompiler_inline_result, identifierPrefix = "_" + identifierPrefix + "R_" + JSCompiler_inline_result, JSCompiler_inline_result = localIdCounter++, 0 < JSCompiler_inline_result && (identifierPrefix += "H" + JSCompiler_inline_result.toString(32)), identifierPrefix += "_";
          } else
            JSCompiler_inline_result = globalClientIdCounter++, identifierPrefix = "_" + identifierPrefix + "r_" + JSCompiler_inline_result.toString(32) + "_";
          return hook.memoizedState = identifierPrefix;
        },
        useHostTransitionStatus,
        useFormState: mountActionState,
        useActionState: mountActionState,
        useOptimistic: function(passthrough) {
          var hook = mountWorkInProgressHook();
          hook.memoizedState = hook.baseState = passthrough;
          var queue = {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: null,
            lastRenderedState: null
          };
          return hook.queue = queue, hook = dispatchOptimisticSetState.bind(
            null,
            currentlyRenderingFiber,
            !0,
            queue
          ), queue.dispatch = hook, [passthrough, hook];
        },
        useMemoCache,
        useCacheRefresh: function() {
          return mountWorkInProgressHook().memoizedState = refreshCache.bind(
            null,
            currentlyRenderingFiber
          );
        },
        useEffectEvent: function(callback) {
          var hook = mountWorkInProgressHook(), ref = { impl: callback };
          return hook.memoizedState = ref, function() {
            if ((executionContext & 2) !== 0)
              throw Error(formatProdErrorMessage(440));
            return ref.impl.apply(void 0, arguments);
          };
        }
      }, HooksDispatcherOnUpdate = {
        readContext,
        use,
        useCallback: updateCallback,
        useContext: readContext,
        useEffect: updateEffect,
        useImperativeHandle: updateImperativeHandle,
        useInsertionEffect: updateInsertionEffect,
        useLayoutEffect: updateLayoutEffect,
        useMemo: updateMemo,
        useReducer: updateReducer,
        useRef: updateRef,
        useState: function() {
          return updateReducer(basicStateReducer);
        },
        useDebugValue: mountDebugValue,
        useDeferredValue: function(value, initialValue) {
          var hook = updateWorkInProgressHook();
          return updateDeferredValueImpl(
            hook,
            currentHook.memoizedState,
            value,
            initialValue
          );
        },
        useTransition: function() {
          var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
          return [
            typeof booleanOrThenable == "boolean" ? booleanOrThenable : useThenable(booleanOrThenable),
            start
          ];
        },
        useSyncExternalStore: updateSyncExternalStore,
        useId: updateId,
        useHostTransitionStatus,
        useFormState: updateActionState,
        useActionState: updateActionState,
        useOptimistic: function(passthrough, reducer2) {
          var hook = updateWorkInProgressHook();
          return updateOptimisticImpl(hook, currentHook, passthrough, reducer2);
        },
        useMemoCache,
        useCacheRefresh: updateRefresh
      };
      HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
      var HooksDispatcherOnRerender = {
        readContext,
        use,
        useCallback: updateCallback,
        useContext: readContext,
        useEffect: updateEffect,
        useImperativeHandle: updateImperativeHandle,
        useInsertionEffect: updateInsertionEffect,
        useLayoutEffect: updateLayoutEffect,
        useMemo: updateMemo,
        useReducer: rerenderReducer,
        useRef: updateRef,
        useState: function() {
          return rerenderReducer(basicStateReducer);
        },
        useDebugValue: mountDebugValue,
        useDeferredValue: function(value, initialValue) {
          var hook = updateWorkInProgressHook();
          return currentHook === null ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
            hook,
            currentHook.memoizedState,
            value,
            initialValue
          );
        },
        useTransition: function() {
          var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
          return [
            typeof booleanOrThenable == "boolean" ? booleanOrThenable : useThenable(booleanOrThenable),
            start
          ];
        },
        useSyncExternalStore: updateSyncExternalStore,
        useId: updateId,
        useHostTransitionStatus,
        useFormState: rerenderActionState,
        useActionState: rerenderActionState,
        useOptimistic: function(passthrough, reducer2) {
          var hook = updateWorkInProgressHook();
          return currentHook !== null ? updateOptimisticImpl(hook, currentHook, passthrough, reducer2) : (hook.baseState = passthrough, [passthrough, hook.queue.dispatch]);
        },
        useMemoCache,
        useCacheRefresh: updateRefresh
      };
      HooksDispatcherOnRerender.useEffectEvent = updateEvent;
      function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
        ctor = workInProgress2.memoizedState, getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor), getDerivedStateFromProps = getDerivedStateFromProps == null ? ctor : assign({}, ctor, getDerivedStateFromProps), workInProgress2.memoizedState = getDerivedStateFromProps, workInProgress2.lanes === 0 && (workInProgress2.updateQueue.baseState = getDerivedStateFromProps);
      }
      var classComponentUpdater = {
        enqueueSetState: function(inst, payload, callback) {
          inst = inst._reactInternals;
          var lane = requestUpdateLane(), update = createUpdate(lane);
          update.payload = payload, callback != null && (update.callback = callback), payload = enqueueUpdate(inst, update, lane), payload !== null && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
        },
        enqueueReplaceState: function(inst, payload, callback) {
          inst = inst._reactInternals;
          var lane = requestUpdateLane(), update = createUpdate(lane);
          update.tag = 1, update.payload = payload, callback != null && (update.callback = callback), payload = enqueueUpdate(inst, update, lane), payload !== null && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
        },
        enqueueForceUpdate: function(inst, callback) {
          inst = inst._reactInternals;
          var lane = requestUpdateLane(), update = createUpdate(lane);
          update.tag = 2, callback != null && (update.callback = callback), callback = enqueueUpdate(inst, update, lane), callback !== null && (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
        }
      };
      function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
        return workInProgress2 = workInProgress2.stateNode, typeof workInProgress2.shouldComponentUpdate == "function" ? workInProgress2.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0;
      }
      function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
        workInProgress2 = instance.state, typeof instance.componentWillReceiveProps == "function" && instance.componentWillReceiveProps(newProps, nextContext), typeof instance.UNSAFE_componentWillReceiveProps == "function" && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext), instance.state !== workInProgress2 && classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
      }
      function resolveClassComponentProps(Component4, baseProps) {
        var newProps = baseProps;
        if ("ref" in baseProps) {
          newProps = {};
          for (var propName in baseProps)
            propName !== "ref" && (newProps[propName] = baseProps[propName]);
        }
        if (Component4 = Component4.defaultProps) {
          newProps === baseProps && (newProps = assign({}, newProps));
          for (var propName$73 in Component4)
            newProps[propName$73] === void 0 && (newProps[propName$73] = Component4[propName$73]);
        }
        return newProps;
      }
      function defaultOnUncaughtError(error) {
        reportGlobalError(error);
      }
      function defaultOnCaughtError(error) {
        console.error(error);
      }
      function defaultOnRecoverableError(error) {
        reportGlobalError(error);
      }
      function logUncaughtError(root2, errorInfo) {
        try {
          var onUncaughtError = root2.onUncaughtError;
          onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
        } catch (e$74) {
          setTimeout(function() {
            throw e$74;
          });
        }
      }
      function logCaughtError(root2, boundary, errorInfo) {
        try {
          var onCaughtError = root2.onCaughtError;
          onCaughtError(errorInfo.value, {
            componentStack: errorInfo.stack,
            errorBoundary: boundary.tag === 1 ? boundary.stateNode : null
          });
        } catch (e$75) {
          setTimeout(function() {
            throw e$75;
          });
        }
      }
      function createRootErrorUpdate(root2, errorInfo, lane) {
        return lane = createUpdate(lane), lane.tag = 3, lane.payload = { element: null }, lane.callback = function() {
          logUncaughtError(root2, errorInfo);
        }, lane;
      }
      function createClassErrorUpdate(lane) {
        return lane = createUpdate(lane), lane.tag = 3, lane;
      }
      function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
        var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
        if (typeof getDerivedStateFromError == "function") {
          var error = errorInfo.value;
          update.payload = function() {
            return getDerivedStateFromError(error);
          }, update.callback = function() {
            logCaughtError(root2, fiber, errorInfo);
          };
        }
        var inst = fiber.stateNode;
        inst !== null && typeof inst.componentDidCatch == "function" && (update.callback = function() {
          logCaughtError(root2, fiber, errorInfo), typeof getDerivedStateFromError != "function" && (legacyErrorBoundariesThatAlreadyFailed === null ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
          var stack = errorInfo.stack;
          this.componentDidCatch(errorInfo.value, {
            componentStack: stack !== null ? stack : ""
          });
        });
      }
      function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
        if (sourceFiber.flags |= 32768, value !== null && typeof value == "object" && typeof value.then == "function") {
          if (returnFiber = sourceFiber.alternate, returnFiber !== null && propagateParentContextChanges(
            returnFiber,
            sourceFiber,
            rootRenderLanes,
            !0
          ), sourceFiber = suspenseHandlerStackCursor.current, sourceFiber !== null) {
            switch (sourceFiber.tag) {
              case 31:
              case 13:
                return shellBoundary === null ? renderDidSuspendDelayIfPossible() : sourceFiber.alternate === null && workInProgressRootExitStatus === 0 && (workInProgressRootExitStatus = 3), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, returnFiber === null ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root2, value, rootRenderLanes)), !1;
              case 22:
                return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, returnFiber === null ? (returnFiber = {
                  transitions: null,
                  markerInstances: null,
                  retryQueue: /* @__PURE__ */ new Set([value])
                }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, sourceFiber === null ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), !1;
            }
            throw Error(formatProdErrorMessage(435, sourceFiber.tag));
          }
          return attachPingListener(root2, value, rootRenderLanes), renderDidSuspendDelayIfPossible(), !1;
        }
        if (isHydrating)
          return returnFiber = suspenseHandlerStackCursor.current, returnFiber !== null ? ((returnFiber.flags & 65536) === 0 && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && (root2 = Error(formatProdErrorMessage(422), { cause: value }), queueHydrationError(createCapturedValueAtFiber(root2, sourceFiber)))) : (value !== HydrationMismatchException && (returnFiber = Error(formatProdErrorMessage(423), {
            cause: value
          }), queueHydrationError(
            createCapturedValueAtFiber(returnFiber, sourceFiber)
          )), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
            root2.stateNode,
            value,
            rootRenderLanes
          ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== 4 && (workInProgressRootExitStatus = 2)), !1;
        var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
        if (wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber), workInProgressRootConcurrentErrors === null ? workInProgressRootConcurrentErrors = [wrapperError] : workInProgressRootConcurrentErrors.push(wrapperError), workInProgressRootExitStatus !== 4 && (workInProgressRootExitStatus = 2), returnFiber === null) return !0;
        value = createCapturedValueAtFiber(value, sourceFiber), sourceFiber = returnFiber;
        do {
          switch (sourceFiber.tag) {
            case 3:
              return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(sourceFiber.stateNode, value, root2), enqueueCapturedUpdate(sourceFiber, root2), !1;
            case 1:
              if (returnFiber = sourceFiber.type, wrapperError = sourceFiber.stateNode, (sourceFiber.flags & 128) === 0 && (typeof returnFiber.getDerivedStateFromError == "function" || wrapperError !== null && typeof wrapperError.componentDidCatch == "function" && (legacyErrorBoundariesThatAlreadyFailed === null || !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))
                return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
                  rootRenderLanes,
                  root2,
                  sourceFiber,
                  value
                ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1;
          }
          sourceFiber = sourceFiber.return;
        } while (sourceFiber !== null);
        return !1;
      }
      var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1;
      function reconcileChildren(current, workInProgress2, nextChildren, renderLanes2) {
        workInProgress2.child = current === null ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
          workInProgress2,
          current.child,
          nextChildren,
          renderLanes2
        );
      }
      function updateForwardRef(current, workInProgress2, Component4, nextProps, renderLanes2) {
        Component4 = Component4.render;
        var ref = workInProgress2.ref;
        if ("ref" in nextProps) {
          var propsWithoutRef = {};
          for (var key in nextProps)
            key !== "ref" && (propsWithoutRef[key] = nextProps[key]);
        } else propsWithoutRef = nextProps;
        return prepareToReadContext(workInProgress2), nextProps = renderWithHooks(
          current,
          workInProgress2,
          Component4,
          propsWithoutRef,
          ref,
          renderLanes2
        ), key = checkDidRenderIdHook(), current !== null && !didReceiveUpdate ? (bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2)) : (isHydrating && key && pushMaterializedTreeId(workInProgress2), workInProgress2.flags |= 1, reconcileChildren(current, workInProgress2, nextProps, renderLanes2), workInProgress2.child);
      }
      function updateMemoComponent(current, workInProgress2, Component4, nextProps, renderLanes2) {
        if (current === null) {
          var type = Component4.type;
          return typeof type == "function" && !shouldConstruct(type) && type.defaultProps === void 0 && Component4.compare === null ? (workInProgress2.tag = 15, workInProgress2.type = type, updateSimpleMemoComponent(
            current,
            workInProgress2,
            type,
            nextProps,
            renderLanes2
          )) : (current = createFiberFromTypeAndProps(
            Component4.type,
            null,
            nextProps,
            workInProgress2,
            workInProgress2.mode,
            renderLanes2
          ), current.ref = workInProgress2.ref, current.return = workInProgress2, workInProgress2.child = current);
        }
        if (type = current.child, !checkScheduledUpdateOrContext(current, renderLanes2)) {
          var prevProps = type.memoizedProps;
          if (Component4 = Component4.compare, Component4 = Component4 !== null ? Component4 : shallowEqual, Component4(prevProps, nextProps) && current.ref === workInProgress2.ref)
            return bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
        }
        return workInProgress2.flags |= 1, current = createWorkInProgress(type, nextProps), current.ref = workInProgress2.ref, current.return = workInProgress2, workInProgress2.child = current;
      }
      function updateSimpleMemoComponent(current, workInProgress2, Component4, nextProps, renderLanes2) {
        if (current !== null) {
          var prevProps = current.memoizedProps;
          if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress2.ref)
            if (didReceiveUpdate = !1, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current, renderLanes2))
              (current.flags & 131072) !== 0 && (didReceiveUpdate = !0);
            else
              return workInProgress2.lanes = current.lanes, bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
        }
        return updateFunctionComponent(
          current,
          workInProgress2,
          Component4,
          nextProps,
          renderLanes2
        );
      }
      function updateOffscreenComponent(current, workInProgress2, renderLanes2, nextProps) {
        var nextChildren = nextProps.children, prevState = current !== null ? current.memoizedState : null;
        if (current === null && workInProgress2.stateNode === null && (workInProgress2.stateNode = {
          _visibility: 1,
          _pendingMarkers: null,
          _retryCache: null,
          _transitions: null
        }), nextProps.mode === "hidden") {
          if ((workInProgress2.flags & 128) !== 0) {
            if (prevState = prevState !== null ? prevState.baseLanes | renderLanes2 : renderLanes2, current !== null) {
              for (nextProps = workInProgress2.child = current.child, nextChildren = 0; nextProps !== null; )
                nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
              nextProps = nextChildren & ~prevState;
            } else nextProps = 0, workInProgress2.child = null;
            return deferHiddenOffscreenComponent(
              current,
              workInProgress2,
              prevState,
              renderLanes2,
              nextProps
            );
          }
          if ((renderLanes2 & 536870912) !== 0)
            workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, current !== null && pushTransition(
              workInProgress2,
              prevState !== null ? prevState.cachePool : null
            ), prevState !== null ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress2);
          else
            return nextProps = workInProgress2.lanes = 536870912, deferHiddenOffscreenComponent(
              current,
              workInProgress2,
              prevState !== null ? prevState.baseLanes | renderLanes2 : renderLanes2,
              renderLanes2,
              nextProps
            );
        } else
          prevState !== null ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (current !== null && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(), reuseSuspenseHandlerOnStack(workInProgress2));
        return reconcileChildren(current, workInProgress2, nextChildren, renderLanes2), workInProgress2.child;
      }
      function bailoutOffscreenComponent(current, workInProgress2) {
        return current !== null && current.tag === 22 || workInProgress2.stateNode !== null || (workInProgress2.stateNode = {
          _visibility: 1,
          _pendingMarkers: null,
          _retryCache: null,
          _transitions: null
        }), workInProgress2.sibling;
      }
      function deferHiddenOffscreenComponent(current, workInProgress2, nextBaseLanes, renderLanes2, remainingChildLanes) {
        var JSCompiler_inline_result = peekCacheFromPool();
        return JSCompiler_inline_result = JSCompiler_inline_result === null ? null : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result }, workInProgress2.memoizedState = {
          baseLanes: nextBaseLanes,
          cachePool: JSCompiler_inline_result
        }, current !== null && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress2), current !== null && propagateParentContextChanges(current, workInProgress2, renderLanes2, !0), workInProgress2.childLanes = remainingChildLanes, null;
      }
      function mountActivityChildren(workInProgress2, nextProps) {
        return nextProps = mountWorkInProgressOffscreenFiber(
          { mode: nextProps.mode, children: nextProps.children },
          workInProgress2.mode
        ), nextProps.ref = workInProgress2.ref, workInProgress2.child = nextProps, nextProps.return = workInProgress2, nextProps;
      }
      function retryActivityComponentWithoutHydrating(current, workInProgress2, renderLanes2) {
        return reconcileChildFibers(workInProgress2, current.child, null, renderLanes2), current = mountActivityChildren(workInProgress2, workInProgress2.pendingProps), current.flags |= 2, popSuspenseHandler(workInProgress2), workInProgress2.memoizedState = null, current;
      }
      function updateActivityComponent(current, workInProgress2, renderLanes2) {
        var nextProps = workInProgress2.pendingProps, didSuspend = (workInProgress2.flags & 128) !== 0;
        if (workInProgress2.flags &= -129, current === null) {
          if (isHydrating) {
            if (nextProps.mode === "hidden")
              return current = mountActivityChildren(workInProgress2, nextProps), workInProgress2.lanes = 536870912, bailoutOffscreenComponent(null, current);
            if (pushDehydratedActivitySuspenseHandler(workInProgress2), (current = nextHydratableInstance) ? (current = canHydrateHydrationBoundary(
              current,
              rootOrSingletonContext
            ), current = current !== null && current.data === "&" ? current : null, current !== null && (workInProgress2.memoizedState = {
              dehydrated: current,
              treeContext: treeContextProvider !== null ? { id: treeContextId, overflow: treeContextOverflow } : null,
              retryLane: 536870912,
              hydrationErrors: null
            }, renderLanes2 = createFiberFromDehydratedFragment(current), renderLanes2.return = workInProgress2, workInProgress2.child = renderLanes2, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : current = null, current === null) throw throwOnHydrationMismatch(workInProgress2);
            return workInProgress2.lanes = 536870912, null;
          }
          return mountActivityChildren(workInProgress2, nextProps);
        }
        var prevState = current.memoizedState;
        if (prevState !== null) {
          var dehydrated = prevState.dehydrated;
          if (pushDehydratedActivitySuspenseHandler(workInProgress2), didSuspend)
            if (workInProgress2.flags & 256)
              workInProgress2.flags &= -257, workInProgress2 = retryActivityComponentWithoutHydrating(
                current,
                workInProgress2,
                renderLanes2
              );
            else if (workInProgress2.memoizedState !== null)
              workInProgress2.child = current.child, workInProgress2.flags |= 128, workInProgress2 = null;
            else throw Error(formatProdErrorMessage(558));
          else if (didReceiveUpdate || propagateParentContextChanges(current, workInProgress2, renderLanes2, !1), didSuspend = (renderLanes2 & current.childLanes) !== 0, didReceiveUpdate || didSuspend) {
            if (nextProps = workInProgressRoot, nextProps !== null && (dehydrated = getBumpedLaneForHydration(nextProps, renderLanes2), dehydrated !== 0 && dehydrated !== prevState.retryLane))
              throw prevState.retryLane = dehydrated, enqueueConcurrentRenderForLane(current, dehydrated), scheduleUpdateOnFiber(nextProps, current, dehydrated), SelectiveHydrationException;
            renderDidSuspendDelayIfPossible(), workInProgress2 = retryActivityComponentWithoutHydrating(
              current,
              workInProgress2,
              renderLanes2
            );
          } else
            current = prevState.treeContext, nextHydratableInstance = getNextHydratable(dehydrated.nextSibling), hydrationParentFiber = workInProgress2, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !1, current !== null && restoreSuspendedTreeContext(workInProgress2, current), workInProgress2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.flags |= 4096;
          return workInProgress2;
        }
        return current = createWorkInProgress(current.child, {
          mode: nextProps.mode,
          children: nextProps.children
        }), current.ref = workInProgress2.ref, workInProgress2.child = current, current.return = workInProgress2, current;
      }
      function markRef(current, workInProgress2) {
        var ref = workInProgress2.ref;
        if (ref === null)
          current !== null && current.ref !== null && (workInProgress2.flags |= 4194816);
        else {
          if (typeof ref != "function" && typeof ref != "object")
            throw Error(formatProdErrorMessage(284));
          (current === null || current.ref !== ref) && (workInProgress2.flags |= 4194816);
        }
      }
      function updateFunctionComponent(current, workInProgress2, Component4, nextProps, renderLanes2) {
        return prepareToReadContext(workInProgress2), Component4 = renderWithHooks(
          current,
          workInProgress2,
          Component4,
          nextProps,
          void 0,
          renderLanes2
        ), nextProps = checkDidRenderIdHook(), current !== null && !didReceiveUpdate ? (bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2)) : (isHydrating && nextProps && pushMaterializedTreeId(workInProgress2), workInProgress2.flags |= 1, reconcileChildren(current, workInProgress2, Component4, renderLanes2), workInProgress2.child);
      }
      function replayFunctionComponent(current, workInProgress2, nextProps, Component4, secondArg, renderLanes2) {
        return prepareToReadContext(workInProgress2), workInProgress2.updateQueue = null, nextProps = renderWithHooksAgain(
          workInProgress2,
          Component4,
          nextProps,
          secondArg
        ), finishRenderingHooks(current), Component4 = checkDidRenderIdHook(), current !== null && !didReceiveUpdate ? (bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2)) : (isHydrating && Component4 && pushMaterializedTreeId(workInProgress2), workInProgress2.flags |= 1, reconcileChildren(current, workInProgress2, nextProps, renderLanes2), workInProgress2.child);
      }
      function updateClassComponent(current, workInProgress2, Component4, nextProps, renderLanes2) {
        if (prepareToReadContext(workInProgress2), workInProgress2.stateNode === null) {
          var context = emptyContextObject, contextType = Component4.contextType;
          typeof contextType == "object" && contextType !== null && (context = readContext(contextType)), context = new Component4(nextProps, context), workInProgress2.memoizedState = context.state !== null && context.state !== void 0 ? context.state : null, context.updater = classComponentUpdater, workInProgress2.stateNode = context, context._reactInternals = workInProgress2, context = workInProgress2.stateNode, context.props = nextProps, context.state = workInProgress2.memoizedState, context.refs = {}, initializeUpdateQueue(workInProgress2), contextType = Component4.contextType, context.context = typeof contextType == "object" && contextType !== null ? readContext(contextType) : emptyContextObject, context.state = workInProgress2.memoizedState, contextType = Component4.getDerivedStateFromProps, typeof contextType == "function" && (applyDerivedStateFromProps(
            workInProgress2,
            Component4,
            contextType,
            nextProps
          ), context.state = workInProgress2.memoizedState), typeof Component4.getDerivedStateFromProps == "function" || typeof context.getSnapshotBeforeUpdate == "function" || typeof context.UNSAFE_componentWillMount != "function" && typeof context.componentWillMount != "function" || (contextType = context.state, typeof context.componentWillMount == "function" && context.componentWillMount(), typeof context.UNSAFE_componentWillMount == "function" && context.UNSAFE_componentWillMount(), contextType !== context.state && classComponentUpdater.enqueueReplaceState(context, context.state, null), processUpdateQueue(workInProgress2, nextProps, context, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), context.state = workInProgress2.memoizedState), typeof context.componentDidMount == "function" && (workInProgress2.flags |= 4194308), nextProps = !0;
        } else if (current === null) {
          context = workInProgress2.stateNode;
          var unresolvedOldProps = workInProgress2.memoizedProps, oldProps = resolveClassComponentProps(Component4, unresolvedOldProps);
          context.props = oldProps;
          var oldContext = context.context, contextType$jscomp$0 = Component4.contextType;
          contextType = emptyContextObject, typeof contextType$jscomp$0 == "object" && contextType$jscomp$0 !== null && (contextType = readContext(contextType$jscomp$0));
          var getDerivedStateFromProps = Component4.getDerivedStateFromProps;
          contextType$jscomp$0 = typeof getDerivedStateFromProps == "function" || typeof context.getSnapshotBeforeUpdate == "function", unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps, contextType$jscomp$0 || typeof context.UNSAFE_componentWillReceiveProps != "function" && typeof context.componentWillReceiveProps != "function" || (unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps(
            workInProgress2,
            context,
            nextProps,
            contextType
          ), hasForceUpdate = !1;
          var oldState = workInProgress2.memoizedState;
          context.state = oldState, processUpdateQueue(workInProgress2, nextProps, context, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), oldContext = workInProgress2.memoizedState, unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? (typeof getDerivedStateFromProps == "function" && (applyDerivedStateFromProps(
            workInProgress2,
            Component4,
            getDerivedStateFromProps,
            nextProps
          ), oldContext = workInProgress2.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate(
            workInProgress2,
            Component4,
            oldProps,
            nextProps,
            oldState,
            oldContext,
            contextType
          )) ? (contextType$jscomp$0 || typeof context.UNSAFE_componentWillMount != "function" && typeof context.componentWillMount != "function" || (typeof context.componentWillMount == "function" && context.componentWillMount(), typeof context.UNSAFE_componentWillMount == "function" && context.UNSAFE_componentWillMount()), typeof context.componentDidMount == "function" && (workInProgress2.flags |= 4194308)) : (typeof context.componentDidMount == "function" && (workInProgress2.flags |= 4194308), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), context.props = nextProps, context.state = oldContext, context.context = contextType, nextProps = oldProps) : (typeof context.componentDidMount == "function" && (workInProgress2.flags |= 4194308), nextProps = !1);
        } else {
          context = workInProgress2.stateNode, cloneUpdateQueue(current, workInProgress2), contextType = workInProgress2.memoizedProps, contextType$jscomp$0 = resolveClassComponentProps(Component4, contextType), context.props = contextType$jscomp$0, getDerivedStateFromProps = workInProgress2.pendingProps, oldState = context.context, oldContext = Component4.contextType, oldProps = emptyContextObject, typeof oldContext == "object" && oldContext !== null && (oldProps = readContext(oldContext)), unresolvedOldProps = Component4.getDerivedStateFromProps, (oldContext = typeof unresolvedOldProps == "function" || typeof context.getSnapshotBeforeUpdate == "function") || typeof context.UNSAFE_componentWillReceiveProps != "function" && typeof context.componentWillReceiveProps != "function" || (contextType !== getDerivedStateFromProps || oldState !== oldProps) && callComponentWillReceiveProps(
            workInProgress2,
            context,
            nextProps,
            oldProps
          ), hasForceUpdate = !1, oldState = workInProgress2.memoizedState, context.state = oldState, processUpdateQueue(workInProgress2, nextProps, context, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction();
          var newState = workInProgress2.memoizedState;
          contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || current !== null && current.dependencies !== null && checkIfContextChanged(current.dependencies) ? (typeof unresolvedOldProps == "function" && (applyDerivedStateFromProps(
            workInProgress2,
            Component4,
            unresolvedOldProps,
            nextProps
          ), newState = workInProgress2.memoizedState), (contextType$jscomp$0 = hasForceUpdate || checkShouldComponentUpdate(
            workInProgress2,
            Component4,
            contextType$jscomp$0,
            nextProps,
            oldState,
            newState,
            oldProps
          ) || current !== null && current.dependencies !== null && checkIfContextChanged(current.dependencies)) ? (oldContext || typeof context.UNSAFE_componentWillUpdate != "function" && typeof context.componentWillUpdate != "function" || (typeof context.componentWillUpdate == "function" && context.componentWillUpdate(nextProps, newState, oldProps), typeof context.UNSAFE_componentWillUpdate == "function" && context.UNSAFE_componentWillUpdate(
            nextProps,
            newState,
            oldProps
          )), typeof context.componentDidUpdate == "function" && (workInProgress2.flags |= 4), typeof context.getSnapshotBeforeUpdate == "function" && (workInProgress2.flags |= 1024)) : (typeof context.componentDidUpdate != "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), typeof context.getSnapshotBeforeUpdate != "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), context.props = nextProps, context.state = newState, context.context = oldProps, nextProps = contextType$jscomp$0) : (typeof context.componentDidUpdate != "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), typeof context.getSnapshotBeforeUpdate != "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), nextProps = !1);
        }
        return context = nextProps, markRef(current, workInProgress2), nextProps = (workInProgress2.flags & 128) !== 0, context || nextProps ? (context = workInProgress2.stateNode, Component4 = nextProps && typeof Component4.getDerivedStateFromError != "function" ? null : context.render(), workInProgress2.flags |= 1, current !== null && nextProps ? (workInProgress2.child = reconcileChildFibers(
          workInProgress2,
          current.child,
          null,
          renderLanes2
        ), workInProgress2.child = reconcileChildFibers(
          workInProgress2,
          null,
          Component4,
          renderLanes2
        )) : reconcileChildren(current, workInProgress2, Component4, renderLanes2), workInProgress2.memoizedState = context.state, current = workInProgress2.child) : current = bailoutOnAlreadyFinishedWork(
          current,
          workInProgress2,
          renderLanes2
        ), current;
      }
      function mountHostRootWithoutHydrating(current, workInProgress2, nextChildren, renderLanes2) {
        return resetHydrationState(), workInProgress2.flags |= 256, reconcileChildren(current, workInProgress2, nextChildren, renderLanes2), workInProgress2.child;
      }
      var SUSPENDED_MARKER = {
        dehydrated: null,
        treeContext: null,
        retryLane: 0,
        hydrationErrors: null
      };
      function mountSuspenseOffscreenState(renderLanes2) {
        return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
      }
      function getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer, renderLanes2) {
        return current = current !== null ? current.childLanes & ~renderLanes2 : 0, primaryTreeDidDefer && (current |= workInProgressDeferredLane), current;
      }
      function updateSuspenseComponent(current, workInProgress2, renderLanes2) {
        var nextProps = workInProgress2.pendingProps, showFallback = !1, didSuspend = (workInProgress2.flags & 128) !== 0, JSCompiler_temp;
        if ((JSCompiler_temp = didSuspend) || (JSCompiler_temp = current !== null && current.memoizedState === null ? !1 : (suspenseStackCursor.current & 2) !== 0), JSCompiler_temp && (showFallback = !0, workInProgress2.flags &= -129), JSCompiler_temp = (workInProgress2.flags & 32) !== 0, workInProgress2.flags &= -33, current === null) {
          if (isHydrating) {
            if (showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2), (current = nextHydratableInstance) ? (current = canHydrateHydrationBoundary(
              current,
              rootOrSingletonContext
            ), current = current !== null && current.data !== "&" ? current : null, current !== null && (workInProgress2.memoizedState = {
              dehydrated: current,
              treeContext: treeContextProvider !== null ? { id: treeContextId, overflow: treeContextOverflow } : null,
              retryLane: 536870912,
              hydrationErrors: null
            }, renderLanes2 = createFiberFromDehydratedFragment(current), renderLanes2.return = workInProgress2, workInProgress2.child = renderLanes2, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : current = null, current === null) throw throwOnHydrationMismatch(workInProgress2);
            return isSuspenseInstanceFallback(current) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null;
          }
          var nextPrimaryChildren = nextProps.children;
          return nextProps = nextProps.fallback, showFallback ? (reuseSuspenseHandlerOnStack(workInProgress2), showFallback = workInProgress2.mode, nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
            { mode: "hidden", children: nextPrimaryChildren },
            showFallback
          ), nextProps = createFiberFromFragment(
            nextProps,
            showFallback,
            renderLanes2,
            null
          ), nextPrimaryChildren.return = workInProgress2, nextProps.return = workInProgress2, nextPrimaryChildren.sibling = nextProps, workInProgress2.child = nextPrimaryChildren, nextProps = workInProgress2.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes2), nextProps.childLanes = getRemainingWorkInPrimaryTree(
            current,
            JSCompiler_temp,
            renderLanes2
          ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(null, nextProps)) : (pushPrimaryTreeSuspenseHandler(workInProgress2), mountSuspensePrimaryChildren(workInProgress2, nextPrimaryChildren));
        }
        var prevState = current.memoizedState;
        if (prevState !== null && (nextPrimaryChildren = prevState.dehydrated, nextPrimaryChildren !== null)) {
          if (didSuspend)
            workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
              current,
              workInProgress2,
              renderLanes2
            )) : workInProgress2.memoizedState !== null ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = nextProps.fallback, showFallback = workInProgress2.mode, nextProps = mountWorkInProgressOffscreenFiber(
              { mode: "visible", children: nextProps.children },
              showFallback
            ), nextPrimaryChildren = createFiberFromFragment(
              nextPrimaryChildren,
              showFallback,
              renderLanes2,
              null
            ), nextPrimaryChildren.flags |= 2, nextProps.return = workInProgress2, nextPrimaryChildren.return = workInProgress2, nextProps.sibling = nextPrimaryChildren, workInProgress2.child = nextProps, reconcileChildFibers(
              workInProgress2,
              current.child,
              null,
              renderLanes2
            ), nextProps = workInProgress2.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes2), nextProps.childLanes = getRemainingWorkInPrimaryTree(
              current,
              JSCompiler_temp,
              renderLanes2
            ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = bailoutOffscreenComponent(null, nextProps));
          else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isSuspenseInstanceFallback(nextPrimaryChildren)) {
            if (JSCompiler_temp = nextPrimaryChildren.nextSibling && nextPrimaryChildren.nextSibling.dataset, JSCompiler_temp) var digest = JSCompiler_temp.dgst;
            JSCompiler_temp = digest, nextProps = Error(formatProdErrorMessage(419)), nextProps.stack = "", nextProps.digest = JSCompiler_temp, queueHydrationError({ value: nextProps, source: null, stack: null }), workInProgress2 = retrySuspenseComponentWithoutHydrating(
              current,
              workInProgress2,
              renderLanes2
            );
          } else if (didReceiveUpdate || propagateParentContextChanges(current, workInProgress2, renderLanes2, !1), JSCompiler_temp = (renderLanes2 & current.childLanes) !== 0, didReceiveUpdate || JSCompiler_temp) {
            if (JSCompiler_temp = workInProgressRoot, JSCompiler_temp !== null && (nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes2), nextProps !== 0 && nextProps !== prevState.retryLane))
              throw prevState.retryLane = nextProps, enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException;
            isSuspenseInstancePending(nextPrimaryChildren) || renderDidSuspendDelayIfPossible(), workInProgress2 = retrySuspenseComponentWithoutHydrating(
              current,
              workInProgress2,
              renderLanes2
            );
          } else
            isSuspenseInstancePending(nextPrimaryChildren) ? (workInProgress2.flags |= 192, workInProgress2.child = current.child, workInProgress2 = null) : (current = prevState.treeContext, nextHydratableInstance = getNextHydratable(
              nextPrimaryChildren.nextSibling
            ), hydrationParentFiber = workInProgress2, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !1, current !== null && restoreSuspendedTreeContext(workInProgress2, current), workInProgress2 = mountSuspensePrimaryChildren(
              workInProgress2,
              nextProps.children
            ), workInProgress2.flags |= 4096);
          return workInProgress2;
        }
        return showFallback ? (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = nextProps.fallback, showFallback = workInProgress2.mode, prevState = current.child, digest = prevState.sibling, nextProps = createWorkInProgress(prevState, {
          mode: "hidden",
          children: nextProps.children
        }), nextProps.subtreeFlags = prevState.subtreeFlags & 65011712, digest !== null ? nextPrimaryChildren = createWorkInProgress(
          digest,
          nextPrimaryChildren
        ) : (nextPrimaryChildren = createFiberFromFragment(
          nextPrimaryChildren,
          showFallback,
          renderLanes2,
          null
        ), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress2, nextProps.return = workInProgress2, nextProps.sibling = nextPrimaryChildren, workInProgress2.child = nextProps, bailoutOffscreenComponent(null, nextProps), nextProps = workInProgress2.child, nextPrimaryChildren = current.child.memoizedState, nextPrimaryChildren === null ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes2) : (showFallback = nextPrimaryChildren.cachePool, showFallback !== null ? (prevState = CacheContext._currentValue, showFallback = showFallback.parent !== prevState ? { parent: prevState, pool: prevState } : showFallback) : showFallback = getSuspendedCache(), nextPrimaryChildren = {
          baseLanes: nextPrimaryChildren.baseLanes | renderLanes2,
          cachePool: showFallback
        }), nextProps.memoizedState = nextPrimaryChildren, nextProps.childLanes = getRemainingWorkInPrimaryTree(
          current,
          JSCompiler_temp,
          renderLanes2
        ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(current.child, nextProps)) : (pushPrimaryTreeSuspenseHandler(workInProgress2), renderLanes2 = current.child, current = renderLanes2.sibling, renderLanes2 = createWorkInProgress(renderLanes2, {
          mode: "visible",
          children: nextProps.children
        }), renderLanes2.return = workInProgress2, renderLanes2.sibling = null, current !== null && (JSCompiler_temp = workInProgress2.deletions, JSCompiler_temp === null ? (workInProgress2.deletions = [current], workInProgress2.flags |= 16) : JSCompiler_temp.push(current)), workInProgress2.child = renderLanes2, workInProgress2.memoizedState = null, renderLanes2);
      }
      function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
        return primaryChildren = mountWorkInProgressOffscreenFiber(
          { mode: "visible", children: primaryChildren },
          workInProgress2.mode
        ), primaryChildren.return = workInProgress2, workInProgress2.child = primaryChildren;
      }
      function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
        return offscreenProps = createFiberImplClass(22, offscreenProps, null, mode), offscreenProps.lanes = 0, offscreenProps;
      }
      function retrySuspenseComponentWithoutHydrating(current, workInProgress2, renderLanes2) {
        return reconcileChildFibers(workInProgress2, current.child, null, renderLanes2), current = mountSuspensePrimaryChildren(
          workInProgress2,
          workInProgress2.pendingProps.children
        ), current.flags |= 2, workInProgress2.memoizedState = null, current;
      }
      function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
        fiber.lanes |= renderLanes2;
        var alternate = fiber.alternate;
        alternate !== null && (alternate.lanes |= renderLanes2), scheduleContextWorkOnParentPath(fiber.return, renderLanes2, propagationRoot);
      }
      function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode, treeForkCount2) {
        var renderState = workInProgress2.memoizedState;
        renderState === null ? workInProgress2.memoizedState = {
          isBackwards,
          rendering: null,
          renderingStartTime: 0,
          last: lastContentRow,
          tail,
          tailMode,
          treeForkCount: treeForkCount2
        } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount2);
      }
      function updateSuspenseListComponent(current, workInProgress2, renderLanes2) {
        var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail;
        nextProps = nextProps.children;
        var suspenseContext = suspenseStackCursor.current, shouldForceFallback = (suspenseContext & 2) !== 0;
        if (shouldForceFallback ? (suspenseContext = suspenseContext & 1 | 2, workInProgress2.flags |= 128) : suspenseContext &= 1, push(suspenseStackCursor, suspenseContext), reconcileChildren(current, workInProgress2, nextProps, renderLanes2), nextProps = isHydrating ? treeForkCount : 0, !shouldForceFallback && current !== null && (current.flags & 128) !== 0)
          a: for (current = workInProgress2.child; current !== null; ) {
            if (current.tag === 13)
              current.memoizedState !== null && scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2);
            else if (current.tag === 19)
              scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2);
            else if (current.child !== null) {
              current.child.return = current, current = current.child;
              continue;
            }
            if (current === workInProgress2) break a;
            for (; current.sibling === null; ) {
              if (current.return === null || current.return === workInProgress2)
                break a;
              current = current.return;
            }
            current.sibling.return = current.return, current = current.sibling;
          }
        switch (revealOrder) {
          case "forwards":
            for (renderLanes2 = workInProgress2.child, revealOrder = null; renderLanes2 !== null; )
              current = renderLanes2.alternate, current !== null && findFirstSuspended(current) === null && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
            renderLanes2 = revealOrder, renderLanes2 === null ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null), initSuspenseListRenderState(
              workInProgress2,
              !1,
              revealOrder,
              renderLanes2,
              tailMode,
              nextProps
            );
            break;
          case "backwards":
          case "unstable_legacy-backwards":
            for (renderLanes2 = null, revealOrder = workInProgress2.child, workInProgress2.child = null; revealOrder !== null; ) {
              if (current = revealOrder.alternate, current !== null && findFirstSuspended(current) === null) {
                workInProgress2.child = revealOrder;
                break;
              }
              current = revealOrder.sibling, revealOrder.sibling = renderLanes2, renderLanes2 = revealOrder, revealOrder = current;
            }
            initSuspenseListRenderState(
              workInProgress2,
              !0,
              renderLanes2,
              null,
              tailMode,
              nextProps
            );
            break;
          case "together":
            initSuspenseListRenderState(
              workInProgress2,
              !1,
              null,
              null,
              void 0,
              nextProps
            );
            break;
          default:
            workInProgress2.memoizedState = null;
        }
        return workInProgress2.child;
      }
      function bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2) {
        if (current !== null && (workInProgress2.dependencies = current.dependencies), workInProgressRootSkippedLanes |= workInProgress2.lanes, (renderLanes2 & workInProgress2.childLanes) === 0)
          if (current !== null) {
            if (propagateParentContextChanges(
              current,
              workInProgress2,
              renderLanes2,
              !1
            ), (renderLanes2 & workInProgress2.childLanes) === 0)
              return null;
          } else return null;
        if (current !== null && workInProgress2.child !== current.child)
          throw Error(formatProdErrorMessage(153));
        if (workInProgress2.child !== null) {
          for (current = workInProgress2.child, renderLanes2 = createWorkInProgress(current, current.pendingProps), workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2; current.sibling !== null; )
            current = current.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current, current.pendingProps), renderLanes2.return = workInProgress2;
          renderLanes2.sibling = null;
        }
        return workInProgress2.child;
      }
      function checkScheduledUpdateOrContext(current, renderLanes2) {
        return (current.lanes & renderLanes2) !== 0 ? !0 : (current = current.dependencies, !!(current !== null && checkIfContextChanged(current)));
      }
      function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress2, renderLanes2) {
        switch (workInProgress2.tag) {
          case 3:
            pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo), pushProvider(workInProgress2, CacheContext, current.memoizedState.cache), resetHydrationState();
            break;
          case 27:
          case 5:
            pushHostContext(workInProgress2);
            break;
          case 4:
            pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo);
            break;
          case 10:
            pushProvider(
              workInProgress2,
              workInProgress2.type,
              workInProgress2.memoizedProps.value
            );
            break;
          case 31:
            if (workInProgress2.memoizedState !== null)
              return workInProgress2.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress2), null;
            break;
          case 13:
            var state$102 = workInProgress2.memoizedState;
            if (state$102 !== null)
              return state$102.dehydrated !== null ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null) : (renderLanes2 & workInProgress2.child.childLanes) !== 0 ? updateSuspenseComponent(current, workInProgress2, renderLanes2) : (pushPrimaryTreeSuspenseHandler(workInProgress2), current = bailoutOnAlreadyFinishedWork(
                current,
                workInProgress2,
                renderLanes2
              ), current !== null ? current.sibling : null);
            pushPrimaryTreeSuspenseHandler(workInProgress2);
            break;
          case 19:
            var didSuspendBefore = (current.flags & 128) !== 0;
            if (state$102 = (renderLanes2 & workInProgress2.childLanes) !== 0, state$102 || (propagateParentContextChanges(
              current,
              workInProgress2,
              renderLanes2,
              !1
            ), state$102 = (renderLanes2 & workInProgress2.childLanes) !== 0), didSuspendBefore) {
              if (state$102)
                return updateSuspenseListComponent(
                  current,
                  workInProgress2,
                  renderLanes2
                );
              workInProgress2.flags |= 128;
            }
            if (didSuspendBefore = workInProgress2.memoizedState, didSuspendBefore !== null && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null), push(suspenseStackCursor, suspenseStackCursor.current), state$102) break;
            return null;
          case 22:
            return workInProgress2.lanes = 0, updateOffscreenComponent(
              current,
              workInProgress2,
              renderLanes2,
              workInProgress2.pendingProps
            );
          case 24:
            pushProvider(workInProgress2, CacheContext, current.memoizedState.cache);
        }
        return bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
      }
      function beginWork(current, workInProgress2, renderLanes2) {
        if (current !== null)
          if (current.memoizedProps !== workInProgress2.pendingProps)
            didReceiveUpdate = !0;
          else {
            if (!checkScheduledUpdateOrContext(current, renderLanes2) && (workInProgress2.flags & 128) === 0)
              return didReceiveUpdate = !1, attemptEarlyBailoutIfNoScheduledUpdate(
                current,
                workInProgress2,
                renderLanes2
              );
            didReceiveUpdate = (current.flags & 131072) !== 0;
          }
        else
          didReceiveUpdate = !1, isHydrating && (workInProgress2.flags & 1048576) !== 0 && pushTreeId(workInProgress2, treeForkCount, workInProgress2.index);
        switch (workInProgress2.lanes = 0, workInProgress2.tag) {
          case 16:
            a: {
              var props = workInProgress2.pendingProps;
              if (current = resolveLazy(workInProgress2.elementType), workInProgress2.type = current, typeof current == "function")
                shouldConstruct(current) ? (props = resolveClassComponentProps(current, props), workInProgress2.tag = 1, workInProgress2 = updateClassComponent(
                  null,
                  workInProgress2,
                  current,
                  props,
                  renderLanes2
                )) : (workInProgress2.tag = 0, workInProgress2 = updateFunctionComponent(
                  null,
                  workInProgress2,
                  current,
                  props,
                  renderLanes2
                ));
              else {
                if (current != null) {
                  var $$typeof = current.$$typeof;
                  if ($$typeof === REACT_FORWARD_REF_TYPE) {
                    workInProgress2.tag = 11, workInProgress2 = updateForwardRef(
                      null,
                      workInProgress2,
                      current,
                      props,
                      renderLanes2
                    );
                    break a;
                  } else if ($$typeof === REACT_MEMO_TYPE) {
                    workInProgress2.tag = 14, workInProgress2 = updateMemoComponent(
                      null,
                      workInProgress2,
                      current,
                      props,
                      renderLanes2
                    );
                    break a;
                  }
                }
                throw workInProgress2 = getComponentNameFromType(current) || current, Error(formatProdErrorMessage(306, workInProgress2, ""));
              }
            }
            return workInProgress2;
          case 0:
            return updateFunctionComponent(
              current,
              workInProgress2,
              workInProgress2.type,
              workInProgress2.pendingProps,
              renderLanes2
            );
          case 1:
            return props = workInProgress2.type, $$typeof = resolveClassComponentProps(
              props,
              workInProgress2.pendingProps
            ), updateClassComponent(
              current,
              workInProgress2,
              props,
              $$typeof,
              renderLanes2
            );
          case 3:
            a: {
              if (pushHostContainer(
                workInProgress2,
                workInProgress2.stateNode.containerInfo
              ), current === null) throw Error(formatProdErrorMessage(387));
              props = workInProgress2.pendingProps;
              var prevState = workInProgress2.memoizedState;
              $$typeof = prevState.element, cloneUpdateQueue(current, workInProgress2), processUpdateQueue(workInProgress2, props, null, renderLanes2);
              var nextState = workInProgress2.memoizedState;
              if (props = nextState.cache, pushProvider(workInProgress2, CacheContext, props), props !== prevState.cache && propagateContextChanges(
                workInProgress2,
                [CacheContext],
                renderLanes2,
                !0
              ), suspendIfUpdateReadFromEntangledAsyncAction(), props = nextState.element, prevState.isDehydrated)
                if (prevState = {
                  element: props,
                  isDehydrated: !1,
                  cache: nextState.cache
                }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
                  workInProgress2 = mountHostRootWithoutHydrating(
                    current,
                    workInProgress2,
                    props,
                    renderLanes2
                  );
                  break a;
                } else if (props !== $$typeof) {
                  $$typeof = createCapturedValueAtFiber(
                    Error(formatProdErrorMessage(424)),
                    workInProgress2
                  ), queueHydrationError($$typeof), workInProgress2 = mountHostRootWithoutHydrating(
                    current,
                    workInProgress2,
                    props,
                    renderLanes2
                  );
                  break a;
                } else {
                  switch (current = workInProgress2.stateNode.containerInfo, current.nodeType) {
                    case 9:
                      current = current.body;
                      break;
                    default:
                      current = current.nodeName === "HTML" ? current.ownerDocument.body : current;
                  }
                  for (nextHydratableInstance = getNextHydratable(current.firstChild), hydrationParentFiber = workInProgress2, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !0, renderLanes2 = mountChildFibers(
                    workInProgress2,
                    null,
                    props,
                    renderLanes2
                  ), workInProgress2.child = renderLanes2; renderLanes2; )
                    renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
                }
              else {
                if (resetHydrationState(), props === $$typeof) {
                  workInProgress2 = bailoutOnAlreadyFinishedWork(
                    current,
                    workInProgress2,
                    renderLanes2
                  );
                  break a;
                }
                reconcileChildren(current, workInProgress2, props, renderLanes2);
              }
              workInProgress2 = workInProgress2.child;
            }
            return workInProgress2;
          case 26:
            return markRef(current, workInProgress2), current === null ? (renderLanes2 = getResource(
              workInProgress2.type,
              null,
              workInProgress2.pendingProps,
              null
            )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current = workInProgress2.pendingProps, props = getOwnerDocumentFromRootContainer(
              rootInstanceStackCursor.current
            ).createElement(renderLanes2), props[internalInstanceKey] = workInProgress2, props[internalPropsKey] = current, setInitialProperties(props, renderLanes2, current), markNodeAsHoistable(props), workInProgress2.stateNode = props) : workInProgress2.memoizedState = getResource(
              workInProgress2.type,
              current.memoizedProps,
              workInProgress2.pendingProps,
              current.memoizedState
            ), null;
          case 27:
            return pushHostContext(workInProgress2), current === null && isHydrating && (props = workInProgress2.stateNode = resolveSingletonInstance(
              workInProgress2.type,
              workInProgress2.pendingProps,
              rootInstanceStackCursor.current
            ), hydrationParentFiber = workInProgress2, rootOrSingletonContext = !0, $$typeof = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = $$typeof, nextHydratableInstance = getNextHydratable(props.firstChild)) : nextHydratableInstance = $$typeof), reconcileChildren(
              current,
              workInProgress2,
              workInProgress2.pendingProps.children,
              renderLanes2
            ), markRef(current, workInProgress2), current === null && (workInProgress2.flags |= 4194304), workInProgress2.child;
          case 5:
            return current === null && isHydrating && (($$typeof = props = nextHydratableInstance) && (props = canHydrateInstance(
              props,
              workInProgress2.type,
              workInProgress2.pendingProps,
              rootOrSingletonContext
            ), props !== null ? (workInProgress2.stateNode = props, hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(props.firstChild), rootOrSingletonContext = !1, $$typeof = !0) : $$typeof = !1), $$typeof || throwOnHydrationMismatch(workInProgress2)), pushHostContext(workInProgress2), $$typeof = workInProgress2.type, prevState = workInProgress2.pendingProps, nextState = current !== null ? current.memoizedProps : null, props = prevState.children, shouldSetTextContent($$typeof, prevState) ? props = null : nextState !== null && shouldSetTextContent($$typeof, nextState) && (workInProgress2.flags |= 32), workInProgress2.memoizedState !== null && ($$typeof = renderWithHooks(
              current,
              workInProgress2,
              TransitionAwareHostComponent,
              null,
              null,
              renderLanes2
            ), HostTransitionContext._currentValue = $$typeof), markRef(current, workInProgress2), reconcileChildren(current, workInProgress2, props, renderLanes2), workInProgress2.child;
          case 6:
            return current === null && isHydrating && ((current = renderLanes2 = nextHydratableInstance) && (renderLanes2 = canHydrateTextInstance(
              renderLanes2,
              workInProgress2.pendingProps,
              rootOrSingletonContext
            ), renderLanes2 !== null ? (workInProgress2.stateNode = renderLanes2, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, current = !0) : current = !1), current || throwOnHydrationMismatch(workInProgress2)), null;
          case 13:
            return updateSuspenseComponent(current, workInProgress2, renderLanes2);
          case 4:
            return pushHostContainer(
              workInProgress2,
              workInProgress2.stateNode.containerInfo
            ), props = workInProgress2.pendingProps, current === null ? workInProgress2.child = reconcileChildFibers(
              workInProgress2,
              null,
              props,
              renderLanes2
            ) : reconcileChildren(current, workInProgress2, props, renderLanes2), workInProgress2.child;
          case 11:
            return updateForwardRef(
              current,
              workInProgress2,
              workInProgress2.type,
              workInProgress2.pendingProps,
              renderLanes2
            );
          case 7:
            return reconcileChildren(
              current,
              workInProgress2,
              workInProgress2.pendingProps,
              renderLanes2
            ), workInProgress2.child;
          case 8:
            return reconcileChildren(
              current,
              workInProgress2,
              workInProgress2.pendingProps.children,
              renderLanes2
            ), workInProgress2.child;
          case 12:
            return reconcileChildren(
              current,
              workInProgress2,
              workInProgress2.pendingProps.children,
              renderLanes2
            ), workInProgress2.child;
          case 10:
            return props = workInProgress2.pendingProps, pushProvider(workInProgress2, workInProgress2.type, props.value), reconcileChildren(current, workInProgress2, props.children, renderLanes2), workInProgress2.child;
          case 9:
            return $$typeof = workInProgress2.type._context, props = workInProgress2.pendingProps.children, prepareToReadContext(workInProgress2), $$typeof = readContext($$typeof), props = props($$typeof), workInProgress2.flags |= 1, reconcileChildren(current, workInProgress2, props, renderLanes2), workInProgress2.child;
          case 14:
            return updateMemoComponent(
              current,
              workInProgress2,
              workInProgress2.type,
              workInProgress2.pendingProps,
              renderLanes2
            );
          case 15:
            return updateSimpleMemoComponent(
              current,
              workInProgress2,
              workInProgress2.type,
              workInProgress2.pendingProps,
              renderLanes2
            );
          case 19:
            return updateSuspenseListComponent(current, workInProgress2, renderLanes2);
          case 31:
            return updateActivityComponent(current, workInProgress2, renderLanes2);
          case 22:
            return updateOffscreenComponent(
              current,
              workInProgress2,
              renderLanes2,
              workInProgress2.pendingProps
            );
          case 24:
            return prepareToReadContext(workInProgress2), props = readContext(CacheContext), current === null ? ($$typeof = peekCacheFromPool(), $$typeof === null && ($$typeof = workInProgressRoot, prevState = createCache(), $$typeof.pooledCache = prevState, prevState.refCount++, prevState !== null && ($$typeof.pooledCacheLanes |= renderLanes2), $$typeof = prevState), workInProgress2.memoizedState = { parent: props, cache: $$typeof }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, $$typeof)) : ((current.lanes & renderLanes2) !== 0 && (cloneUpdateQueue(current, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), $$typeof = current.memoizedState, prevState = workInProgress2.memoizedState, $$typeof.parent !== props ? ($$typeof = { parent: props, cache: props }, workInProgress2.memoizedState = $$typeof, workInProgress2.lanes === 0 && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = $$typeof), pushProvider(workInProgress2, CacheContext, props)) : (props = prevState.cache, pushProvider(workInProgress2, CacheContext, props), props !== $$typeof.cache && propagateContextChanges(
              workInProgress2,
              [CacheContext],
              renderLanes2,
              !0
            ))), reconcileChildren(
              current,
              workInProgress2,
              workInProgress2.pendingProps.children,
              renderLanes2
            ), workInProgress2.child;
          case 29:
            throw workInProgress2.pendingProps;
        }
        throw Error(formatProdErrorMessage(156, workInProgress2.tag));
      }
      function markUpdate(workInProgress2) {
        workInProgress2.flags |= 4;
      }
      function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, oldProps, newProps, renderLanes2) {
        if ((type = (workInProgress2.mode & 32) !== 0) && (type = !1), type) {
          if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2)
            if (workInProgress2.stateNode.complete) workInProgress2.flags |= 8192;
            else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
            else
              throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
        } else workInProgress2.flags &= -16777217;
      }
      function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
        if (resource.type !== "stylesheet" || (resource.state.loading & 4) !== 0)
          workInProgress2.flags &= -16777217;
        else if (workInProgress2.flags |= 16777216, !preloadResource(resource))
          if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
          else
            throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
      }
      function scheduleRetryEffect(workInProgress2, retryQueue) {
        retryQueue !== null && (workInProgress2.flags |= 4), workInProgress2.flags & 16384 && (retryQueue = workInProgress2.tag !== 22 ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
      }
      function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
        if (!isHydrating)
          switch (renderState.tailMode) {
            case "hidden":
              hasRenderedATailFallback = renderState.tail;
              for (var lastTailNode = null; hasRenderedATailFallback !== null; )
                hasRenderedATailFallback.alternate !== null && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
              lastTailNode === null ? renderState.tail = null : lastTailNode.sibling = null;
              break;
            case "collapsed":
              lastTailNode = renderState.tail;
              for (var lastTailNode$106 = null; lastTailNode !== null; )
                lastTailNode.alternate !== null && (lastTailNode$106 = lastTailNode), lastTailNode = lastTailNode.sibling;
              lastTailNode$106 === null ? hasRenderedATailFallback || renderState.tail === null ? renderState.tail = null : renderState.tail.sibling = null : lastTailNode$106.sibling = null;
          }
      }
      function bubbleProperties(completedWork) {
        var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
        if (didBailout)
          for (var child$107 = completedWork.child; child$107 !== null; )
            newChildLanes |= child$107.lanes | child$107.childLanes, subtreeFlags |= child$107.subtreeFlags & 65011712, subtreeFlags |= child$107.flags & 65011712, child$107.return = completedWork, child$107 = child$107.sibling;
        else
          for (child$107 = completedWork.child; child$107 !== null; )
            newChildLanes |= child$107.lanes | child$107.childLanes, subtreeFlags |= child$107.subtreeFlags, subtreeFlags |= child$107.flags, child$107.return = completedWork, child$107 = child$107.sibling;
        return completedWork.subtreeFlags |= subtreeFlags, completedWork.childLanes = newChildLanes, didBailout;
      }
      function completeWork(current, workInProgress2, renderLanes2) {
        var newProps = workInProgress2.pendingProps;
        switch (popTreeContext(workInProgress2), workInProgress2.tag) {
          case 16:
          case 15:
          case 0:
          case 11:
          case 7:
          case 8:
          case 12:
          case 9:
          case 14:
            return bubbleProperties(workInProgress2), null;
          case 1:
            return bubbleProperties(workInProgress2), null;
          case 3:
            return renderLanes2 = workInProgress2.stateNode, newProps = null, current !== null && (newProps = current.memoizedState.cache), workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048), popProvider(CacheContext), popHostContainer(), renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null), (current === null || current.child === null) && (popHydrationState(workInProgress2) ? markUpdate(workInProgress2) : current === null || current.memoizedState.isDehydrated && (workInProgress2.flags & 256) === 0 || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable())), bubbleProperties(workInProgress2), null;
          case 26:
            var type = workInProgress2.type, nextResource = workInProgress2.memoizedState;
            return current === null ? (markUpdate(workInProgress2), nextResource !== null ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, nextResource)) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
              workInProgress2,
              type,
              null,
              newProps,
              renderLanes2
            ))) : nextResource ? nextResource !== current.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, nextResource)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current = current.memoizedProps, current !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
              workInProgress2,
              type,
              current,
              newProps,
              renderLanes2
            )), null;
          case 27:
            if (popHostContext(workInProgress2), renderLanes2 = rootInstanceStackCursor.current, type = workInProgress2.type, current !== null && workInProgress2.stateNode != null)
              current.memoizedProps !== newProps && markUpdate(workInProgress2);
            else {
              if (!newProps) {
                if (workInProgress2.stateNode === null)
                  throw Error(formatProdErrorMessage(166));
                return bubbleProperties(workInProgress2), null;
              }
              current = contextStackCursor.current, popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current) : (current = resolveSingletonInstance(type, newProps, renderLanes2), workInProgress2.stateNode = current, markUpdate(workInProgress2));
            }
            return bubbleProperties(workInProgress2), null;
          case 5:
            if (popHostContext(workInProgress2), type = workInProgress2.type, current !== null && workInProgress2.stateNode != null)
              current.memoizedProps !== newProps && markUpdate(workInProgress2);
            else {
              if (!newProps) {
                if (workInProgress2.stateNode === null)
                  throw Error(formatProdErrorMessage(166));
                return bubbleProperties(workInProgress2), null;
              }
              if (nextResource = contextStackCursor.current, popHydrationState(workInProgress2))
                prepareToHydrateHostInstance(workInProgress2, nextResource);
              else {
                var ownerDocument = getOwnerDocumentFromRootContainer(
                  rootInstanceStackCursor.current
                );
                switch (nextResource) {
                  case 1:
                    nextResource = ownerDocument.createElementNS(
                      "http://www.w3.org/2000/svg",
                      type
                    );
                    break;
                  case 2:
                    nextResource = ownerDocument.createElementNS(
                      "http://www.w3.org/1998/Math/MathML",
                      type
                    );
                    break;
                  default:
                    switch (type) {
                      case "svg":
                        nextResource = ownerDocument.createElementNS(
                          "http://www.w3.org/2000/svg",
                          type
                        );
                        break;
                      case "math":
                        nextResource = ownerDocument.createElementNS(
                          "http://www.w3.org/1998/Math/MathML",
                          type
                        );
                        break;
                      case "script":
                        nextResource = ownerDocument.createElement("div"), nextResource.innerHTML = "<script><\/script>", nextResource = nextResource.removeChild(
                          nextResource.firstChild
                        );
                        break;
                      case "select":
                        nextResource = typeof newProps.is == "string" ? ownerDocument.createElement("select", {
                          is: newProps.is
                        }) : ownerDocument.createElement("select"), newProps.multiple ? nextResource.multiple = !0 : newProps.size && (nextResource.size = newProps.size);
                        break;
                      default:
                        nextResource = typeof newProps.is == "string" ? ownerDocument.createElement(type, { is: newProps.is }) : ownerDocument.createElement(type);
                    }
                }
                nextResource[internalInstanceKey] = workInProgress2, nextResource[internalPropsKey] = newProps;
                a: for (ownerDocument = workInProgress2.child; ownerDocument !== null; ) {
                  if (ownerDocument.tag === 5 || ownerDocument.tag === 6)
                    nextResource.appendChild(ownerDocument.stateNode);
                  else if (ownerDocument.tag !== 4 && ownerDocument.tag !== 27 && ownerDocument.child !== null) {
                    ownerDocument.child.return = ownerDocument, ownerDocument = ownerDocument.child;
                    continue;
                  }
                  if (ownerDocument === workInProgress2) break a;
                  for (; ownerDocument.sibling === null; ) {
                    if (ownerDocument.return === null || ownerDocument.return === workInProgress2)
                      break a;
                    ownerDocument = ownerDocument.return;
                  }
                  ownerDocument.sibling.return = ownerDocument.return, ownerDocument = ownerDocument.sibling;
                }
                workInProgress2.stateNode = nextResource;
                a: switch (setInitialProperties(nextResource, type, newProps), type) {
                  case "button":
                  case "input":
                  case "select":
                  case "textarea":
                    newProps = !!newProps.autoFocus;
                    break a;
                  case "img":
                    newProps = !0;
                    break a;
                  default:
                    newProps = !1;
                }
                newProps && markUpdate(workInProgress2);
              }
            }
            return bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
              workInProgress2,
              workInProgress2.type,
              current === null ? null : current.memoizedProps,
              workInProgress2.pendingProps,
              renderLanes2
            ), null;
          case 6:
            if (current && workInProgress2.stateNode != null)
              current.memoizedProps !== newProps && markUpdate(workInProgress2);
            else {
              if (typeof newProps != "string" && workInProgress2.stateNode === null)
                throw Error(formatProdErrorMessage(166));
              if (current = rootInstanceStackCursor.current, popHydrationState(workInProgress2)) {
                if (current = workInProgress2.stateNode, renderLanes2 = workInProgress2.memoizedProps, newProps = null, type = hydrationParentFiber, type !== null)
                  switch (type.tag) {
                    case 27:
                    case 5:
                      newProps = type.memoizedProps;
                  }
                current[internalInstanceKey] = workInProgress2, current = !!(current.nodeValue === renderLanes2 || newProps !== null && newProps.suppressHydrationWarning === !0 || checkForUnmatchedText(current.nodeValue, renderLanes2)), current || throwOnHydrationMismatch(workInProgress2, !0);
              } else
                current = getOwnerDocumentFromRootContainer(current).createTextNode(
                  newProps
                ), current[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current;
            }
            return bubbleProperties(workInProgress2), null;
          case 31:
            if (renderLanes2 = workInProgress2.memoizedState, current === null || current.memoizedState !== null) {
              if (newProps = popHydrationState(workInProgress2), renderLanes2 !== null) {
                if (current === null) {
                  if (!newProps) throw Error(formatProdErrorMessage(318));
                  if (current = workInProgress2.memoizedState, current = current !== null ? current.dehydrated : null, !current) throw Error(formatProdErrorMessage(557));
                  current[internalInstanceKey] = workInProgress2;
                } else
                  resetHydrationState(), (workInProgress2.flags & 128) === 0 && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4;
                bubbleProperties(workInProgress2), current = !1;
              } else
                renderLanes2 = upgradeHydrationErrorsToRecoverable(), current !== null && current.memoizedState !== null && (current.memoizedState.hydrationErrors = renderLanes2), current = !0;
              if (!current)
                return workInProgress2.flags & 256 ? (popSuspenseHandler(workInProgress2), workInProgress2) : (popSuspenseHandler(workInProgress2), null);
              if ((workInProgress2.flags & 128) !== 0)
                throw Error(formatProdErrorMessage(558));
            }
            return bubbleProperties(workInProgress2), null;
          case 13:
            if (newProps = workInProgress2.memoizedState, current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {
              if (type = popHydrationState(workInProgress2), newProps !== null && newProps.dehydrated !== null) {
                if (current === null) {
                  if (!type) throw Error(formatProdErrorMessage(318));
                  if (type = workInProgress2.memoizedState, type = type !== null ? type.dehydrated : null, !type) throw Error(formatProdErrorMessage(317));
                  type[internalInstanceKey] = workInProgress2;
                } else
                  resetHydrationState(), (workInProgress2.flags & 128) === 0 && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4;
                bubbleProperties(workInProgress2), type = !1;
              } else
                type = upgradeHydrationErrorsToRecoverable(), current !== null && current.memoizedState !== null && (current.memoizedState.hydrationErrors = type), type = !0;
              if (!type)
                return workInProgress2.flags & 256 ? (popSuspenseHandler(workInProgress2), workInProgress2) : (popSuspenseHandler(workInProgress2), null);
            }
            return popSuspenseHandler(workInProgress2), (workInProgress2.flags & 128) !== 0 ? (workInProgress2.lanes = renderLanes2, workInProgress2) : (renderLanes2 = newProps !== null, current = current !== null && current.memoizedState !== null, renderLanes2 && (newProps = workInProgress2.child, type = null, newProps.alternate !== null && newProps.alternate.memoizedState !== null && newProps.alternate.memoizedState.cachePool !== null && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, newProps.memoizedState !== null && newProps.memoizedState.cachePool !== null && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048)), renderLanes2 !== current && renderLanes2 && (workInProgress2.child.flags |= 8192), scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue), bubbleProperties(workInProgress2), null);
          case 4:
            return popHostContainer(), current === null && listenToAllSupportedEvents(workInProgress2.stateNode.containerInfo), bubbleProperties(workInProgress2), null;
          case 10:
            return popProvider(workInProgress2.type), bubbleProperties(workInProgress2), null;
          case 19:
            if (pop(suspenseStackCursor), newProps = workInProgress2.memoizedState, newProps === null) return bubbleProperties(workInProgress2), null;
            if (type = (workInProgress2.flags & 128) !== 0, nextResource = newProps.rendering, nextResource === null)
              if (type) cutOffTailIfNeeded(newProps, !1);
              else {
                if (workInProgressRootExitStatus !== 0 || current !== null && (current.flags & 128) !== 0)
                  for (current = workInProgress2.child; current !== null; ) {
                    if (nextResource = findFirstSuspended(current), nextResource !== null) {
                      for (workInProgress2.flags |= 128, cutOffTailIfNeeded(newProps, !1), current = nextResource.updateQueue, workInProgress2.updateQueue = current, scheduleRetryEffect(workInProgress2, current), workInProgress2.subtreeFlags = 0, current = renderLanes2, renderLanes2 = workInProgress2.child; renderLanes2 !== null; )
                        resetWorkInProgress(renderLanes2, current), renderLanes2 = renderLanes2.sibling;
                      return push(
                        suspenseStackCursor,
                        suspenseStackCursor.current & 1 | 2
                      ), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), workInProgress2.child;
                    }
                    current = current.sibling;
                  }
                newProps.tail !== null && now() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type = !0, cutOffTailIfNeeded(newProps, !1), workInProgress2.lanes = 4194304);
              }
            else {
              if (!type)
                if (current = findFirstSuspended(nextResource), current !== null) {
                  if (workInProgress2.flags |= 128, type = !0, current = current.updateQueue, workInProgress2.updateQueue = current, scheduleRetryEffect(workInProgress2, current), cutOffTailIfNeeded(newProps, !0), newProps.tail === null && newProps.tailMode === "hidden" && !nextResource.alternate && !isHydrating)
                    return bubbleProperties(workInProgress2), null;
                } else
                  2 * now() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && renderLanes2 !== 536870912 && (workInProgress2.flags |= 128, type = !0, cutOffTailIfNeeded(newProps, !1), workInProgress2.lanes = 4194304);
              newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current = newProps.last, current !== null ? current.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
            }
            return newProps.tail !== null ? (current = newProps.tail, newProps.rendering = current, newProps.tail = current.sibling, newProps.renderingStartTime = now(), current.sibling = null, renderLanes2 = suspenseStackCursor.current, push(
              suspenseStackCursor,
              type ? renderLanes2 & 1 | 2 : renderLanes2 & 1
            ), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current) : (bubbleProperties(workInProgress2), null);
          case 22:
          case 23:
            return popSuspenseHandler(workInProgress2), popHiddenContext(), newProps = workInProgress2.memoizedState !== null, current !== null ? current.memoizedState !== null !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? (renderLanes2 & 536870912) !== 0 && (workInProgress2.flags & 128) === 0 && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, renderLanes2 !== null && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null && (renderLanes2 = current.memoizedState.cachePool.pool), newProps = null, workInProgress2.memoizedState !== null && workInProgress2.memoizedState.cachePool !== null && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), current !== null && pop(resumedCache), null;
          case 24:
            return renderLanes2 = null, current !== null && (renderLanes2 = current.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext), bubbleProperties(workInProgress2), null;
          case 25:
            return null;
          case 30:
            return null;
        }
        throw Error(formatProdErrorMessage(156, workInProgress2.tag));
      }
      function unwindWork(current, workInProgress2) {
        switch (popTreeContext(workInProgress2), workInProgress2.tag) {
          case 1:
            return current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
          case 3:
            return popProvider(CacheContext), popHostContainer(), current = workInProgress2.flags, (current & 65536) !== 0 && (current & 128) === 0 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
          case 26:
          case 27:
          case 5:
            return popHostContext(workInProgress2), null;
          case 31:
            if (workInProgress2.memoizedState !== null) {
              if (popSuspenseHandler(workInProgress2), workInProgress2.alternate === null)
                throw Error(formatProdErrorMessage(340));
              resetHydrationState();
            }
            return current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
          case 13:
            if (popSuspenseHandler(workInProgress2), current = workInProgress2.memoizedState, current !== null && current.dehydrated !== null) {
              if (workInProgress2.alternate === null)
                throw Error(formatProdErrorMessage(340));
              resetHydrationState();
            }
            return current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
          case 19:
            return pop(suspenseStackCursor), null;
          case 4:
            return popHostContainer(), null;
          case 10:
            return popProvider(workInProgress2.type), null;
          case 22:
          case 23:
            return popSuspenseHandler(workInProgress2), popHiddenContext(), current !== null && pop(resumedCache), current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
          case 24:
            return popProvider(CacheContext), null;
          case 25:
            return null;
          default:
            return null;
        }
      }
      function unwindInterruptedWork(current, interruptedWork) {
        switch (popTreeContext(interruptedWork), interruptedWork.tag) {
          case 3:
            popProvider(CacheContext), popHostContainer();
            break;
          case 26:
          case 27:
          case 5:
            popHostContext(interruptedWork);
            break;
          case 4:
            popHostContainer();
            break;
          case 31:
            interruptedWork.memoizedState !== null && popSuspenseHandler(interruptedWork);
            break;
          case 13:
            popSuspenseHandler(interruptedWork);
            break;
          case 19:
            pop(suspenseStackCursor);
            break;
          case 10:
            popProvider(interruptedWork.type);
            break;
          case 22:
          case 23:
            popSuspenseHandler(interruptedWork), popHiddenContext(), current !== null && pop(resumedCache);
            break;
          case 24:
            popProvider(CacheContext);
        }
      }
      function commitHookEffectListMount(flags, finishedWork) {
        try {
          var updateQueue = finishedWork.updateQueue, lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
          if (lastEffect !== null) {
            var firstEffect = lastEffect.next;
            updateQueue = firstEffect;
            do {
              if ((updateQueue.tag & flags) === flags) {
                lastEffect = void 0;
                var create = updateQueue.create, inst = updateQueue.inst;
                lastEffect = create(), inst.destroy = lastEffect;
              }
              updateQueue = updateQueue.next;
            } while (updateQueue !== firstEffect);
          }
        } catch (error) {
          captureCommitPhaseError(finishedWork, finishedWork.return, error);
        }
      }
      function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor$jscomp$0) {
        try {
          var updateQueue = finishedWork.updateQueue, lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
          if (lastEffect !== null) {
            var firstEffect = lastEffect.next;
            updateQueue = firstEffect;
            do {
              if ((updateQueue.tag & flags) === flags) {
                var inst = updateQueue.inst, destroy = inst.destroy;
                if (destroy !== void 0) {
                  inst.destroy = void 0, lastEffect = finishedWork;
                  var nearestMountedAncestor = nearestMountedAncestor$jscomp$0, destroy_ = destroy;
                  try {
                    destroy_();
                  } catch (error) {
                    captureCommitPhaseError(
                      lastEffect,
                      nearestMountedAncestor,
                      error
                    );
                  }
                }
              }
              updateQueue = updateQueue.next;
            } while (updateQueue !== firstEffect);
          }
        } catch (error) {
          captureCommitPhaseError(finishedWork, finishedWork.return, error);
        }
      }
      function commitClassCallbacks(finishedWork) {
        var updateQueue = finishedWork.updateQueue;
        if (updateQueue !== null) {
          var instance = finishedWork.stateNode;
          try {
            commitCallbacks(updateQueue, instance);
          } catch (error) {
            captureCommitPhaseError(finishedWork, finishedWork.return, error);
          }
        }
      }
      function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {
        instance.props = resolveClassComponentProps(
          current.type,
          current.memoizedProps
        ), instance.state = current.memoizedState;
        try {
          instance.componentWillUnmount();
        } catch (error) {
          captureCommitPhaseError(current, nearestMountedAncestor, error);
        }
      }
      function safelyAttachRef(current, nearestMountedAncestor) {
        try {
          var ref = current.ref;
          if (ref !== null) {
            switch (current.tag) {
              case 26:
              case 27:
              case 5:
                var instanceToUse = current.stateNode;
                break;
              case 30:
                instanceToUse = current.stateNode;
                break;
              default:
                instanceToUse = current.stateNode;
            }
            typeof ref == "function" ? current.refCleanup = ref(instanceToUse) : ref.current = instanceToUse;
          }
        } catch (error) {
          captureCommitPhaseError(current, nearestMountedAncestor, error);
        }
      }
      function safelyDetachRef(current, nearestMountedAncestor) {
        var ref = current.ref, refCleanup = current.refCleanup;
        if (ref !== null)
          if (typeof refCleanup == "function")
            try {
              refCleanup();
            } catch (error) {
              captureCommitPhaseError(current, nearestMountedAncestor, error);
            } finally {
              current.refCleanup = null, current = current.alternate, current != null && (current.refCleanup = null);
            }
          else if (typeof ref == "function")
            try {
              ref(null);
            } catch (error$140) {
              captureCommitPhaseError(current, nearestMountedAncestor, error$140);
            }
          else ref.current = null;
      }
      function commitHostMount(finishedWork) {
        var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
        try {
          a: switch (type) {
            case "button":
            case "input":
            case "select":
            case "textarea":
              props.autoFocus && instance.focus();
              break a;
            case "img":
              props.src ? instance.src = props.src : props.srcSet && (instance.srcset = props.srcSet);
          }
        } catch (error) {
          captureCommitPhaseError(finishedWork, finishedWork.return, error);
        }
      }
      function commitHostUpdate(finishedWork, newProps, oldProps) {
        try {
          var domElement = finishedWork.stateNode;
          updateProperties(domElement, finishedWork.type, oldProps, newProps), domElement[internalPropsKey] = newProps;
        } catch (error) {
          captureCommitPhaseError(finishedWork, finishedWork.return, error);
        }
      }
      function isHostParent(fiber) {
        return fiber.tag === 5 || fiber.tag === 3 || fiber.tag === 26 || fiber.tag === 27 && isSingletonScope(fiber.type) || fiber.tag === 4;
      }
      function getHostSibling(fiber) {
        a: for (; ; ) {
          for (; fiber.sibling === null; ) {
            if (fiber.return === null || isHostParent(fiber.return)) return null;
            fiber = fiber.return;
          }
          for (fiber.sibling.return = fiber.return, fiber = fiber.sibling; fiber.tag !== 5 && fiber.tag !== 6 && fiber.tag !== 18; ) {
            if (fiber.tag === 27 && isSingletonScope(fiber.type) || fiber.flags & 2 || fiber.child === null || fiber.tag === 4) continue a;
            fiber.child.return = fiber, fiber = fiber.child;
          }
          if (!(fiber.flags & 2)) return fiber.stateNode;
        }
      }
      function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
        var tag = node.tag;
        if (tag === 5 || tag === 6)
          node = node.stateNode, before ? (parent.nodeType === 9 ? parent.body : parent.nodeName === "HTML" ? parent.ownerDocument.body : parent).insertBefore(node, before) : (before = parent.nodeType === 9 ? parent.body : parent.nodeName === "HTML" ? parent.ownerDocument.body : parent, before.appendChild(node), parent = parent._reactRootContainer, parent != null || before.onclick !== null || (before.onclick = noop$1));
        else if (tag !== 4 && (tag === 27 && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, node !== null))
          for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; node !== null; )
            insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
      }
      function insertOrAppendPlacementNode(node, before, parent) {
        var tag = node.tag;
        if (tag === 5 || tag === 6)
          node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
        else if (tag !== 4 && (tag === 27 && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, node !== null))
          for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; node !== null; )
            insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
      }
      function commitHostSingletonAcquisition(finishedWork) {
        var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
        try {
          for (var type = finishedWork.type, attributes = singleton.attributes; attributes.length; )
            singleton.removeAttributeNode(attributes[0]);
          setInitialProperties(singleton, type, props), singleton[internalInstanceKey] = finishedWork, singleton[internalPropsKey] = props;
        } catch (error) {
          captureCommitPhaseError(finishedWork, finishedWork.return, error);
        }
      }
      var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, needsFormReset = !1, PossiblyWeakSet = typeof WeakSet == "function" ? WeakSet : Set, nextEffect = null;
      function commitBeforeMutationEffects(root2, firstChild) {
        if (root2 = root2.containerInfo, eventsEnabled = _enabled, root2 = getActiveElementDeep(root2), hasSelectionCapabilities(root2)) {
          if ("selectionStart" in root2)
            var JSCompiler_temp = {
              start: root2.selectionStart,
              end: root2.selectionEnd
            };
          else
            a: {
              JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
              var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
              if (selection && selection.rangeCount !== 0) {
                JSCompiler_temp = selection.anchorNode;
                var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
                selection = selection.focusOffset;
                try {
                  JSCompiler_temp.nodeType, focusNode.nodeType;
                } catch (e$20) {
                  JSCompiler_temp = null;
                  break a;
                }
                var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
                b: for (; ; ) {
                  for (var next; node !== JSCompiler_temp || anchorOffset !== 0 && node.nodeType !== 3 || (start = length + anchorOffset), node !== focusNode || selection !== 0 && node.nodeType !== 3 || (end = length + selection), node.nodeType === 3 && (length += node.nodeValue.length), (next = node.firstChild) !== null; )
                    parentNode = node, node = next;
                  for (; ; ) {
                    if (node === root2) break b;
                    if (parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length), parentNode === focusNode && ++indexWithinFocus === selection && (end = length), (next = node.nextSibling) !== null) break;
                    node = parentNode, parentNode = node.parentNode;
                  }
                  node = next;
                }
                JSCompiler_temp = start === -1 || end === -1 ? null : { start, end };
              } else JSCompiler_temp = null;
            }
          JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
        } else JSCompiler_temp = null;
        for (selectionInformation = { focusedElem: root2, selectionRange: JSCompiler_temp }, _enabled = !1, nextEffect = firstChild; nextEffect !== null; )
          if (firstChild = nextEffect, root2 = firstChild.child, (firstChild.subtreeFlags & 1028) !== 0 && root2 !== null)
            root2.return = firstChild, nextEffect = root2;
          else
            for (; nextEffect !== null; ) {
              switch (firstChild = nextEffect, focusNode = firstChild.alternate, root2 = firstChild.flags, firstChild.tag) {
                case 0:
                  if ((root2 & 4) !== 0 && (root2 = firstChild.updateQueue, root2 = root2 !== null ? root2.events : null, root2 !== null))
                    for (JSCompiler_temp = 0; JSCompiler_temp < root2.length; JSCompiler_temp++)
                      anchorOffset = root2[JSCompiler_temp], anchorOffset.ref.impl = anchorOffset.nextImpl;
                  break;
                case 11:
                case 15:
                  break;
                case 1:
                  if ((root2 & 1024) !== 0 && focusNode !== null) {
                    root2 = void 0, JSCompiler_temp = firstChild, anchorOffset = focusNode.memoizedProps, focusNode = focusNode.memoizedState, selection = JSCompiler_temp.stateNode;
                    try {
                      var resolvedPrevProps = resolveClassComponentProps(
                        JSCompiler_temp.type,
                        anchorOffset
                      );
                      root2 = selection.getSnapshotBeforeUpdate(
                        resolvedPrevProps,
                        focusNode
                      ), selection.__reactInternalSnapshotBeforeUpdate = root2;
                    } catch (error) {
                      captureCommitPhaseError(
                        JSCompiler_temp,
                        JSCompiler_temp.return,
                        error
                      );
                    }
                  }
                  break;
                case 3:
                  if ((root2 & 1024) !== 0) {
                    if (root2 = firstChild.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, JSCompiler_temp === 9)
                      clearContainerSparingly(root2);
                    else if (JSCompiler_temp === 1)
                      switch (root2.nodeName) {
                        case "HEAD":
                        case "HTML":
                        case "BODY":
                          clearContainerSparingly(root2);
                          break;
                        default:
                          root2.textContent = "";
                      }
                  }
                  break;
                case 5:
                case 26:
                case 27:
                case 6:
                case 4:
                case 17:
                  break;
                default:
                  if ((root2 & 1024) !== 0) throw Error(formatProdErrorMessage(163));
              }
              if (root2 = firstChild.sibling, root2 !== null) {
                root2.return = firstChild.return, nextEffect = root2;
                break;
              }
              nextEffect = firstChild.return;
            }
      }
      function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
        var flags = finishedWork.flags;
        switch (finishedWork.tag) {
          case 0:
          case 11:
          case 15:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), flags & 4 && commitHookEffectListMount(5, finishedWork);
            break;
          case 1:
            if (recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), flags & 4)
              if (finishedRoot = finishedWork.stateNode, current === null)
                try {
                  finishedRoot.componentDidMount();
                } catch (error) {
                  captureCommitPhaseError(finishedWork, finishedWork.return, error);
                }
              else {
                var prevProps = resolveClassComponentProps(
                  finishedWork.type,
                  current.memoizedProps
                );
                current = current.memoizedState;
                try {
                  finishedRoot.componentDidUpdate(
                    prevProps,
                    current,
                    finishedRoot.__reactInternalSnapshotBeforeUpdate
                  );
                } catch (error$139) {
                  captureCommitPhaseError(
                    finishedWork,
                    finishedWork.return,
                    error$139
                  );
                }
              }
            flags & 64 && commitClassCallbacks(finishedWork), flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
            break;
          case 3:
            if (recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), flags & 64 && (finishedRoot = finishedWork.updateQueue, finishedRoot !== null)) {
              if (current = null, finishedWork.child !== null)
                switch (finishedWork.child.tag) {
                  case 27:
                  case 5:
                    current = finishedWork.child.stateNode;
                    break;
                  case 1:
                    current = finishedWork.child.stateNode;
                }
              try {
                commitCallbacks(finishedRoot, current);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }
            break;
          case 27:
            current === null && flags & 4 && commitHostSingletonAcquisition(finishedWork);
          case 26:
          case 5:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), current === null && flags & 4 && commitHostMount(finishedWork), flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
            break;
          case 12:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
            break;
          case 31:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
            break;
          case 13:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork), flags & 64 && (finishedRoot = finishedWork.memoizedState, finishedRoot !== null && (finishedRoot = finishedRoot.dehydrated, finishedRoot !== null && (finishedWork = retryDehydratedSuspenseBoundary.bind(
              null,
              finishedWork
            ), registerSuspenseInstanceRetry(finishedRoot, finishedWork))));
            break;
          case 22:
            if (flags = finishedWork.memoizedState !== null || offscreenSubtreeIsHidden, !flags) {
              current = current !== null && current.memoizedState !== null || offscreenSubtreeWasHidden, prevProps = offscreenSubtreeIsHidden;
              var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
              offscreenSubtreeIsHidden = flags, (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                (finishedWork.subtreeFlags & 8772) !== 0
              ) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), offscreenSubtreeIsHidden = prevProps, offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
            }
            break;
          case 30:
            break;
          default:
            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
        }
      }
      function detachFiberAfterEffects(fiber) {
        var alternate = fiber.alternate;
        alternate !== null && (fiber.alternate = null, detachFiberAfterEffects(alternate)), fiber.child = null, fiber.deletions = null, fiber.sibling = null, fiber.tag === 5 && (alternate = fiber.stateNode, alternate !== null && detachDeletedInstance(alternate)), fiber.stateNode = null, fiber.return = null, fiber.dependencies = null, fiber.memoizedProps = null, fiber.memoizedState = null, fiber.pendingProps = null, fiber.stateNode = null, fiber.updateQueue = null;
      }
      var hostParent = null, hostParentIsContainer = !1;
      function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
        for (parent = parent.child; parent !== null; )
          commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent), parent = parent.sibling;
      }
      function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
        if (injectedHook && typeof injectedHook.onCommitFiberUnmount == "function")
          try {
            injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
          } catch (err) {
          }
        switch (deletedFiber.tag) {
          case 26:
            offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor), recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            ), deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (deletedFiber = deletedFiber.stateNode, deletedFiber.parentNode.removeChild(deletedFiber));
            break;
          case 27:
            offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
            var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
            isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = !1), recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            ), releaseSingletonInstance(deletedFiber.stateNode), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer;
            break;
          case 5:
            offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
          case 6:
            if (prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = null, recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            ), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer, hostParent !== null)
              if (hostParentIsContainer)
                try {
                  (hostParent.nodeType === 9 ? hostParent.body : hostParent.nodeName === "HTML" ? hostParent.ownerDocument.body : hostParent).removeChild(deletedFiber.stateNode);
                } catch (error) {
                  captureCommitPhaseError(
                    deletedFiber,
                    nearestMountedAncestor,
                    error
                  );
                }
              else
                try {
                  hostParent.removeChild(deletedFiber.stateNode);
                } catch (error) {
                  captureCommitPhaseError(
                    deletedFiber,
                    nearestMountedAncestor,
                    error
                  );
                }
            break;
          case 18:
            hostParent !== null && (hostParentIsContainer ? (finishedRoot = hostParent, clearHydrationBoundary(
              finishedRoot.nodeType === 9 ? finishedRoot.body : finishedRoot.nodeName === "HTML" ? finishedRoot.ownerDocument.body : finishedRoot,
              deletedFiber.stateNode
            ), retryIfBlockedOn(finishedRoot)) : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
            break;
          case 4:
            prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = deletedFiber.stateNode.containerInfo, hostParentIsContainer = !0, recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            ), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer;
            break;
          case 0:
          case 11:
          case 14:
          case 15:
            commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor), offscreenSubtreeWasHidden || commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor), recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            );
            break;
          case 1:
            offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, typeof prevHostParent.componentWillUnmount == "function" && safelyCallComponentWillUnmount(
              deletedFiber,
              nearestMountedAncestor,
              prevHostParent
            )), recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            );
            break;
          case 21:
            recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            );
            break;
          case 22:
            offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || deletedFiber.memoizedState !== null, recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            ), offscreenSubtreeWasHidden = prevHostParent;
            break;
          default:
            recursivelyTraverseDeletionEffects(
              finishedRoot,
              nearestMountedAncestor,
              deletedFiber
            );
        }
      }
      function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
        if (finishedWork.memoizedState === null && (finishedRoot = finishedWork.alternate, finishedRoot !== null && (finishedRoot = finishedRoot.memoizedState, finishedRoot !== null))) {
          finishedRoot = finishedRoot.dehydrated;
          try {
            retryIfBlockedOn(finishedRoot);
          } catch (error) {
            captureCommitPhaseError(finishedWork, finishedWork.return, error);
          }
        }
      }
      function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
        if (finishedWork.memoizedState === null && (finishedRoot = finishedWork.alternate, finishedRoot !== null && (finishedRoot = finishedRoot.memoizedState, finishedRoot !== null && (finishedRoot = finishedRoot.dehydrated, finishedRoot !== null))))
          try {
            retryIfBlockedOn(finishedRoot);
          } catch (error) {
            captureCommitPhaseError(finishedWork, finishedWork.return, error);
          }
      }
      function getRetryCache(finishedWork) {
        switch (finishedWork.tag) {
          case 31:
          case 13:
          case 19:
            var retryCache = finishedWork.stateNode;
            return retryCache === null && (retryCache = finishedWork.stateNode = new PossiblyWeakSet()), retryCache;
          case 22:
            return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, retryCache === null && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
          default:
            throw Error(formatProdErrorMessage(435, finishedWork.tag));
        }
      }
      function attachSuspenseRetryListeners(finishedWork, wakeables) {
        var retryCache = getRetryCache(finishedWork);
        wakeables.forEach(function(wakeable) {
          if (!retryCache.has(wakeable)) {
            retryCache.add(wakeable);
            var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
            wakeable.then(retry, retry);
          }
        });
      }
      function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
        var deletions = parentFiber.deletions;
        if (deletions !== null)
          for (var i = 0; i < deletions.length; i++) {
            var childToDelete = deletions[i], root2 = root$jscomp$0, returnFiber = parentFiber, parent = returnFiber;
            a: for (; parent !== null; ) {
              switch (parent.tag) {
                case 27:
                  if (isSingletonScope(parent.type)) {
                    hostParent = parent.stateNode, hostParentIsContainer = !1;
                    break a;
                  }
                  break;
                case 5:
                  hostParent = parent.stateNode, hostParentIsContainer = !1;
                  break a;
                case 3:
                case 4:
                  hostParent = parent.stateNode.containerInfo, hostParentIsContainer = !0;
                  break a;
              }
              parent = parent.return;
            }
            if (hostParent === null) throw Error(formatProdErrorMessage(160));
            commitDeletionEffectsOnFiber(root2, returnFiber, childToDelete), hostParent = null, hostParentIsContainer = !1, root2 = childToDelete.alternate, root2 !== null && (root2.return = null), childToDelete.return = null;
          }
        if (parentFiber.subtreeFlags & 13886)
          for (parentFiber = parentFiber.child; parentFiber !== null; )
            commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
      }
      var currentHoistableRoot = null;
      function commitMutationEffectsOnFiber(finishedWork, root2) {
        var current = finishedWork.alternate, flags = finishedWork.flags;
        switch (finishedWork.tag) {
          case 0:
          case 11:
          case 14:
          case 15:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 4 && (commitHookEffectListUnmount(3, finishedWork, finishedWork.return), commitHookEffectListMount(3, finishedWork), commitHookEffectListUnmount(5, finishedWork, finishedWork.return));
            break;
          case 1:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 512 && (offscreenSubtreeWasHidden || current === null || safelyDetachRef(current, current.return)), flags & 64 && offscreenSubtreeIsHidden && (finishedWork = finishedWork.updateQueue, finishedWork !== null && (flags = finishedWork.callbacks, flags !== null && (current = finishedWork.shared.hiddenCallbacks, finishedWork.shared.hiddenCallbacks = current === null ? flags : current.concat(flags))));
            break;
          case 26:
            var hoistableRoot = currentHoistableRoot;
            if (recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 512 && (offscreenSubtreeWasHidden || current === null || safelyDetachRef(current, current.return)), flags & 4) {
              var currentResource = current !== null ? current.memoizedState : null;
              if (flags = finishedWork.memoizedState, current === null)
                if (flags === null)
                  if (finishedWork.stateNode === null) {
                    a: {
                      flags = finishedWork.type, current = finishedWork.memoizedProps, hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
                      b: switch (flags) {
                        case "title":
                          currentResource = hoistableRoot.getElementsByTagName("title")[0], (!currentResource || currentResource[internalHoistableMarker] || currentResource[internalInstanceKey] || currentResource.namespaceURI === "http://www.w3.org/2000/svg" || currentResource.hasAttribute("itemprop")) && (currentResource = hoistableRoot.createElement(flags), hoistableRoot.head.insertBefore(
                            currentResource,
                            hoistableRoot.querySelector("head > title")
                          )), setInitialProperties(currentResource, flags, current), currentResource[internalInstanceKey] = finishedWork, markNodeAsHoistable(currentResource), flags = currentResource;
                          break a;
                        case "link":
                          var maybeNodes = getHydratableHoistableCache(
                            "link",
                            "href",
                            hoistableRoot
                          ).get(flags + (current.href || ""));
                          if (maybeNodes) {
                            for (var i = 0; i < maybeNodes.length; i++)
                              if (currentResource = maybeNodes[i], currentResource.getAttribute("href") === (current.href == null || current.href === "" ? null : current.href) && currentResource.getAttribute("rel") === (current.rel == null ? null : current.rel) && currentResource.getAttribute("title") === (current.title == null ? null : current.title) && currentResource.getAttribute("crossorigin") === (current.crossOrigin == null ? null : current.crossOrigin)) {
                                maybeNodes.splice(i, 1);
                                break b;
                              }
                          }
                          currentResource = hoistableRoot.createElement(flags), setInitialProperties(currentResource, flags, current), hoistableRoot.head.appendChild(currentResource);
                          break;
                        case "meta":
                          if (maybeNodes = getHydratableHoistableCache(
                            "meta",
                            "content",
                            hoistableRoot
                          ).get(flags + (current.content || ""))) {
                            for (i = 0; i < maybeNodes.length; i++)
                              if (currentResource = maybeNodes[i], currentResource.getAttribute("content") === (current.content == null ? null : "" + current.content) && currentResource.getAttribute("name") === (current.name == null ? null : current.name) && currentResource.getAttribute("property") === (current.property == null ? null : current.property) && currentResource.getAttribute("http-equiv") === (current.httpEquiv == null ? null : current.httpEquiv) && currentResource.getAttribute("charset") === (current.charSet == null ? null : current.charSet)) {
                                maybeNodes.splice(i, 1);
                                break b;
                              }
                          }
                          currentResource = hoistableRoot.createElement(flags), setInitialProperties(currentResource, flags, current), hoistableRoot.head.appendChild(currentResource);
                          break;
                        default:
                          throw Error(formatProdErrorMessage(468, flags));
                      }
                      currentResource[internalInstanceKey] = finishedWork, markNodeAsHoistable(currentResource), flags = currentResource;
                    }
                    finishedWork.stateNode = flags;
                  } else
                    mountHoistable(
                      hoistableRoot,
                      finishedWork.type,
                      finishedWork.stateNode
                    );
                else
                  finishedWork.stateNode = acquireResource(
                    hoistableRoot,
                    flags,
                    finishedWork.memoizedProps
                  );
              else
                currentResource !== flags ? (currentResource === null ? current.stateNode !== null && (current = current.stateNode, current.parentNode.removeChild(current)) : currentResource.count--, flags === null ? mountHoistable(
                  hoistableRoot,
                  finishedWork.type,
                  finishedWork.stateNode
                ) : acquireResource(
                  hoistableRoot,
                  flags,
                  finishedWork.memoizedProps
                )) : flags === null && finishedWork.stateNode !== null && commitHostUpdate(
                  finishedWork,
                  finishedWork.memoizedProps,
                  current.memoizedProps
                );
            }
            break;
          case 27:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 512 && (offscreenSubtreeWasHidden || current === null || safelyDetachRef(current, current.return)), current !== null && flags & 4 && commitHostUpdate(
              finishedWork,
              finishedWork.memoizedProps,
              current.memoizedProps
            );
            break;
          case 5:
            if (recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 512 && (offscreenSubtreeWasHidden || current === null || safelyDetachRef(current, current.return)), finishedWork.flags & 32) {
              hoistableRoot = finishedWork.stateNode;
              try {
                setTextContent(hoistableRoot, "");
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }
            flags & 4 && finishedWork.stateNode != null && (hoistableRoot = finishedWork.memoizedProps, commitHostUpdate(
              finishedWork,
              hoistableRoot,
              current !== null ? current.memoizedProps : hoistableRoot
            )), flags & 1024 && (needsFormReset = !0);
            break;
          case 6:
            if (recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 4) {
              if (finishedWork.stateNode === null)
                throw Error(formatProdErrorMessage(162));
              flags = finishedWork.memoizedProps, current = finishedWork.stateNode;
              try {
                current.nodeValue = flags;
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }
            break;
          case 3:
            if (tagCaches = null, hoistableRoot = currentHoistableRoot, currentHoistableRoot = getHoistableRoot(root2.containerInfo), recursivelyTraverseMutationEffects(root2, finishedWork), currentHoistableRoot = hoistableRoot, commitReconciliationEffects(finishedWork), flags & 4 && current !== null && current.memoizedState.isDehydrated)
              try {
                retryIfBlockedOn(root2.containerInfo);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            needsFormReset && (needsFormReset = !1, recursivelyResetForms(finishedWork));
            break;
          case 4:
            flags = currentHoistableRoot, currentHoistableRoot = getHoistableRoot(
              finishedWork.stateNode.containerInfo
            ), recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), currentHoistableRoot = flags;
            break;
          case 12:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
            break;
          case 31:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
            break;
          case 13:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), finishedWork.child.flags & 8192 && finishedWork.memoizedState !== null != (current !== null && current.memoizedState !== null) && (globalMostRecentFallbackTime = now()), flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
            break;
          case 22:
            hoistableRoot = finishedWork.memoizedState !== null;
            var wasHidden = current !== null && current.memoizedState !== null, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
            if (offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot, offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden, recursivelyTraverseMutationEffects(root2, finishedWork), offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden, offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden, commitReconciliationEffects(finishedWork), flags & 8192)
              a: for (root2 = finishedWork.stateNode, root2._visibility = hoistableRoot ? root2._visibility & -2 : root2._visibility | 1, hoistableRoot && (current === null || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), current = null, root2 = finishedWork; ; ) {
                if (root2.tag === 5 || root2.tag === 26) {
                  if (current === null) {
                    wasHidden = current = root2;
                    try {
                      if (currentResource = wasHidden.stateNode, hoistableRoot)
                        maybeNodes = currentResource.style, typeof maybeNodes.setProperty == "function" ? maybeNodes.setProperty("display", "none", "important") : maybeNodes.display = "none";
                      else {
                        i = wasHidden.stateNode;
                        var styleProp = wasHidden.memoizedProps.style, display = styleProp != null && styleProp.hasOwnProperty("display") ? styleProp.display : null;
                        i.style.display = display == null || typeof display == "boolean" ? "" : ("" + display).trim();
                      }
                    } catch (error) {
                      captureCommitPhaseError(wasHidden, wasHidden.return, error);
                    }
                  }
                } else if (root2.tag === 6) {
                  if (current === null) {
                    wasHidden = root2;
                    try {
                      wasHidden.stateNode.nodeValue = hoistableRoot ? "" : wasHidden.memoizedProps;
                    } catch (error) {
                      captureCommitPhaseError(wasHidden, wasHidden.return, error);
                    }
                  }
                } else if (root2.tag === 18) {
                  if (current === null) {
                    wasHidden = root2;
                    try {
                      var instance = wasHidden.stateNode;
                      hoistableRoot ? hideOrUnhideDehydratedBoundary(instance, !0) : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);
                    } catch (error) {
                      captureCommitPhaseError(wasHidden, wasHidden.return, error);
                    }
                  }
                } else if ((root2.tag !== 22 && root2.tag !== 23 || root2.memoizedState === null || root2 === finishedWork) && root2.child !== null) {
                  root2.child.return = root2, root2 = root2.child;
                  continue;
                }
                if (root2 === finishedWork) break a;
                for (; root2.sibling === null; ) {
                  if (root2.return === null || root2.return === finishedWork) break a;
                  current === root2 && (current = null), root2 = root2.return;
                }
                current === root2 && (current = null), root2.sibling.return = root2.return, root2 = root2.sibling;
              }
            flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (current = flags.retryQueue, current !== null && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current))));
            break;
          case 19:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork), flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
            break;
          case 30:
            break;
          case 21:
            break;
          default:
            recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
        }
      }
      function commitReconciliationEffects(finishedWork) {
        var flags = finishedWork.flags;
        if (flags & 2) {
          try {
            for (var hostParentFiber, parentFiber = finishedWork.return; parentFiber !== null; ) {
              if (isHostParent(parentFiber)) {
                hostParentFiber = parentFiber;
                break;
              }
              parentFiber = parentFiber.return;
            }
            if (hostParentFiber == null) throw Error(formatProdErrorMessage(160));
            switch (hostParentFiber.tag) {
              case 27:
                var parent = hostParentFiber.stateNode, before = getHostSibling(finishedWork);
                insertOrAppendPlacementNode(finishedWork, before, parent);
                break;
              case 5:
                var parent$141 = hostParentFiber.stateNode;
                hostParentFiber.flags & 32 && (setTextContent(parent$141, ""), hostParentFiber.flags &= -33);
                var before$142 = getHostSibling(finishedWork);
                insertOrAppendPlacementNode(finishedWork, before$142, parent$141);
                break;
              case 3:
              case 4:
                var parent$143 = hostParentFiber.stateNode.containerInfo, before$144 = getHostSibling(finishedWork);
                insertOrAppendPlacementNodeIntoContainer(
                  finishedWork,
                  before$144,
                  parent$143
                );
                break;
              default:
                throw Error(formatProdErrorMessage(161));
            }
          } catch (error) {
            captureCommitPhaseError(finishedWork, finishedWork.return, error);
          }
          finishedWork.flags &= -3;
        }
        flags & 4096 && (finishedWork.flags &= -4097);
      }
      function recursivelyResetForms(parentFiber) {
        if (parentFiber.subtreeFlags & 1024)
          for (parentFiber = parentFiber.child; parentFiber !== null; ) {
            var fiber = parentFiber;
            recursivelyResetForms(fiber), fiber.tag === 5 && fiber.flags & 1024 && fiber.stateNode.reset(), parentFiber = parentFiber.sibling;
          }
      }
      function recursivelyTraverseLayoutEffects(root2, parentFiber) {
        if (parentFiber.subtreeFlags & 8772)
          for (parentFiber = parentFiber.child; parentFiber !== null; )
            commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
      }
      function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
        for (parentFiber = parentFiber.child; parentFiber !== null; ) {
          var finishedWork = parentFiber;
          switch (finishedWork.tag) {
            case 0:
            case 11:
            case 14:
            case 15:
              commitHookEffectListUnmount(4, finishedWork, finishedWork.return), recursivelyTraverseDisappearLayoutEffects(finishedWork);
              break;
            case 1:
              safelyDetachRef(finishedWork, finishedWork.return);
              var instance = finishedWork.stateNode;
              typeof instance.componentWillUnmount == "function" && safelyCallComponentWillUnmount(
                finishedWork,
                finishedWork.return,
                instance
              ), recursivelyTraverseDisappearLayoutEffects(finishedWork);
              break;
            case 27:
              releaseSingletonInstance(finishedWork.stateNode);
            case 26:
            case 5:
              safelyDetachRef(finishedWork, finishedWork.return), recursivelyTraverseDisappearLayoutEffects(finishedWork);
              break;
            case 22:
              finishedWork.memoizedState === null && recursivelyTraverseDisappearLayoutEffects(finishedWork);
              break;
            case 30:
              recursivelyTraverseDisappearLayoutEffects(finishedWork);
              break;
            default:
              recursivelyTraverseDisappearLayoutEffects(finishedWork);
          }
          parentFiber = parentFiber.sibling;
        }
      }
      function recursivelyTraverseReappearLayoutEffects(finishedRoot$jscomp$0, parentFiber, includeWorkInProgressEffects) {
        for (includeWorkInProgressEffects = includeWorkInProgressEffects && (parentFiber.subtreeFlags & 8772) !== 0, parentFiber = parentFiber.child; parentFiber !== null; ) {
          var current = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
          switch (finishedWork.tag) {
            case 0:
            case 11:
            case 15:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), commitHookEffectListMount(4, finishedWork);
              break;
            case 1:
              if (recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), current = finishedWork, finishedRoot = current.stateNode, typeof finishedRoot.componentDidMount == "function")
                try {
                  finishedRoot.componentDidMount();
                } catch (error) {
                  captureCommitPhaseError(current, current.return, error);
                }
              if (current = finishedWork, finishedRoot = current.updateQueue, finishedRoot !== null) {
                var instance = current.stateNode;
                try {
                  var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;
                  if (hiddenCallbacks !== null)
                    for (finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0; finishedRoot < hiddenCallbacks.length; finishedRoot++)
                      callCallback(hiddenCallbacks[finishedRoot], instance);
                } catch (error) {
                  captureCommitPhaseError(current, current.return, error);
                }
              }
              includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork), safelyAttachRef(finishedWork, finishedWork.return);
              break;
            case 27:
              commitHostSingletonAcquisition(finishedWork);
            case 26:
            case 5:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), includeWorkInProgressEffects && current === null && flags & 4 && commitHostMount(finishedWork), safelyAttachRef(finishedWork, finishedWork.return);
              break;
            case 12:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              );
              break;
            case 31:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), includeWorkInProgressEffects && flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
              break;
            case 13:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
              break;
            case 22:
              finishedWork.memoizedState === null && recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              ), safelyAttachRef(finishedWork, finishedWork.return);
              break;
            case 30:
              break;
            default:
              recursivelyTraverseReappearLayoutEffects(
                finishedRoot,
                finishedWork,
                includeWorkInProgressEffects
              );
          }
          parentFiber = parentFiber.sibling;
        }
      }
      function commitOffscreenPassiveMountEffects(current, finishedWork) {
        var previousCache = null;
        current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null && (previousCache = current.memoizedState.cachePool.pool), current = null, finishedWork.memoizedState !== null && finishedWork.memoizedState.cachePool !== null && (current = finishedWork.memoizedState.cachePool.pool), current !== previousCache && (current != null && current.refCount++, previousCache != null && releaseCache(previousCache));
      }
      function commitCachePassiveMountEffect(current, finishedWork) {
        current = null, finishedWork.alternate !== null && (current = finishedWork.alternate.memoizedState.cache), finishedWork = finishedWork.memoizedState.cache, finishedWork !== current && (finishedWork.refCount++, current != null && releaseCache(current));
      }
      function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions) {
        if (parentFiber.subtreeFlags & 10256)
          for (parentFiber = parentFiber.child; parentFiber !== null; )
            commitPassiveMountOnFiber(
              root2,
              parentFiber,
              committedLanes,
              committedTransitions
            ), parentFiber = parentFiber.sibling;
      }
      function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
        var flags = finishedWork.flags;
        switch (finishedWork.tag) {
          case 0:
          case 11:
          case 15:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            ), flags & 2048 && commitHookEffectListMount(9, finishedWork);
            break;
          case 1:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            );
            break;
          case 3:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            ), flags & 2048 && (finishedRoot = null, finishedWork.alternate !== null && (finishedRoot = finishedWork.alternate.memoizedState.cache), finishedWork = finishedWork.memoizedState.cache, finishedWork !== finishedRoot && (finishedWork.refCount++, finishedRoot != null && releaseCache(finishedRoot)));
            break;
          case 12:
            if (flags & 2048) {
              recursivelyTraversePassiveMountEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions
              ), finishedRoot = finishedWork.stateNode;
              try {
                var _finishedWork$memoize2 = finishedWork.memoizedProps, id = _finishedWork$memoize2.id, onPostCommit = _finishedWork$memoize2.onPostCommit;
                typeof onPostCommit == "function" && onPostCommit(
                  id,
                  finishedWork.alternate === null ? "mount" : "update",
                  finishedRoot.passiveEffectDuration,
                  -0
                );
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            } else
              recursivelyTraversePassiveMountEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions
              );
            break;
          case 31:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            );
            break;
          case 13:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            );
            break;
          case 23:
            break;
          case 22:
            _finishedWork$memoize2 = finishedWork.stateNode, id = finishedWork.alternate, finishedWork.memoizedState !== null ? _finishedWork$memoize2._visibility & 2 ? recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            ) : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) : _finishedWork$memoize2._visibility & 2 ? recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            ) : (_finishedWork$memoize2._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions,
              (finishedWork.subtreeFlags & 10256) !== 0 || !1
            )), flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);
            break;
          case 24:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            ), flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
            break;
          default:
            recursivelyTraversePassiveMountEffects(
              finishedRoot,
              finishedWork,
              committedLanes,
              committedTransitions
            );
        }
      }
      function recursivelyTraverseReconnectPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, includeWorkInProgressEffects) {
        for (includeWorkInProgressEffects = includeWorkInProgressEffects && ((parentFiber.subtreeFlags & 10256) !== 0 || !1), parentFiber = parentFiber.child; parentFiber !== null; ) {
          var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, flags = finishedWork.flags;
          switch (finishedWork.tag) {
            case 0:
            case 11:
            case 15:
              recursivelyTraverseReconnectPassiveEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions,
                includeWorkInProgressEffects
              ), commitHookEffectListMount(8, finishedWork);
              break;
            case 23:
              break;
            case 22:
              var instance = finishedWork.stateNode;
              finishedWork.memoizedState !== null ? instance._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions,
                includeWorkInProgressEffects
              ) : recursivelyTraverseAtomicPassiveEffects(
                finishedRoot,
                finishedWork
              ) : (instance._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions,
                includeWorkInProgressEffects
              )), includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
                finishedWork.alternate,
                finishedWork
              );
              break;
            case 24:
              recursivelyTraverseReconnectPassiveEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions,
                includeWorkInProgressEffects
              ), includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
              break;
            default:
              recursivelyTraverseReconnectPassiveEffects(
                finishedRoot,
                finishedWork,
                committedLanes,
                committedTransitions,
                includeWorkInProgressEffects
              );
          }
          parentFiber = parentFiber.sibling;
        }
      }
      function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber) {
        if (parentFiber.subtreeFlags & 10256)
          for (parentFiber = parentFiber.child; parentFiber !== null; ) {
            var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
            switch (finishedWork.tag) {
              case 22:
                recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork), flags & 2048 && commitOffscreenPassiveMountEffects(
                  finishedWork.alternate,
                  finishedWork
                );
                break;
              case 24:
                recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork), flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
                break;
              default:
                recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
            }
            parentFiber = parentFiber.sibling;
          }
      }
      var suspenseyCommitFlag = 8192;
      function recursivelyAccumulateSuspenseyCommit(parentFiber, committedLanes, suspendedState) {
        if (parentFiber.subtreeFlags & suspenseyCommitFlag)
          for (parentFiber = parentFiber.child; parentFiber !== null; )
            accumulateSuspenseyCommitOnFiber(
              parentFiber,
              committedLanes,
              suspendedState
            ), parentFiber = parentFiber.sibling;
      }
      function accumulateSuspenseyCommitOnFiber(fiber, committedLanes, suspendedState) {
        switch (fiber.tag) {
          case 26:
            recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            ), fiber.flags & suspenseyCommitFlag && fiber.memoizedState !== null && suspendResource(
              suspendedState,
              currentHoistableRoot,
              fiber.memoizedState,
              fiber.memoizedProps
            );
            break;
          case 5:
            recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            );
            break;
          case 3:
          case 4:
            var previousHoistableRoot = currentHoistableRoot;
            currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo), recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            ), currentHoistableRoot = previousHoistableRoot;
            break;
          case 22:
            fiber.memoizedState === null && (previousHoistableRoot = fiber.alternate, previousHoistableRoot !== null && previousHoistableRoot.memoizedState !== null ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            ), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            ));
            break;
          default:
            recursivelyAccumulateSuspenseyCommit(
              fiber,
              committedLanes,
              suspendedState
            );
        }
      }
      function detachAlternateSiblings(parentFiber) {
        var previousFiber = parentFiber.alternate;
        if (previousFiber !== null && (parentFiber = previousFiber.child, parentFiber !== null)) {
          previousFiber.child = null;
          do
            previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
          while (parentFiber !== null);
        }
      }
      function recursivelyTraversePassiveUnmountEffects(parentFiber) {
        var deletions = parentFiber.deletions;
        if ((parentFiber.flags & 16) !== 0) {
          if (deletions !== null)
            for (var i = 0; i < deletions.length; i++) {
              var childToDelete = deletions[i];
              nextEffect = childToDelete, commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
                childToDelete,
                parentFiber
              );
            }
          detachAlternateSiblings(parentFiber);
        }
        if (parentFiber.subtreeFlags & 10256)
          for (parentFiber = parentFiber.child; parentFiber !== null; )
            commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
      }
      function commitPassiveUnmountOnFiber(finishedWork) {
        switch (finishedWork.tag) {
          case 0:
          case 11:
          case 15:
            recursivelyTraversePassiveUnmountEffects(finishedWork), finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return);
            break;
          case 3:
            recursivelyTraversePassiveUnmountEffects(finishedWork);
            break;
          case 12:
            recursivelyTraversePassiveUnmountEffects(finishedWork);
            break;
          case 22:
            var instance = finishedWork.stateNode;
            finishedWork.memoizedState !== null && instance._visibility & 2 && (finishedWork.return === null || finishedWork.return.tag !== 13) ? (instance._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork);
            break;
          default:
            recursivelyTraversePassiveUnmountEffects(finishedWork);
        }
      }
      function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
        var deletions = parentFiber.deletions;
        if ((parentFiber.flags & 16) !== 0) {
          if (deletions !== null)
            for (var i = 0; i < deletions.length; i++) {
              var childToDelete = deletions[i];
              nextEffect = childToDelete, commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
                childToDelete,
                parentFiber
              );
            }
          detachAlternateSiblings(parentFiber);
        }
        for (parentFiber = parentFiber.child; parentFiber !== null; ) {
          switch (deletions = parentFiber, deletions.tag) {
            case 0:
            case 11:
            case 15:
              commitHookEffectListUnmount(8, deletions, deletions.return), recursivelyTraverseDisconnectPassiveEffects(deletions);
              break;
            case 22:
              i = deletions.stateNode, i._visibility & 2 && (i._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(deletions));
              break;
            default:
              recursivelyTraverseDisconnectPassiveEffects(deletions);
          }
          parentFiber = parentFiber.sibling;
        }
      }
      function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
        for (; nextEffect !== null; ) {
          var fiber = nextEffect;
          switch (fiber.tag) {
            case 0:
            case 11:
            case 15:
              commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);
              break;
            case 23:
            case 22:
              if (fiber.memoizedState !== null && fiber.memoizedState.cachePool !== null) {
                var cache = fiber.memoizedState.cachePool.pool;
                cache != null && cache.refCount++;
              }
              break;
            case 24:
              releaseCache(fiber.memoizedState.cache);
          }
          if (cache = fiber.child, cache !== null) cache.return = fiber, nextEffect = cache;
          else
            a: for (fiber = deletedSubtreeRoot; nextEffect !== null; ) {
              cache = nextEffect;
              var sibling = cache.sibling, returnFiber = cache.return;
              if (detachFiberAfterEffects(cache), cache === fiber) {
                nextEffect = null;
                break a;
              }
              if (sibling !== null) {
                sibling.return = returnFiber, nextEffect = sibling;
                break a;
              }
              nextEffect = returnFiber;
            }
        }
      }
      var DefaultAsyncDispatcher = {
        getCacheForType: function(resourceType) {
          var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
          return cacheForType === void 0 && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType)), cacheForType;
        },
        cacheSignal: function() {
          return readContext(CacheContext).controller.signal;
        }
      }, PossiblyWeakMap = typeof WeakMap == "function" ? WeakMap : Map, executionContext = 0, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, globalMostRecentFallbackTime = 0, globalMostRecentTransitionTime = 0, workInProgressRootRenderTargetTime = 1 / 0, workInProgressTransitions = null, legacyErrorBoundariesThatAlreadyFailed = null, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, nestedUpdateCount = 0, rootWithNestedUpdates = null;
      function requestUpdateLane() {
        return (executionContext & 2) !== 0 && workInProgressRootRenderLanes !== 0 ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes : ReactSharedInternals.T !== null ? requestTransitionLane() : resolveUpdatePriority();
      }
      function requestDeferredLane() {
        if (workInProgressDeferredLane === 0)
          if ((workInProgressRootRenderLanes & 536870912) === 0 || isHydrating) {
            var lane = nextTransitionDeferredLane;
            nextTransitionDeferredLane <<= 1, (nextTransitionDeferredLane & 3932160) === 0 && (nextTransitionDeferredLane = 262144), workInProgressDeferredLane = lane;
          } else workInProgressDeferredLane = 536870912;
        return lane = suspenseHandlerStackCursor.current, lane !== null && (lane.flags |= 32), workInProgressDeferredLane;
      }
      function scheduleUpdateOnFiber(root2, fiber, lane) {
        (root2 === workInProgressRoot && (workInProgressSuspendedReason === 2 || workInProgressSuspendedReason === 9) || root2.cancelPendingCommit !== null) && (prepareFreshStack(root2, 0), markRootSuspended(
          root2,
          workInProgressRootRenderLanes,
          workInProgressDeferredLane,
          !1
        )), markRootUpdated$1(root2, lane), ((executionContext & 2) === 0 || root2 !== workInProgressRoot) && (root2 === workInProgressRoot && ((executionContext & 2) === 0 && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === 4 && markRootSuspended(
          root2,
          workInProgressRootRenderLanes,
          workInProgressDeferredLane,
          !1
        )), ensureRootIsScheduled(root2));
      }
      function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
        if ((executionContext & 6) !== 0) throw Error(formatProdErrorMessage(327));
        var shouldTimeSlice = !forceSync && (lanes & 127) === 0 && (lanes & root$jscomp$0.expiredLanes) === 0 || checkIfRootIsPrerendering(root$jscomp$0, lanes), exitStatus = shouldTimeSlice ? renderRootConcurrent(root$jscomp$0, lanes) : renderRootSync(root$jscomp$0, lanes, !0), renderWasConcurrent = shouldTimeSlice;
        do {
          if (exitStatus === 0) {
            workInProgressRootIsPrerendering && !shouldTimeSlice && markRootSuspended(root$jscomp$0, lanes, 0, !1);
            break;
          } else {
            if (forceSync = root$jscomp$0.current.alternate, renderWasConcurrent && !isRenderConsistentWithExternalStores(forceSync)) {
              exitStatus = renderRootSync(root$jscomp$0, lanes, !1), renderWasConcurrent = !1;
              continue;
            }
            if (exitStatus === 2) {
              if (renderWasConcurrent = lanes, root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)
                var JSCompiler_inline_result = 0;
              else
                JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913, JSCompiler_inline_result = JSCompiler_inline_result !== 0 ? JSCompiler_inline_result : JSCompiler_inline_result & 536870912 ? 536870912 : 0;
              if (JSCompiler_inline_result !== 0) {
                lanes = JSCompiler_inline_result;
                a: {
                  var root2 = root$jscomp$0;
                  exitStatus = workInProgressRootConcurrentErrors;
                  var wasRootDehydrated = root2.current.memoizedState.isDehydrated;
                  if (wasRootDehydrated && (prepareFreshStack(root2, JSCompiler_inline_result).flags |= 256), JSCompiler_inline_result = renderRootSync(
                    root2,
                    JSCompiler_inline_result,
                    !1
                  ), JSCompiler_inline_result !== 2) {
                    if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
                      root2.errorRecoveryDisabledLanes |= renderWasConcurrent, workInProgressRootInterleavedUpdatedLanes |= renderWasConcurrent, exitStatus = 4;
                      break a;
                    }
                    renderWasConcurrent = workInProgressRootRecoverableErrors, workInProgressRootRecoverableErrors = exitStatus, renderWasConcurrent !== null && (workInProgressRootRecoverableErrors === null ? workInProgressRootRecoverableErrors = renderWasConcurrent : workInProgressRootRecoverableErrors.push.apply(
                      workInProgressRootRecoverableErrors,
                      renderWasConcurrent
                    ));
                  }
                  exitStatus = JSCompiler_inline_result;
                }
                if (renderWasConcurrent = !1, exitStatus !== 2) continue;
              }
            }
            if (exitStatus === 1) {
              prepareFreshStack(root$jscomp$0, 0), markRootSuspended(root$jscomp$0, lanes, 0, !0);
              break;
            }
            a: {
              switch (shouldTimeSlice = root$jscomp$0, renderWasConcurrent = exitStatus, renderWasConcurrent) {
                case 0:
                case 1:
                  throw Error(formatProdErrorMessage(345));
                case 4:
                  if ((lanes & 4194048) !== lanes) break;
                case 6:
                  markRootSuspended(
                    shouldTimeSlice,
                    lanes,
                    workInProgressDeferredLane,
                    !workInProgressRootDidSkipSuspendedSiblings
                  );
                  break a;
                case 2:
                  workInProgressRootRecoverableErrors = null;
                  break;
                case 3:
                case 5:
                  break;
                default:
                  throw Error(formatProdErrorMessage(329));
              }
              if ((lanes & 62914560) === lanes && (exitStatus = globalMostRecentFallbackTime + 300 - now(), 10 < exitStatus)) {
                if (markRootSuspended(
                  shouldTimeSlice,
                  lanes,
                  workInProgressDeferredLane,
                  !workInProgressRootDidSkipSuspendedSiblings
                ), getNextLanes(shouldTimeSlice, 0, !0) !== 0) break a;
                pendingEffectsLanes = lanes, shouldTimeSlice.timeoutHandle = scheduleTimeout(
                  commitRootWhenReady.bind(
                    null,
                    shouldTimeSlice,
                    forceSync,
                    workInProgressRootRecoverableErrors,
                    workInProgressTransitions,
                    workInProgressRootDidIncludeRecursiveRenderUpdate,
                    lanes,
                    workInProgressDeferredLane,
                    workInProgressRootInterleavedUpdatedLanes,
                    workInProgressSuspendedRetryLanes,
                    workInProgressRootDidSkipSuspendedSiblings,
                    renderWasConcurrent,
                    "Throttled",
                    -0,
                    0
                  ),
                  exitStatus
                );
                break a;
              }
              commitRootWhenReady(
                shouldTimeSlice,
                forceSync,
                workInProgressRootRecoverableErrors,
                workInProgressTransitions,
                workInProgressRootDidIncludeRecursiveRenderUpdate,
                lanes,
                workInProgressDeferredLane,
                workInProgressRootInterleavedUpdatedLanes,
                workInProgressSuspendedRetryLanes,
                workInProgressRootDidSkipSuspendedSiblings,
                renderWasConcurrent,
                null,
                -0,
                0
              );
            }
          }
          break;
        } while (!0);
        ensureRootIsScheduled(root$jscomp$0);
      }
      function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
        if (root2.timeoutHandle = -1, suspendedCommitReason = finishedWork.subtreeFlags, suspendedCommitReason & 8192 || (suspendedCommitReason & 16785408) === 16785408) {
          suspendedCommitReason = {
            stylesheets: null,
            count: 0,
            imgCount: 0,
            imgBytes: 0,
            suspenseyImages: [],
            waitingForImages: !0,
            waitingForViewTransition: !1,
            unsuspend: noop$1
          }, accumulateSuspenseyCommitOnFiber(
            finishedWork,
            lanes,
            suspendedCommitReason
          );
          var timeoutOffset = (lanes & 62914560) === lanes ? globalMostRecentFallbackTime - now() : (lanes & 4194048) === lanes ? globalMostRecentTransitionTime - now() : 0;
          if (timeoutOffset = waitForCommitToBeReady(
            suspendedCommitReason,
            timeoutOffset
          ), timeoutOffset !== null) {
            pendingEffectsLanes = lanes, root2.cancelPendingCommit = timeoutOffset(
              commitRoot.bind(
                null,
                root2,
                finishedWork,
                lanes,
                recoverableErrors,
                transitions,
                didIncludeRenderPhaseUpdate,
                spawnedLane,
                updatedLanes,
                suspendedRetryLanes,
                exitStatus,
                suspendedCommitReason,
                null,
                completedRenderStartTime,
                completedRenderEndTime
              )
            ), markRootSuspended(root2, lanes, spawnedLane, !didSkipSuspendedSiblings);
            return;
          }
        }
        commitRoot(
          root2,
          finishedWork,
          lanes,
          recoverableErrors,
          transitions,
          didIncludeRenderPhaseUpdate,
          spawnedLane,
          updatedLanes,
          suspendedRetryLanes
        );
      }
      function isRenderConsistentWithExternalStores(finishedWork) {
        for (var node = finishedWork; ; ) {
          var tag = node.tag;
          if ((tag === 0 || tag === 11 || tag === 15) && node.flags & 16384 && (tag = node.updateQueue, tag !== null && (tag = tag.stores, tag !== null)))
            for (var i = 0; i < tag.length; i++) {
              var check = tag[i], getSnapshot = check.getSnapshot;
              check = check.value;
              try {
                if (!objectIs(getSnapshot(), check)) return !1;
              } catch (error) {
                return !1;
              }
            }
          if (tag = node.child, node.subtreeFlags & 16384 && tag !== null)
            tag.return = node, node = tag;
          else {
            if (node === finishedWork) break;
            for (; node.sibling === null; ) {
              if (node.return === null || node.return === finishedWork) return !0;
              node = node.return;
            }
            node.sibling.return = node.return, node = node.sibling;
          }
        }
        return !0;
      }
      function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
        suspendedLanes &= ~workInProgressRootPingedLanes, suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes, root2.suspendedLanes |= suspendedLanes, root2.pingedLanes &= ~suspendedLanes, didAttemptEntireTree && (root2.warmLanes |= suspendedLanes), didAttemptEntireTree = root2.expirationTimes;
        for (var lanes = suspendedLanes; 0 < lanes; ) {
          var index$6 = 31 - clz32(lanes), lane = 1 << index$6;
          didAttemptEntireTree[index$6] = -1, lanes &= ~lane;
        }
        spawnedLane !== 0 && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
      }
      function flushSyncWork$1() {
        return (executionContext & 6) === 0 ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) : !0;
      }
      function resetWorkInProgressStack() {
        if (workInProgress !== null) {
          if (workInProgressSuspendedReason === 0)
            var interruptedWork = workInProgress.return;
          else
            interruptedWork = workInProgress, lastContextDependency = currentlyRenderingFiber$1 = null, resetHooksOnUnwind(interruptedWork), thenableState$1 = null, thenableIndexCounter$1 = 0, interruptedWork = workInProgress;
          for (; interruptedWork !== null; )
            unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
          workInProgress = null;
        }
      }
      function prepareFreshStack(root2, lanes) {
        var timeoutHandle = root2.timeoutHandle;
        timeoutHandle !== -1 && (root2.timeoutHandle = -1, cancelTimeout(timeoutHandle)), timeoutHandle = root2.cancelPendingCommit, timeoutHandle !== null && (root2.cancelPendingCommit = null, timeoutHandle()), pendingEffectsLanes = 0, resetWorkInProgressStack(), workInProgressRoot = root2, workInProgress = timeoutHandle = createWorkInProgress(root2.current, null), workInProgressRootRenderLanes = lanes, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes), workInProgressRootDidAttachPingListener = !1, workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = workInProgressRootExitStatus = 0, workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = !1, (lanes & 8) !== 0 && (lanes |= lanes & 32);
        var allEntangledLanes = root2.entangledLanes;
        if (allEntangledLanes !== 0)
          for (root2 = root2.entanglements, allEntangledLanes &= lanes; 0 < allEntangledLanes; ) {
            var index$4 = 31 - clz32(allEntangledLanes), lane = 1 << index$4;
            lanes |= root2[index$4], allEntangledLanes &= ~lane;
          }
        return entangledRenderLanes = lanes, finishQueueingConcurrentUpdates(), timeoutHandle;
      }
      function handleThrow(root2, thrownValue) {
        currentlyRenderingFiber = null, ReactSharedInternals.H = ContextOnlyDispatcher, thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = 3) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = 4) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? 8 : thrownValue !== null && typeof thrownValue == "object" && typeof thrownValue.then == "function" ? 6 : 1, workInProgressThrownValue = thrownValue, workInProgress === null && (workInProgressRootExitStatus = 1, logUncaughtError(
          root2,
          createCapturedValueAtFiber(thrownValue, root2.current)
        ));
      }
      function shouldRemainOnPreviousScreen() {
        var handler = suspenseHandlerStackCursor.current;
        return handler === null ? !0 : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? shellBoundary === null : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || (workInProgressRootRenderLanes & 536870912) !== 0 ? handler === shellBoundary : !1;
      }
      function pushDispatcher() {
        var prevDispatcher = ReactSharedInternals.H;
        return ReactSharedInternals.H = ContextOnlyDispatcher, prevDispatcher === null ? ContextOnlyDispatcher : prevDispatcher;
      }
      function pushAsyncDispatcher() {
        var prevAsyncDispatcher = ReactSharedInternals.A;
        return ReactSharedInternals.A = DefaultAsyncDispatcher, prevAsyncDispatcher;
      }
      function renderDidSuspendDelayIfPossible() {
        workInProgressRootExitStatus = 4, workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && suspenseHandlerStackCursor.current !== null || (workInProgressRootIsPrerendering = !0), (workInProgressRootSkippedLanes & 134217727) === 0 && (workInProgressRootInterleavedUpdatedLanes & 134217727) === 0 || workInProgressRoot === null || markRootSuspended(
          workInProgressRoot,
          workInProgressRootRenderLanes,
          workInProgressDeferredLane,
          !1
        );
      }
      function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
        var prevExecutionContext = executionContext;
        executionContext |= 2;
        var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
        (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) && (workInProgressTransitions = null, prepareFreshStack(root2, lanes)), lanes = !1;
        var exitStatus = workInProgressRootExitStatus;
        a: do
          try {
            if (workInProgressSuspendedReason !== 0 && workInProgress !== null) {
              var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
              switch (workInProgressSuspendedReason) {
                case 8:
                  resetWorkInProgressStack(), exitStatus = 6;
                  break a;
                case 3:
                case 2:
                case 9:
                case 6:
                  suspenseHandlerStackCursor.current === null && (lanes = !0);
                  var reason = workInProgressSuspendedReason;
                  if (workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason), shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
                    exitStatus = 0;
                    break a;
                  }
                  break;
                default:
                  reason = workInProgressSuspendedReason, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
              }
            }
            workLoopSync(), exitStatus = workInProgressRootExitStatus;
            break;
          } catch (thrownValue$165) {
            handleThrow(root2, thrownValue$165);
          }
        while (!0);
        return lanes && root2.shellSuspendCounter++, lastContextDependency = currentlyRenderingFiber$1 = null, executionContext = prevExecutionContext, ReactSharedInternals.H = prevDispatcher, ReactSharedInternals.A = prevAsyncDispatcher, workInProgress === null && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates()), exitStatus;
      }
      function workLoopSync() {
        for (; workInProgress !== null; ) performUnitOfWork(workInProgress);
      }
      function renderRootConcurrent(root2, lanes) {
        var prevExecutionContext = executionContext;
        executionContext |= 2;
        var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
        workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes ? (workInProgressTransitions = null, workInProgressRootRenderTargetTime = now() + 500, prepareFreshStack(root2, lanes)) : workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
          root2,
          lanes
        );
        a: do
          try {
            if (workInProgressSuspendedReason !== 0 && workInProgress !== null) {
              lanes = workInProgress;
              var thrownValue = workInProgressThrownValue;
              b: switch (workInProgressSuspendedReason) {
                case 1:
                  workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, lanes, thrownValue, 1);
                  break;
                case 2:
                case 9:
                  if (isThenableResolved(thrownValue)) {
                    workInProgressSuspendedReason = 0, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes);
                    break;
                  }
                  lanes = function() {
                    workInProgressSuspendedReason !== 2 && workInProgressSuspendedReason !== 9 || workInProgressRoot !== root2 || (workInProgressSuspendedReason = 7), ensureRootIsScheduled(root2);
                  }, thrownValue.then(lanes, lanes);
                  break a;
                case 3:
                  workInProgressSuspendedReason = 7;
                  break a;
                case 4:
                  workInProgressSuspendedReason = 5;
                  break a;
                case 7:
                  isThenableResolved(thrownValue) ? (workInProgressSuspendedReason = 0, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, lanes, thrownValue, 7));
                  break;
                case 5:
                  var resource = null;
                  switch (workInProgress.tag) {
                    case 26:
                      resource = workInProgress.memoizedState;
                    case 5:
                    case 27:
                      var hostFiber = workInProgress;
                      if (resource ? preloadResource(resource) : hostFiber.stateNode.complete) {
                        workInProgressSuspendedReason = 0, workInProgressThrownValue = null;
                        var sibling = hostFiber.sibling;
                        if (sibling !== null) workInProgress = sibling;
                        else {
                          var returnFiber = hostFiber.return;
                          returnFiber !== null ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
                        }
                        break b;
                      }
                  }
                  workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, lanes, thrownValue, 5);
                  break;
                case 6:
                  workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, lanes, thrownValue, 6);
                  break;
                case 8:
                  resetWorkInProgressStack(), workInProgressRootExitStatus = 6;
                  break a;
                default:
                  throw Error(formatProdErrorMessage(462));
              }
            }
            workLoopConcurrentByScheduler();
            break;
          } catch (thrownValue$167) {
            handleThrow(root2, thrownValue$167);
          }
        while (!0);
        return lastContextDependency = currentlyRenderingFiber$1 = null, ReactSharedInternals.H = prevDispatcher, ReactSharedInternals.A = prevAsyncDispatcher, executionContext = prevExecutionContext, workInProgress !== null ? 0 : (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates(), workInProgressRootExitStatus);
      }
      function workLoopConcurrentByScheduler() {
        for (; workInProgress !== null && !shouldYield(); )
          performUnitOfWork(workInProgress);
      }
      function performUnitOfWork(unitOfWork) {
        var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
        unitOfWork.memoizedProps = unitOfWork.pendingProps, next === null ? completeUnitOfWork(unitOfWork) : workInProgress = next;
      }
      function replaySuspendedUnitOfWork(unitOfWork) {
        var next = unitOfWork, current = next.alternate;
        switch (next.tag) {
          case 15:
          case 0:
            next = replayFunctionComponent(
              current,
              next,
              next.pendingProps,
              next.type,
              void 0,
              workInProgressRootRenderLanes
            );
            break;
          case 11:
            next = replayFunctionComponent(
              current,
              next,
              next.pendingProps,
              next.type.render,
              next.ref,
              workInProgressRootRenderLanes
            );
            break;
          case 5:
            resetHooksOnUnwind(next);
          default:
            unwindInterruptedWork(current, next), next = workInProgress = resetWorkInProgress(next, entangledRenderLanes), next = beginWork(current, next, entangledRenderLanes);
        }
        unitOfWork.memoizedProps = unitOfWork.pendingProps, next === null ? completeUnitOfWork(unitOfWork) : workInProgress = next;
      }
      function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
        lastContextDependency = currentlyRenderingFiber$1 = null, resetHooksOnUnwind(unitOfWork), thenableState$1 = null, thenableIndexCounter$1 = 0;
        var returnFiber = unitOfWork.return;
        try {
          if (throwException(
            root2,
            returnFiber,
            unitOfWork,
            thrownValue,
            workInProgressRootRenderLanes
          )) {
            workInProgressRootExitStatus = 1, logUncaughtError(
              root2,
              createCapturedValueAtFiber(thrownValue, root2.current)
            ), workInProgress = null;
            return;
          }
        } catch (error) {
          if (returnFiber !== null) throw workInProgress = returnFiber, error;
          workInProgressRootExitStatus = 1, logUncaughtError(
            root2,
            createCapturedValueAtFiber(thrownValue, root2.current)
          ), workInProgress = null;
          return;
        }
        unitOfWork.flags & 32768 ? (isHydrating || suspendedReason === 1 ? root2 = !0 : workInProgressRootIsPrerendering || (workInProgressRootRenderLanes & 536870912) !== 0 ? root2 = !1 : (workInProgressRootDidSkipSuspendedSiblings = root2 = !0, (suspendedReason === 2 || suspendedReason === 9 || suspendedReason === 3 || suspendedReason === 6) && (suspendedReason = suspenseHandlerStackCursor.current, suspendedReason !== null && suspendedReason.tag === 13 && (suspendedReason.flags |= 16384))), unwindUnitOfWork(unitOfWork, root2)) : completeUnitOfWork(unitOfWork);
      }
      function completeUnitOfWork(unitOfWork) {
        var completedWork = unitOfWork;
        do {
          if ((completedWork.flags & 32768) !== 0) {
            unwindUnitOfWork(
              completedWork,
              workInProgressRootDidSkipSuspendedSiblings
            );
            return;
          }
          unitOfWork = completedWork.return;
          var next = completeWork(
            completedWork.alternate,
            completedWork,
            entangledRenderLanes
          );
          if (next !== null) {
            workInProgress = next;
            return;
          }
          if (completedWork = completedWork.sibling, completedWork !== null) {
            workInProgress = completedWork;
            return;
          }
          workInProgress = completedWork = unitOfWork;
        } while (completedWork !== null);
        workInProgressRootExitStatus === 0 && (workInProgressRootExitStatus = 5);
      }
      function unwindUnitOfWork(unitOfWork, skipSiblings) {
        do {
          var next = unwindWork(unitOfWork.alternate, unitOfWork);
          if (next !== null) {
            next.flags &= 32767, workInProgress = next;
            return;
          }
          if (next = unitOfWork.return, next !== null && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null), !skipSiblings && (unitOfWork = unitOfWork.sibling, unitOfWork !== null)) {
            workInProgress = unitOfWork;
            return;
          }
          workInProgress = unitOfWork = next;
        } while (unitOfWork !== null);
        workInProgressRootExitStatus = 6, workInProgress = null;
      }
      function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes) {
        root2.cancelPendingCommit = null;
        do
          flushPendingEffects();
        while (pendingEffectsStatus !== 0);
        if ((executionContext & 6) !== 0) throw Error(formatProdErrorMessage(327));
        if (finishedWork !== null) {
          if (finishedWork === root2.current) throw Error(formatProdErrorMessage(177));
          if (didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes, didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes, markRootFinished(
            root2,
            lanes,
            didIncludeRenderPhaseUpdate,
            spawnedLane,
            updatedLanes,
            suspendedRetryLanes
          ), root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0), pendingFinishedWork = finishedWork, pendingEffectsRoot = root2, pendingEffectsLanes = lanes, pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate, pendingPassiveTransitions = transitions, pendingRecoverableErrors = recoverableErrors, (finishedWork.subtreeFlags & 10256) !== 0 || (finishedWork.flags & 10256) !== 0 ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
            return flushPassiveEffects(), null;
          })) : (root2.callbackNode = null, root2.callbackPriority = 0), recoverableErrors = (finishedWork.flags & 13878) !== 0, (finishedWork.subtreeFlags & 13878) !== 0 || recoverableErrors) {
            recoverableErrors = ReactSharedInternals.T, ReactSharedInternals.T = null, transitions = ReactDOMSharedInternals.p, ReactDOMSharedInternals.p = 2, spawnedLane = executionContext, executionContext |= 4;
            try {
              commitBeforeMutationEffects(root2, finishedWork, lanes);
            } finally {
              executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
            }
          }
          pendingEffectsStatus = 1, flushMutationEffects(), flushLayoutEffects(), flushSpawnedWork();
        }
      }
      function flushMutationEffects() {
        if (pendingEffectsStatus === 1) {
          pendingEffectsStatus = 0;
          var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, rootMutationHasEffect = (finishedWork.flags & 13878) !== 0;
          if ((finishedWork.subtreeFlags & 13878) !== 0 || rootMutationHasEffect) {
            rootMutationHasEffect = ReactSharedInternals.T, ReactSharedInternals.T = null;
            var previousPriority = ReactDOMSharedInternals.p;
            ReactDOMSharedInternals.p = 2;
            var prevExecutionContext = executionContext;
            executionContext |= 4;
            try {
              commitMutationEffectsOnFiber(finishedWork, root2);
              var priorSelectionInformation = selectionInformation, curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = priorSelectionInformation.focusedElem, priorSelectionRange = priorSelectionInformation.selectionRange;
              if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
                priorFocusedElem.ownerDocument.documentElement,
                priorFocusedElem
              )) {
                if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
                  var start = priorSelectionRange.start, end = priorSelectionRange.end;
                  if (end === void 0 && (end = start), "selectionStart" in priorFocusedElem)
                    priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
                      end,
                      priorFocusedElem.value.length
                    );
                  else {
                    var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
                    if (win.getSelection) {
                      var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(priorSelectionRange.start, length), end$jscomp$0 = priorSelectionRange.end === void 0 ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
                      !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
                      var startMarker = getNodeForCharacterOffset(
                        priorFocusedElem,
                        start$jscomp$0
                      ), endMarker = getNodeForCharacterOffset(
                        priorFocusedElem,
                        end$jscomp$0
                      );
                      if (startMarker && endMarker && (selection.rangeCount !== 1 || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
                        var range = doc.createRange();
                        range.setStart(startMarker.node, startMarker.offset), selection.removeAllRanges(), start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
                      }
                    }
                  }
                }
                for (doc = [], selection = priorFocusedElem; selection = selection.parentNode; )
                  selection.nodeType === 1 && doc.push({
                    element: selection,
                    left: selection.scrollLeft,
                    top: selection.scrollTop
                  });
                for (typeof priorFocusedElem.focus == "function" && priorFocusedElem.focus(), priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
                  var info = doc[priorFocusedElem];
                  info.element.scrollLeft = info.left, info.element.scrollTop = info.top;
                }
              }
              _enabled = !!eventsEnabled, selectionInformation = eventsEnabled = null;
            } finally {
              executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
            }
          }
          root2.current = finishedWork, pendingEffectsStatus = 2;
        }
      }
      function flushLayoutEffects() {
        if (pendingEffectsStatus === 2) {
          pendingEffectsStatus = 0;
          var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, rootHasLayoutEffect = (finishedWork.flags & 8772) !== 0;
          if ((finishedWork.subtreeFlags & 8772) !== 0 || rootHasLayoutEffect) {
            rootHasLayoutEffect = ReactSharedInternals.T, ReactSharedInternals.T = null;
            var previousPriority = ReactDOMSharedInternals.p;
            ReactDOMSharedInternals.p = 2;
            var prevExecutionContext = executionContext;
            executionContext |= 4;
            try {
              commitLayoutEffectOnFiber(root2, finishedWork.alternate, finishedWork);
            } finally {
              executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
            }
          }
          pendingEffectsStatus = 3;
        }
      }
      function flushSpawnedWork() {
        if (pendingEffectsStatus === 4 || pendingEffectsStatus === 3) {
          pendingEffectsStatus = 0, requestPaint();
          var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, recoverableErrors = pendingRecoverableErrors;
          (finishedWork.subtreeFlags & 10256) !== 0 || (finishedWork.flags & 10256) !== 0 ? pendingEffectsStatus = 5 : (pendingEffectsStatus = 0, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(root2, root2.pendingLanes));
          var remainingLanes = root2.pendingLanes;
          if (remainingLanes === 0 && (legacyErrorBoundariesThatAlreadyFailed = null), lanesToEventPriority(lanes), finishedWork = finishedWork.stateNode, injectedHook && typeof injectedHook.onCommitFiberRoot == "function")
            try {
              injectedHook.onCommitFiberRoot(
                rendererID,
                finishedWork,
                void 0,
                (finishedWork.current.flags & 128) === 128
              );
            } catch (err) {
            }
          if (recoverableErrors !== null) {
            finishedWork = ReactSharedInternals.T, remainingLanes = ReactDOMSharedInternals.p, ReactDOMSharedInternals.p = 2, ReactSharedInternals.T = null;
            try {
              for (var onRecoverableError = root2.onRecoverableError, i = 0; i < recoverableErrors.length; i++) {
                var recoverableError = recoverableErrors[i];
                onRecoverableError(recoverableError.value, {
                  componentStack: recoverableError.stack
                });
              }
            } finally {
              ReactSharedInternals.T = finishedWork, ReactDOMSharedInternals.p = remainingLanes;
            }
          }
          (pendingEffectsLanes & 3) !== 0 && flushPendingEffects(), ensureRootIsScheduled(root2), remainingLanes = root2.pendingLanes, (lanes & 261930) !== 0 && (remainingLanes & 42) !== 0 ? root2 === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = root2) : nestedUpdateCount = 0, flushSyncWorkAcrossRoots_impl(0, !1);
        }
      }
      function releaseRootPooledCache(root2, remainingLanes) {
        (root2.pooledCacheLanes &= remainingLanes) === 0 && (remainingLanes = root2.pooledCache, remainingLanes != null && (root2.pooledCache = null, releaseCache(remainingLanes)));
      }
      function flushPendingEffects() {
        return flushMutationEffects(), flushLayoutEffects(), flushSpawnedWork(), flushPassiveEffects();
      }
      function flushPassiveEffects() {
        if (pendingEffectsStatus !== 5) return !1;
        var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
        pendingEffectsRemainingLanes = 0;
        var renderPriority = lanesToEventPriority(pendingEffectsLanes), prevTransition = ReactSharedInternals.T, previousPriority = ReactDOMSharedInternals.p;
        try {
          ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority, ReactSharedInternals.T = null, renderPriority = pendingPassiveTransitions, pendingPassiveTransitions = null;
          var root$jscomp$0 = pendingEffectsRoot, lanes = pendingEffectsLanes;
          if (pendingEffectsStatus = 0, pendingFinishedWork = pendingEffectsRoot = null, pendingEffectsLanes = 0, (executionContext & 6) !== 0) throw Error(formatProdErrorMessage(331));
          var prevExecutionContext = executionContext;
          if (executionContext |= 4, commitPassiveUnmountOnFiber(root$jscomp$0.current), commitPassiveMountOnFiber(
            root$jscomp$0,
            root$jscomp$0.current,
            lanes,
            renderPriority
          ), executionContext = prevExecutionContext, flushSyncWorkAcrossRoots_impl(0, !1), injectedHook && typeof injectedHook.onPostCommitFiberRoot == "function")
            try {
              injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
            } catch (err) {
            }
          return !0;
        } finally {
          ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition, releaseRootPooledCache(root2, remainingLanes);
        }
      }
      function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
        sourceFiber = createCapturedValueAtFiber(error, sourceFiber), sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2), rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2), rootFiber !== null && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
      }
      function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
        if (sourceFiber.tag === 3)
          captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
        else
          for (; nearestMountedAncestor !== null; ) {
            if (nearestMountedAncestor.tag === 3) {
              captureCommitPhaseErrorOnRoot(
                nearestMountedAncestor,
                sourceFiber,
                error
              );
              break;
            } else if (nearestMountedAncestor.tag === 1) {
              var instance = nearestMountedAncestor.stateNode;
              if (typeof nearestMountedAncestor.type.getDerivedStateFromError == "function" || typeof instance.componentDidCatch == "function" && (legacyErrorBoundariesThatAlreadyFailed === null || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
                sourceFiber = createCapturedValueAtFiber(error, sourceFiber), error = createClassErrorUpdate(2), instance = enqueueUpdate(nearestMountedAncestor, error, 2), instance !== null && (initializeClassErrorUpdate(
                  error,
                  instance,
                  nearestMountedAncestor,
                  sourceFiber
                ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
                break;
              }
            }
            nearestMountedAncestor = nearestMountedAncestor.return;
          }
      }
      function attachPingListener(root2, wakeable, lanes) {
        var pingCache = root2.pingCache;
        if (pingCache === null) {
          pingCache = root2.pingCache = new PossiblyWeakMap();
          var threadIDs = /* @__PURE__ */ new Set();
          pingCache.set(wakeable, threadIDs);
        } else
          threadIDs = pingCache.get(wakeable), threadIDs === void 0 && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
        threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = !0, threadIDs.add(lanes), root2 = pingSuspendedRoot.bind(null, root2, wakeable, lanes), wakeable.then(root2, root2));
      }
      function pingSuspendedRoot(root2, wakeable, pingedLanes) {
        var pingCache = root2.pingCache;
        pingCache !== null && pingCache.delete(wakeable), root2.pingedLanes |= root2.suspendedLanes & pingedLanes, root2.warmLanes &= ~pingedLanes, workInProgressRoot === root2 && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (workInProgressRootExitStatus === 4 || workInProgressRootExitStatus === 3 && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && 300 > now() - globalMostRecentFallbackTime ? (executionContext & 2) === 0 && prepareFreshStack(root2, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0)), ensureRootIsScheduled(root2);
      }
      function retryTimedOutBoundary(boundaryFiber, retryLane) {
        retryLane === 0 && (retryLane = claimNextRetryLane()), boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane), boundaryFiber !== null && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
      }
      function retryDehydratedSuspenseBoundary(boundaryFiber) {
        var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
        suspenseState !== null && (retryLane = suspenseState.retryLane), retryTimedOutBoundary(boundaryFiber, retryLane);
      }
      function resolveRetryWakeable(boundaryFiber, wakeable) {
        var retryLane = 0;
        switch (boundaryFiber.tag) {
          case 31:
          case 13:
            var retryCache = boundaryFiber.stateNode, suspenseState = boundaryFiber.memoizedState;
            suspenseState !== null && (retryLane = suspenseState.retryLane);
            break;
          case 19:
            retryCache = boundaryFiber.stateNode;
            break;
          case 22:
            retryCache = boundaryFiber.stateNode._retryCache;
            break;
          default:
            throw Error(formatProdErrorMessage(314));
        }
        retryCache !== null && retryCache.delete(wakeable), retryTimedOutBoundary(boundaryFiber, retryLane);
      }
      function scheduleCallback$1(priorityLevel, callback) {
        return scheduleCallback$3(priorityLevel, callback);
      }
      var firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = !1, mightHavePendingSyncWork = !1, isFlushingWork = !1, currentEventTransitionLane = 0;
      function ensureRootIsScheduled(root2) {
        root2 !== lastScheduledRoot && root2.next === null && (lastScheduledRoot === null ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2), mightHavePendingSyncWork = !0, didScheduleMicrotask || (didScheduleMicrotask = !0, scheduleImmediateRootScheduleTask());
      }
      function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
        if (!isFlushingWork && mightHavePendingSyncWork) {
          isFlushingWork = !0;
          do
            for (var didPerformSomeWork = !1, root$170 = firstScheduledRoot; root$170 !== null; ) {
              if (!onlyLegacy)
                if (syncTransitionLanes !== 0) {
                  var pendingLanes = root$170.pendingLanes;
                  if (pendingLanes === 0) var JSCompiler_inline_result = 0;
                  else {
                    var suspendedLanes = root$170.suspendedLanes, pingedLanes = root$170.pingedLanes;
                    JSCompiler_inline_result = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1, JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes), JSCompiler_inline_result = JSCompiler_inline_result & 201326741 ? JSCompiler_inline_result & 201326741 | 1 : JSCompiler_inline_result ? JSCompiler_inline_result | 2 : 0;
                  }
                  JSCompiler_inline_result !== 0 && (didPerformSomeWork = !0, performSyncWorkOnRoot(root$170, JSCompiler_inline_result));
                } else
                  JSCompiler_inline_result = workInProgressRootRenderLanes, JSCompiler_inline_result = getNextLanes(
                    root$170,
                    root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,
                    root$170.cancelPendingCommit !== null || root$170.timeoutHandle !== -1
                  ), (JSCompiler_inline_result & 3) === 0 || checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) || (didPerformSomeWork = !0, performSyncWorkOnRoot(root$170, JSCompiler_inline_result));
              root$170 = root$170.next;
            }
          while (didPerformSomeWork);
          isFlushingWork = !1;
        }
      }
      function processRootScheduleInImmediateTask() {
        processRootScheduleInMicrotask();
      }
      function processRootScheduleInMicrotask() {
        mightHavePendingSyncWork = didScheduleMicrotask = !1;
        var syncTransitionLanes = 0;
        currentEventTransitionLane !== 0 && shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane);
        for (var currentTime = now(), prev = null, root2 = firstScheduledRoot; root2 !== null; ) {
          var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
          nextLanes === 0 ? (root2.next = null, prev === null ? firstScheduledRoot = next : prev.next = next, next === null && (lastScheduledRoot = prev)) : (prev = root2, (syncTransitionLanes !== 0 || (nextLanes & 3) !== 0) && (mightHavePendingSyncWork = !0)), root2 = next;
        }
        pendingEffectsStatus !== 0 && pendingEffectsStatus !== 5 || flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1), currentEventTransitionLane !== 0 && (currentEventTransitionLane = 0);
      }
      function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
        for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
          var index$5 = 31 - clz32(lanes), lane = 1 << index$5, expirationTime = expirationTimes[index$5];
          expirationTime === -1 ? ((lane & suspendedLanes) === 0 || (lane & pingedLanes) !== 0) && (expirationTimes[index$5] = computeExpirationTime(lane, currentTime)) : expirationTime <= currentTime && (root2.expiredLanes |= lane), lanes &= ~lane;
        }
        if (currentTime = workInProgressRoot, suspendedLanes = workInProgressRootRenderLanes, suspendedLanes = getNextLanes(
          root2,
          root2 === currentTime ? suspendedLanes : 0,
          root2.cancelPendingCommit !== null || root2.timeoutHandle !== -1
        ), pingedLanes = root2.callbackNode, suspendedLanes === 0 || root2 === currentTime && (workInProgressSuspendedReason === 2 || workInProgressSuspendedReason === 9) || root2.cancelPendingCommit !== null)
          return pingedLanes !== null && pingedLanes !== null && cancelCallback$1(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
        if ((suspendedLanes & 3) === 0 || checkIfRootIsPrerendering(root2, suspendedLanes)) {
          if (currentTime = suspendedLanes & -suspendedLanes, currentTime === root2.callbackPriority) return currentTime;
          switch (pingedLanes !== null && cancelCallback$1(pingedLanes), lanesToEventPriority(suspendedLanes)) {
            case 2:
            case 8:
              suspendedLanes = UserBlockingPriority;
              break;
            case 32:
              suspendedLanes = NormalPriority$1;
              break;
            case 268435456:
              suspendedLanes = IdlePriority;
              break;
            default:
              suspendedLanes = NormalPriority$1;
          }
          return pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2), suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes), root2.callbackPriority = currentTime, root2.callbackNode = suspendedLanes, currentTime;
        }
        return pingedLanes !== null && pingedLanes !== null && cancelCallback$1(pingedLanes), root2.callbackPriority = 2, root2.callbackNode = null, 2;
      }
      function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
        if (pendingEffectsStatus !== 0 && pendingEffectsStatus !== 5)
          return root2.callbackNode = null, root2.callbackPriority = 0, null;
        var originalCallbackNode = root2.callbackNode;
        if (flushPendingEffects() && root2.callbackNode !== originalCallbackNode)
          return null;
        var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
        return workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
          root2,
          root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
          root2.cancelPendingCommit !== null || root2.timeoutHandle !== -1
        ), workInProgressRootRenderLanes$jscomp$0 === 0 ? null : (performWorkOnRoot(root2, workInProgressRootRenderLanes$jscomp$0, didTimeout), scheduleTaskForRootDuringMicrotask(root2, now()), root2.callbackNode != null && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null);
      }
      function performSyncWorkOnRoot(root2, lanes) {
        if (flushPendingEffects()) return null;
        performWorkOnRoot(root2, lanes, !0);
      }
      function scheduleImmediateRootScheduleTask() {
        scheduleMicrotask(function() {
          (executionContext & 6) !== 0 ? scheduleCallback$3(
            ImmediatePriority,
            processRootScheduleInImmediateTask
          ) : processRootScheduleInMicrotask();
        });
      }
      function requestTransitionLane() {
        if (currentEventTransitionLane === 0) {
          var actionScopeLane = currentEntangledLane;
          actionScopeLane === 0 && (actionScopeLane = nextTransitionUpdateLane, nextTransitionUpdateLane <<= 1, (nextTransitionUpdateLane & 261888) === 0 && (nextTransitionUpdateLane = 256)), currentEventTransitionLane = actionScopeLane;
        }
        return currentEventTransitionLane;
      }
      function coerceFormActionProp(actionProp) {
        return actionProp == null || typeof actionProp == "symbol" || typeof actionProp == "boolean" ? null : typeof actionProp == "function" ? actionProp : sanitizeURL("" + actionProp);
      }
      function createFormDataWithSubmitter(form, submitter) {
        var temp = submitter.ownerDocument.createElement("input");
        return temp.name = submitter.name, temp.value = submitter.value, form.id && temp.setAttribute("form", form.id), submitter.parentNode.insertBefore(temp, submitter), form = new FormData(form), temp.parentNode.removeChild(temp), form;
      }
      function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
        if (domEventName === "submit" && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
          var action = coerceFormActionProp(
            (nativeEventTarget[internalPropsKey] || null).action
          ), submitter = nativeEvent.submitter;
          submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), domEventName !== null && (action = domEventName, submitter = null));
          var event = new SyntheticEvent(
            "action",
            "action",
            null,
            nativeEvent,
            nativeEventTarget
          );
          dispatchQueue.push({
            event,
            listeners: [
              {
                instance: null,
                listener: function() {
                  if (nativeEvent.defaultPrevented) {
                    if (currentEventTransitionLane !== 0) {
                      var formData = submitter ? createFormDataWithSubmitter(nativeEventTarget, submitter) : new FormData(nativeEventTarget);
                      startHostTransition(
                        maybeTargetInst,
                        {
                          pending: !0,
                          data: formData,
                          method: nativeEventTarget.method,
                          action
                        },
                        null,
                        formData
                      );
                    }
                  } else
                    typeof action == "function" && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(nativeEventTarget, submitter) : new FormData(nativeEventTarget), startHostTransition(
                      maybeTargetInst,
                      {
                        pending: !0,
                        data: formData,
                        method: nativeEventTarget.method,
                        action
                      },
                      action,
                      formData
                    ));
                },
                currentTarget: nativeEventTarget
              }
            ]
          });
        }
      }
      for (i$jscomp$inline_1577 = 0; i$jscomp$inline_1577 < simpleEventPluginEvents.length; i$jscomp$inline_1577++)
        eventName$jscomp$inline_1578 = simpleEventPluginEvents[i$jscomp$inline_1577], domEventName$jscomp$inline_1579 = eventName$jscomp$inline_1578.toLowerCase(), capitalizedEvent$jscomp$inline_1580 = eventName$jscomp$inline_1578[0].toUpperCase() + eventName$jscomp$inline_1578.slice(1), registerSimpleEvent(
          domEventName$jscomp$inline_1579,
          "on" + capitalizedEvent$jscomp$inline_1580
        );
      var eventName$jscomp$inline_1578, domEventName$jscomp$inline_1579, capitalizedEvent$jscomp$inline_1580, i$jscomp$inline_1577;
      registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
      registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
      registerSimpleEvent(ANIMATION_START, "onAnimationStart");
      registerSimpleEvent("dblclick", "onDoubleClick");
      registerSimpleEvent("focusin", "onFocus");
      registerSimpleEvent("focusout", "onBlur");
      registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
      registerSimpleEvent(TRANSITION_START, "onTransitionStart");
      registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
      registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
      registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
      registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
      registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
      registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
      registerTwoPhaseEvent(
        "onChange",
        "change click focusin focusout input keydown keyup selectionchange".split(" ")
      );
      registerTwoPhaseEvent(
        "onSelect",
        "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
          " "
        )
      );
      registerTwoPhaseEvent("onBeforeInput", [
        "compositionend",
        "keypress",
        "textInput",
        "paste"
      ]);
      registerTwoPhaseEvent(
        "onCompositionEnd",
        "compositionend focusout keydown keypress keyup mousedown".split(" ")
      );
      registerTwoPhaseEvent(
        "onCompositionStart",
        "compositionstart focusout keydown keypress keyup mousedown".split(" ")
      );
      registerTwoPhaseEvent(
        "onCompositionUpdate",
        "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
      );
      var mediaEventTypes = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
        " "
      ), nonDelegatedEvents = new Set(
        "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
      );
      function processDispatchQueue(dispatchQueue, eventSystemFlags) {
        eventSystemFlags = (eventSystemFlags & 4) !== 0;
        for (var i = 0; i < dispatchQueue.length; i++) {
          var _dispatchQueue$i = dispatchQueue[i], event = _dispatchQueue$i.event;
          _dispatchQueue$i = _dispatchQueue$i.listeners;
          a: {
            var previousInstance = void 0;
            if (eventSystemFlags)
              for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
                var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
                if (_dispatchListeners$i = _dispatchListeners$i.listener, instance !== previousInstance && event.isPropagationStopped())
                  break a;
                previousInstance = _dispatchListeners$i, event.currentTarget = currentTarget;
                try {
                  previousInstance(event);
                } catch (error) {
                  reportGlobalError(error);
                }
                event.currentTarget = null, previousInstance = instance;
              }
            else
              for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
                if (_dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget, _dispatchListeners$i = _dispatchListeners$i.listener, instance !== previousInstance && event.isPropagationStopped())
                  break a;
                previousInstance = _dispatchListeners$i, event.currentTarget = currentTarget;
                try {
                  previousInstance(event);
                } catch (error) {
                  reportGlobalError(error);
                }
                event.currentTarget = null, previousInstance = instance;
              }
          }
        }
      }
      function listenToNonDelegatedEvent(domEventName, targetElement) {
        var JSCompiler_inline_result = targetElement[internalEventHandlersKey];
        JSCompiler_inline_result === void 0 && (JSCompiler_inline_result = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
        var listenerSetKey = domEventName + "__bubble";
        JSCompiler_inline_result.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, !1), JSCompiler_inline_result.add(listenerSetKey));
      }
      function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
        var eventSystemFlags = 0;
        isCapturePhaseListener && (eventSystemFlags |= 4), addTrappedEventListener(
          target,
          domEventName,
          eventSystemFlags,
          isCapturePhaseListener
        );
      }
      var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
      function listenToAllSupportedEvents(rootContainerElement) {
        if (!rootContainerElement[listeningMarker]) {
          rootContainerElement[listeningMarker] = !0, allNativeEvents.forEach(function(domEventName) {
            domEventName !== "selectionchange" && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, !1, rootContainerElement), listenToNativeEvent(domEventName, !0, rootContainerElement));
          });
          var ownerDocument = rootContainerElement.nodeType === 9 ? rootContainerElement : rootContainerElement.ownerDocument;
          ownerDocument === null || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = !0, listenToNativeEvent("selectionchange", !1, ownerDocument));
        }
      }
      function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
        switch (getEventPriority(domEventName)) {
          case 2:
            var listenerWrapper = dispatchDiscreteEvent;
            break;
          case 8:
            listenerWrapper = dispatchContinuousEvent;
            break;
          default:
            listenerWrapper = dispatchEvent;
        }
        eventSystemFlags = listenerWrapper.bind(
          null,
          domEventName,
          eventSystemFlags,
          targetContainer
        ), listenerWrapper = void 0, !passiveBrowserEventsSupported || domEventName !== "touchstart" && domEventName !== "touchmove" && domEventName !== "wheel" || (listenerWrapper = !0), isCapturePhaseListener ? listenerWrapper !== void 0 ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
          capture: !0,
          passive: listenerWrapper
        }) : targetContainer.addEventListener(domEventName, eventSystemFlags, !0) : listenerWrapper !== void 0 ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
          passive: listenerWrapper
        }) : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
      }
      function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
        var ancestorInst = targetInst$jscomp$0;
        if ((eventSystemFlags & 1) === 0 && (eventSystemFlags & 2) === 0 && targetInst$jscomp$0 !== null)
          a: for (; ; ) {
            if (targetInst$jscomp$0 === null) return;
            var nodeTag = targetInst$jscomp$0.tag;
            if (nodeTag === 3 || nodeTag === 4) {
              var container = targetInst$jscomp$0.stateNode.containerInfo;
              if (container === targetContainer) break;
              if (nodeTag === 4)
                for (nodeTag = targetInst$jscomp$0.return; nodeTag !== null; ) {
                  var grandTag = nodeTag.tag;
                  if ((grandTag === 3 || grandTag === 4) && nodeTag.stateNode.containerInfo === targetContainer)
                    return;
                  nodeTag = nodeTag.return;
                }
              for (; container !== null; ) {
                if (nodeTag = getClosestInstanceFromNode(container), nodeTag === null) return;
                if (grandTag = nodeTag.tag, grandTag === 5 || grandTag === 6 || grandTag === 26 || grandTag === 27) {
                  targetInst$jscomp$0 = ancestorInst = nodeTag;
                  continue a;
                }
                container = container.parentNode;
              }
            }
            targetInst$jscomp$0 = targetInst$jscomp$0.return;
          }
        batchedUpdates$1(function() {
          var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
          a: {
            var reactName = topLevelEventsToReactNames.get(domEventName);
            if (reactName !== void 0) {
              var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
              switch (domEventName) {
                case "keypress":
                  if (getEventCharCode(nativeEvent) === 0) break a;
                case "keydown":
                case "keyup":
                  SyntheticEventCtor = SyntheticKeyboardEvent;
                  break;
                case "focusin":
                  reactEventType = "focus", SyntheticEventCtor = SyntheticFocusEvent;
                  break;
                case "focusout":
                  reactEventType = "blur", SyntheticEventCtor = SyntheticFocusEvent;
                  break;
                case "beforeblur":
                case "afterblur":
                  SyntheticEventCtor = SyntheticFocusEvent;
                  break;
                case "click":
                  if (nativeEvent.button === 2) break a;
                case "auxclick":
                case "dblclick":
                case "mousedown":
                case "mousemove":
                case "mouseup":
                case "mouseout":
                case "mouseover":
                case "contextmenu":
                  SyntheticEventCtor = SyntheticMouseEvent;
                  break;
                case "drag":
                case "dragend":
                case "dragenter":
                case "dragexit":
                case "dragleave":
                case "dragover":
                case "dragstart":
                case "drop":
                  SyntheticEventCtor = SyntheticDragEvent;
                  break;
                case "touchcancel":
                case "touchend":
                case "touchmove":
                case "touchstart":
                  SyntheticEventCtor = SyntheticTouchEvent;
                  break;
                case ANIMATION_END:
                case ANIMATION_ITERATION:
                case ANIMATION_START:
                  SyntheticEventCtor = SyntheticAnimationEvent;
                  break;
                case TRANSITION_END:
                  SyntheticEventCtor = SyntheticTransitionEvent;
                  break;
                case "scroll":
                case "scrollend":
                  SyntheticEventCtor = SyntheticUIEvent;
                  break;
                case "wheel":
                  SyntheticEventCtor = SyntheticWheelEvent;
                  break;
                case "copy":
                case "cut":
                case "paste":
                  SyntheticEventCtor = SyntheticClipboardEvent;
                  break;
                case "gotpointercapture":
                case "lostpointercapture":
                case "pointercancel":
                case "pointerdown":
                case "pointermove":
                case "pointerout":
                case "pointerover":
                case "pointerup":
                  SyntheticEventCtor = SyntheticPointerEvent;
                  break;
                case "toggle":
                case "beforetoggle":
                  SyntheticEventCtor = SyntheticToggleEvent;
              }
              var inCapturePhase = (eventSystemFlags & 4) !== 0, accumulateTargetOnly = !inCapturePhase && (domEventName === "scroll" || domEventName === "scrollend"), reactEventName = inCapturePhase ? reactName !== null ? reactName + "Capture" : null : reactName;
              inCapturePhase = [];
              for (var instance = targetInst, lastHostComponent; instance !== null; ) {
                var _instance = instance;
                if (lastHostComponent = _instance.stateNode, _instance = _instance.tag, _instance !== 5 && _instance !== 26 && _instance !== 27 || lastHostComponent === null || reactEventName === null || (_instance = getListener(instance, reactEventName), _instance != null && inCapturePhase.push(
                  createDispatchListener(instance, _instance, lastHostComponent)
                )), accumulateTargetOnly) break;
                instance = instance.return;
              }
              0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
                reactName,
                reactEventType,
                null,
                nativeEvent,
                nativeEventTarget
              ), dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));
            }
          }
          if ((eventSystemFlags & 7) === 0) {
            a: {
              if (reactName = domEventName === "mouseover" || domEventName === "pointerover", SyntheticEventCtor = domEventName === "mouseout" || domEventName === "pointerout", reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
                break a;
              if ((SyntheticEventCtor || reactName) && (reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window, SyntheticEventCtor ? (reactEventType = nativeEvent.relatedTarget || nativeEvent.toElement, SyntheticEventCtor = targetInst, reactEventType = reactEventType ? getClosestInstanceFromNode(reactEventType) : null, reactEventType !== null && (accumulateTargetOnly = getNearestMountedFiber(reactEventType), inCapturePhase = reactEventType.tag, reactEventType !== accumulateTargetOnly || inCapturePhase !== 5 && inCapturePhase !== 27 && inCapturePhase !== 6) && (reactEventType = null)) : (SyntheticEventCtor = null, reactEventType = targetInst), SyntheticEventCtor !== reactEventType)) {
                if (inCapturePhase = SyntheticMouseEvent, _instance = "onMouseLeave", reactEventName = "onMouseEnter", instance = "mouse", (domEventName === "pointerout" || domEventName === "pointerover") && (inCapturePhase = SyntheticPointerEvent, _instance = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer"), accumulateTargetOnly = SyntheticEventCtor == null ? reactName : getNodeFromInstance(SyntheticEventCtor), lastHostComponent = reactEventType == null ? reactName : getNodeFromInstance(reactEventType), reactName = new inCapturePhase(
                  _instance,
                  instance + "leave",
                  SyntheticEventCtor,
                  nativeEvent,
                  nativeEventTarget
                ), reactName.target = accumulateTargetOnly, reactName.relatedTarget = lastHostComponent, _instance = null, getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
                  reactEventName,
                  instance + "enter",
                  reactEventType,
                  nativeEvent,
                  nativeEventTarget
                ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance = inCapturePhase), accumulateTargetOnly = _instance, SyntheticEventCtor && reactEventType)
                  b: {
                    for (inCapturePhase = getParent, reactEventName = SyntheticEventCtor, instance = reactEventType, lastHostComponent = 0, _instance = reactEventName; _instance; _instance = inCapturePhase(_instance))
                      lastHostComponent++;
                    _instance = 0;
                    for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
                      _instance++;
                    for (; 0 < lastHostComponent - _instance; )
                      reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
                    for (; 0 < _instance - lastHostComponent; )
                      instance = inCapturePhase(instance), _instance--;
                    for (; lastHostComponent--; ) {
                      if (reactEventName === instance || instance !== null && reactEventName === instance.alternate) {
                        inCapturePhase = reactEventName;
                        break b;
                      }
                      reactEventName = inCapturePhase(reactEventName), instance = inCapturePhase(instance);
                    }
                    inCapturePhase = null;
                  }
                else inCapturePhase = null;
                SyntheticEventCtor !== null && accumulateEnterLeaveListenersForEvent(
                  dispatchQueue,
                  reactName,
                  SyntheticEventCtor,
                  inCapturePhase,
                  !1
                ), reactEventType !== null && accumulateTargetOnly !== null && accumulateEnterLeaveListenersForEvent(
                  dispatchQueue,
                  accumulateTargetOnly,
                  reactEventType,
                  inCapturePhase,
                  !0
                );
              }
            }
            a: {
              if (reactName = targetInst ? getNodeFromInstance(targetInst) : window, SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase(), SyntheticEventCtor === "select" || SyntheticEventCtor === "input" && reactName.type === "file")
                var getTargetInstFunc = getTargetInstForChangeEvent;
              else if (isTextInputElement(reactName))
                if (isInputEventSupported)
                  getTargetInstFunc = getTargetInstForInputOrChangeEvent;
                else {
                  getTargetInstFunc = getTargetInstForInputEventPolyfill;
                  var handleEventFunc = handleEventsForInputEventPolyfill;
                }
              else
                SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || SyntheticEventCtor.toLowerCase() !== "input" || reactName.type !== "checkbox" && reactName.type !== "radio" ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
              if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
                createAndAccumulateChangeEvent(
                  dispatchQueue,
                  getTargetInstFunc,
                  nativeEvent,
                  nativeEventTarget
                );
                break a;
              }
              handleEventFunc && handleEventFunc(domEventName, reactName, targetInst), domEventName === "focusout" && targetInst && reactName.type === "number" && targetInst.memoizedProps.value != null && setDefaultValue(reactName, "number", reactName.value);
            }
            switch (handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window, domEventName) {
              case "focusin":
                (isTextInputElement(handleEventFunc) || handleEventFunc.contentEditable === "true") && (activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null);
                break;
              case "focusout":
                lastSelection = activeElementInst = activeElement = null;
                break;
              case "mousedown":
                mouseDown = !0;
                break;
              case "contextmenu":
              case "mouseup":
              case "dragend":
                mouseDown = !1, constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
                break;
              case "selectionchange":
                if (skipSelectionChangeEvent) break;
              case "keydown":
              case "keyup":
                constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
            }
            var fallbackData;
            if (canUseCompositionEvent)
              b: {
                switch (domEventName) {
                  case "compositionstart":
                    var eventType = "onCompositionStart";
                    break b;
                  case "compositionend":
                    eventType = "onCompositionEnd";
                    break b;
                  case "compositionupdate":
                    eventType = "onCompositionUpdate";
                    break b;
                }
                eventType = void 0;
              }
            else
              isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : domEventName === "keydown" && nativeEvent.keyCode === 229 && (eventType = "onCompositionStart");
            eventType && (useFallbackCompositionData && nativeEvent.locale !== "ko" && (isComposing || eventType !== "onCompositionStart" ? eventType === "onCompositionEnd" && isComposing && (fallbackData = getData()) : (root = nativeEventTarget, startText = "value" in root ? root.value : root.textContent, isComposing = !0)), handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
              eventType,
              domEventName,
              null,
              nativeEvent,
              nativeEventTarget
            ), dispatchQueue.push({ event: eventType, listeners: handleEventFunc }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), fallbackData !== null && (eventType.data = fallbackData)))), (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent)) && (eventType = accumulateTwoPhaseListeners(targetInst, "onBeforeInput"), 0 < eventType.length && (handleEventFunc = new SyntheticCompositionEvent(
              "onBeforeInput",
              "beforeinput",
              null,
              nativeEvent,
              nativeEventTarget
            ), dispatchQueue.push({
              event: handleEventFunc,
              listeners: eventType
            }), handleEventFunc.data = fallbackData)), extractEvents$1(
              dispatchQueue,
              domEventName,
              targetInst,
              nativeEvent,
              nativeEventTarget
            );
          }
          processDispatchQueue(dispatchQueue, eventSystemFlags);
        });
      }
      function createDispatchListener(instance, listener, currentTarget) {
        return {
          instance,
          listener,
          currentTarget
        };
      }
      function accumulateTwoPhaseListeners(targetFiber, reactName) {
        for (var captureName = reactName + "Capture", listeners = []; targetFiber !== null; ) {
          var _instance2 = targetFiber, stateNode = _instance2.stateNode;
          if (_instance2 = _instance2.tag, _instance2 !== 5 && _instance2 !== 26 && _instance2 !== 27 || stateNode === null || (_instance2 = getListener(targetFiber, captureName), _instance2 != null && listeners.unshift(
            createDispatchListener(targetFiber, _instance2, stateNode)
          ), _instance2 = getListener(targetFiber, reactName), _instance2 != null && listeners.push(
            createDispatchListener(targetFiber, _instance2, stateNode)
          )), targetFiber.tag === 3) return listeners;
          targetFiber = targetFiber.return;
        }
        return [];
      }
      function getParent(inst) {
        if (inst === null) return null;
        do
          inst = inst.return;
        while (inst && inst.tag !== 5 && inst.tag !== 27);
        return inst || null;
      }
      function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
        for (var registrationName = event._reactName, listeners = []; target !== null && target !== common; ) {
          var _instance3 = target, alternate = _instance3.alternate, stateNode = _instance3.stateNode;
          if (_instance3 = _instance3.tag, alternate !== null && alternate === common) break;
          _instance3 !== 5 && _instance3 !== 26 && _instance3 !== 27 || stateNode === null || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), stateNode != null && listeners.unshift(
            createDispatchListener(target, stateNode, alternate)
          )) : inCapturePhase || (stateNode = getListener(target, registrationName), stateNode != null && listeners.push(
            createDispatchListener(target, stateNode, alternate)
          ))), target = target.return;
        }
        listeners.length !== 0 && dispatchQueue.push({ event, listeners });
      }
      var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
      function normalizeMarkupForTextOrAttribute(markup) {
        return (typeof markup == "string" ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, `
`).replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
      }
      function checkForUnmatchedText(serverText, clientText) {
        return clientText = normalizeMarkupForTextOrAttribute(clientText), normalizeMarkupForTextOrAttribute(serverText) === clientText;
      }
      function setProp(domElement, tag, key, value, props, prevValue) {
        switch (key) {
          case "children":
            typeof value == "string" ? tag === "body" || tag === "textarea" && value === "" || setTextContent(domElement, value) : (typeof value == "number" || typeof value == "bigint") && tag !== "body" && setTextContent(domElement, "" + value);
            break;
          case "className":
            setValueForKnownAttribute(domElement, "class", value);
            break;
          case "tabIndex":
            setValueForKnownAttribute(domElement, "tabindex", value);
            break;
          case "dir":
          case "role":
          case "viewBox":
          case "width":
          case "height":
            setValueForKnownAttribute(domElement, key, value);
            break;
          case "style":
            setValueForStyles(domElement, value, prevValue);
            break;
          case "data":
            if (tag !== "object") {
              setValueForKnownAttribute(domElement, "data", value);
              break;
            }
          case "src":
          case "href":
            if (value === "" && (tag !== "a" || key !== "href")) {
              domElement.removeAttribute(key);
              break;
            }
            if (value == null || typeof value == "function" || typeof value == "symbol" || typeof value == "boolean") {
              domElement.removeAttribute(key);
              break;
            }
            value = sanitizeURL("" + value), domElement.setAttribute(key, value);
            break;
          case "action":
          case "formAction":
            if (typeof value == "function") {
              domElement.setAttribute(
                key,
                "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
              );
              break;
            } else
              typeof prevValue == "function" && (key === "formAction" ? (tag !== "input" && setProp(domElement, tag, "name", props.name, props, null), setProp(
                domElement,
                tag,
                "formEncType",
                props.formEncType,
                props,
                null
              ), setProp(
                domElement,
                tag,
                "formMethod",
                props.formMethod,
                props,
                null
              ), setProp(
                domElement,
                tag,
                "formTarget",
                props.formTarget,
                props,
                null
              )) : (setProp(domElement, tag, "encType", props.encType, props, null), setProp(domElement, tag, "method", props.method, props, null), setProp(domElement, tag, "target", props.target, props, null)));
            if (value == null || typeof value == "symbol" || typeof value == "boolean") {
              domElement.removeAttribute(key);
              break;
            }
            value = sanitizeURL("" + value), domElement.setAttribute(key, value);
            break;
          case "onClick":
            value != null && (domElement.onclick = noop$1);
            break;
          case "onScroll":
            value != null && listenToNonDelegatedEvent("scroll", domElement);
            break;
          case "onScrollEnd":
            value != null && listenToNonDelegatedEvent("scrollend", domElement);
            break;
          case "dangerouslySetInnerHTML":
            if (value != null) {
              if (typeof value != "object" || !("__html" in value))
                throw Error(formatProdErrorMessage(61));
              if (key = value.__html, key != null) {
                if (props.children != null) throw Error(formatProdErrorMessage(60));
                domElement.innerHTML = key;
              }
            }
            break;
          case "multiple":
            domElement.multiple = value && typeof value != "function" && typeof value != "symbol";
            break;
          case "muted":
            domElement.muted = value && typeof value != "function" && typeof value != "symbol";
            break;
          case "suppressContentEditableWarning":
          case "suppressHydrationWarning":
          case "defaultValue":
          case "defaultChecked":
          case "innerHTML":
          case "ref":
            break;
          case "autoFocus":
            break;
          case "xlinkHref":
            if (value == null || typeof value == "function" || typeof value == "boolean" || typeof value == "symbol") {
              domElement.removeAttribute("xlink:href");
              break;
            }
            key = sanitizeURL("" + value), domElement.setAttributeNS(
              "http://www.w3.org/1999/xlink",
              "xlink:href",
              key
            );
            break;
          case "contentEditable":
          case "spellCheck":
          case "draggable":
          case "value":
          case "autoReverse":
          case "externalResourcesRequired":
          case "focusable":
          case "preserveAlpha":
            value != null && typeof value != "function" && typeof value != "symbol" ? domElement.setAttribute(key, "" + value) : domElement.removeAttribute(key);
            break;
          case "inert":
          case "allowFullScreen":
          case "async":
          case "autoPlay":
          case "controls":
          case "default":
          case "defer":
          case "disabled":
          case "disablePictureInPicture":
          case "disableRemotePlayback":
          case "formNoValidate":
          case "hidden":
          case "loop":
          case "noModule":
          case "noValidate":
          case "open":
          case "playsInline":
          case "readOnly":
          case "required":
          case "reversed":
          case "scoped":
          case "seamless":
          case "itemScope":
            value && typeof value != "function" && typeof value != "symbol" ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
            break;
          case "capture":
          case "download":
            value === !0 ? domElement.setAttribute(key, "") : value !== !1 && value != null && typeof value != "function" && typeof value != "symbol" ? domElement.setAttribute(key, value) : domElement.removeAttribute(key);
            break;
          case "cols":
          case "rows":
          case "size":
          case "span":
            value != null && typeof value != "function" && typeof value != "symbol" && !isNaN(value) && 1 <= value ? domElement.setAttribute(key, value) : domElement.removeAttribute(key);
            break;
          case "rowSpan":
          case "start":
            value == null || typeof value == "function" || typeof value == "symbol" || isNaN(value) ? domElement.removeAttribute(key) : domElement.setAttribute(key, value);
            break;
          case "popover":
            listenToNonDelegatedEvent("beforetoggle", domElement), listenToNonDelegatedEvent("toggle", domElement), setValueForAttribute(domElement, "popover", value);
            break;
          case "xlinkActuate":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:actuate",
              value
            );
            break;
          case "xlinkArcrole":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:arcrole",
              value
            );
            break;
          case "xlinkRole":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:role",
              value
            );
            break;
          case "xlinkShow":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:show",
              value
            );
            break;
          case "xlinkTitle":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:title",
              value
            );
            break;
          case "xlinkType":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/1999/xlink",
              "xlink:type",
              value
            );
            break;
          case "xmlBase":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/XML/1998/namespace",
              "xml:base",
              value
            );
            break;
          case "xmlLang":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/XML/1998/namespace",
              "xml:lang",
              value
            );
            break;
          case "xmlSpace":
            setValueForNamespacedAttribute(
              domElement,
              "http://www.w3.org/XML/1998/namespace",
              "xml:space",
              value
            );
            break;
          case "is":
            setValueForAttribute(domElement, "is", value);
            break;
          case "innerText":
          case "textContent":
            break;
          default:
            (!(2 < key.length) || key[0] !== "o" && key[0] !== "O" || key[1] !== "n" && key[1] !== "N") && (key = aliases.get(key) || key, setValueForAttribute(domElement, key, value));
        }
      }
      function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
        switch (key) {
          case "style":
            setValueForStyles(domElement, value, prevValue);
            break;
          case "dangerouslySetInnerHTML":
            if (value != null) {
              if (typeof value != "object" || !("__html" in value))
                throw Error(formatProdErrorMessage(61));
              if (key = value.__html, key != null) {
                if (props.children != null) throw Error(formatProdErrorMessage(60));
                domElement.innerHTML = key;
              }
            }
            break;
          case "children":
            typeof value == "string" ? setTextContent(domElement, value) : (typeof value == "number" || typeof value == "bigint") && setTextContent(domElement, "" + value);
            break;
          case "onScroll":
            value != null && listenToNonDelegatedEvent("scroll", domElement);
            break;
          case "onScrollEnd":
            value != null && listenToNonDelegatedEvent("scrollend", domElement);
            break;
          case "onClick":
            value != null && (domElement.onclick = noop$1);
            break;
          case "suppressContentEditableWarning":
          case "suppressHydrationWarning":
          case "innerHTML":
          case "ref":
            break;
          case "innerText":
          case "textContent":
            break;
          default:
            if (!registrationNameDependencies.hasOwnProperty(key))
              a: {
                if (key[0] === "o" && key[1] === "n" && (props = key.endsWith("Capture"), tag = key.slice(2, props ? key.length - 7 : void 0), prevValue = domElement[internalPropsKey] || null, prevValue = prevValue != null ? prevValue[key] : null, typeof prevValue == "function" && domElement.removeEventListener(tag, prevValue, props), typeof value == "function")) {
                  typeof prevValue != "function" && prevValue !== null && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key)), domElement.addEventListener(tag, value, props);
                  break a;
                }
                key in domElement ? domElement[key] = value : value === !0 ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
              }
        }
      }
      function setInitialProperties(domElement, tag, props) {
        switch (tag) {
          case "div":
          case "span":
          case "svg":
          case "path":
          case "a":
          case "g":
          case "p":
          case "li":
            break;
          case "img":
            listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
            var hasSrc = !1, hasSrcSet = !1, propKey;
            for (propKey in props)
              if (props.hasOwnProperty(propKey)) {
                var propValue = props[propKey];
                if (propValue != null)
                  switch (propKey) {
                    case "src":
                      hasSrc = !0;
                      break;
                    case "srcSet":
                      hasSrcSet = !0;
                      break;
                    case "children":
                    case "dangerouslySetInnerHTML":
                      throw Error(formatProdErrorMessage(137, tag));
                    default:
                      setProp(domElement, tag, propKey, propValue, props, null);
                  }
              }
            hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null), hasSrc && setProp(domElement, tag, "src", props.src, props, null);
            return;
          case "input":
            listenToNonDelegatedEvent("invalid", domElement);
            var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
            for (hasSrc in props)
              if (props.hasOwnProperty(hasSrc)) {
                var propValue$184 = props[hasSrc];
                if (propValue$184 != null)
                  switch (hasSrc) {
                    case "name":
                      hasSrcSet = propValue$184;
                      break;
                    case "type":
                      propValue = propValue$184;
                      break;
                    case "checked":
                      checked = propValue$184;
                      break;
                    case "defaultChecked":
                      defaultChecked = propValue$184;
                      break;
                    case "value":
                      propKey = propValue$184;
                      break;
                    case "defaultValue":
                      defaultValue = propValue$184;
                      break;
                    case "children":
                    case "dangerouslySetInnerHTML":
                      if (propValue$184 != null)
                        throw Error(formatProdErrorMessage(137, tag));
                      break;
                    default:
                      setProp(domElement, tag, hasSrc, propValue$184, props, null);
                  }
              }
            initInput(
              domElement,
              propKey,
              defaultValue,
              checked,
              defaultChecked,
              propValue,
              hasSrcSet,
              !1
            );
            return;
          case "select":
            listenToNonDelegatedEvent("invalid", domElement), hasSrc = propValue = propKey = null;
            for (hasSrcSet in props)
              if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], defaultValue != null))
                switch (hasSrcSet) {
                  case "value":
                    propKey = defaultValue;
                    break;
                  case "defaultValue":
                    propValue = defaultValue;
                    break;
                  case "multiple":
                    hasSrc = defaultValue;
                  default:
                    setProp(domElement, tag, hasSrcSet, defaultValue, props, null);
                }
            tag = propKey, props = propValue, domElement.multiple = !!hasSrc, tag != null ? updateOptions(domElement, !!hasSrc, tag, !1) : props != null && updateOptions(domElement, !!hasSrc, props, !0);
            return;
          case "textarea":
            listenToNonDelegatedEvent("invalid", domElement), propKey = hasSrcSet = hasSrc = null;
            for (propValue in props)
              if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], defaultValue != null))
                switch (propValue) {
                  case "value":
                    hasSrc = defaultValue;
                    break;
                  case "defaultValue":
                    hasSrcSet = defaultValue;
                    break;
                  case "children":
                    propKey = defaultValue;
                    break;
                  case "dangerouslySetInnerHTML":
                    if (defaultValue != null) throw Error(formatProdErrorMessage(91));
                    break;
                  default:
                    setProp(domElement, tag, propValue, defaultValue, props, null);
                }
            initTextarea(domElement, hasSrc, hasSrcSet, propKey);
            return;
          case "option":
            for (checked in props)
              if (props.hasOwnProperty(checked) && (hasSrc = props[checked], hasSrc != null))
                switch (checked) {
                  case "selected":
                    domElement.selected = hasSrc && typeof hasSrc != "function" && typeof hasSrc != "symbol";
                    break;
                  default:
                    setProp(domElement, tag, checked, hasSrc, props, null);
                }
            return;
          case "dialog":
            listenToNonDelegatedEvent("beforetoggle", domElement), listenToNonDelegatedEvent("toggle", domElement), listenToNonDelegatedEvent("cancel", domElement), listenToNonDelegatedEvent("close", domElement);
            break;
          case "iframe":
          case "object":
            listenToNonDelegatedEvent("load", domElement);
            break;
          case "video":
          case "audio":
            for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
              listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
            break;
          case "image":
            listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
            break;
          case "details":
            listenToNonDelegatedEvent("toggle", domElement);
            break;
          case "embed":
          case "source":
          case "link":
            listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
          case "area":
          case "base":
          case "br":
          case "col":
          case "hr":
          case "keygen":
          case "meta":
          case "param":
          case "track":
          case "wbr":
          case "menuitem":
            for (defaultChecked in props)
              if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], hasSrc != null))
                switch (defaultChecked) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error(formatProdErrorMessage(137, tag));
                  default:
                    setProp(domElement, tag, defaultChecked, hasSrc, props, null);
                }
            return;
          default:
            if (isCustomElement(tag)) {
              for (propValue$184 in props)
                props.hasOwnProperty(propValue$184) && (hasSrc = props[propValue$184], hasSrc !== void 0 && setPropOnCustomElement(
                  domElement,
                  tag,
                  propValue$184,
                  hasSrc,
                  props,
                  void 0
                ));
              return;
            }
        }
        for (defaultValue in props)
          props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], hasSrc != null && setProp(domElement, tag, defaultValue, hasSrc, props, null));
      }
      function updateProperties(domElement, tag, lastProps, nextProps) {
        switch (tag) {
          case "div":
          case "span":
          case "svg":
          case "path":
          case "a":
          case "g":
          case "p":
          case "li":
            break;
          case "input":
            var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
            for (propKey in lastProps) {
              var lastProp = lastProps[propKey];
              if (lastProps.hasOwnProperty(propKey) && lastProp != null)
                switch (propKey) {
                  case "checked":
                    break;
                  case "value":
                    break;
                  case "defaultValue":
                    lastDefaultValue = lastProp;
                  default:
                    nextProps.hasOwnProperty(propKey) || setProp(domElement, tag, propKey, null, nextProps, lastProp);
                }
            }
            for (var propKey$201 in nextProps) {
              var propKey = nextProps[propKey$201];
              if (lastProp = lastProps[propKey$201], nextProps.hasOwnProperty(propKey$201) && (propKey != null || lastProp != null))
                switch (propKey$201) {
                  case "type":
                    type = propKey;
                    break;
                  case "name":
                    name = propKey;
                    break;
                  case "checked":
                    checked = propKey;
                    break;
                  case "defaultChecked":
                    defaultChecked = propKey;
                    break;
                  case "value":
                    value = propKey;
                    break;
                  case "defaultValue":
                    defaultValue = propKey;
                    break;
                  case "children":
                  case "dangerouslySetInnerHTML":
                    if (propKey != null)
                      throw Error(formatProdErrorMessage(137, tag));
                    break;
                  default:
                    propKey !== lastProp && setProp(
                      domElement,
                      tag,
                      propKey$201,
                      propKey,
                      nextProps,
                      lastProp
                    );
                }
            }
            updateInput(
              domElement,
              value,
              defaultValue,
              lastDefaultValue,
              checked,
              defaultChecked,
              type,
              name
            );
            return;
          case "select":
            propKey = value = defaultValue = propKey$201 = null;
            for (type in lastProps)
              if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && lastDefaultValue != null)
                switch (type) {
                  case "value":
                    break;
                  case "multiple":
                    propKey = lastDefaultValue;
                  default:
                    nextProps.hasOwnProperty(type) || setProp(
                      domElement,
                      tag,
                      type,
                      null,
                      nextProps,
                      lastDefaultValue
                    );
                }
            for (name in nextProps)
              if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (type != null || lastDefaultValue != null))
                switch (name) {
                  case "value":
                    propKey$201 = type;
                    break;
                  case "defaultValue":
                    defaultValue = type;
                    break;
                  case "multiple":
                    value = type;
                  default:
                    type !== lastDefaultValue && setProp(
                      domElement,
                      tag,
                      name,
                      type,
                      nextProps,
                      lastDefaultValue
                    );
                }
            tag = defaultValue, lastProps = value, nextProps = propKey, propKey$201 != null ? updateOptions(domElement, !!lastProps, propKey$201, !1) : !!nextProps != !!lastProps && (tag != null ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1));
            return;
          case "textarea":
            propKey = propKey$201 = null;
            for (defaultValue in lastProps)
              if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && name != null && !nextProps.hasOwnProperty(defaultValue))
                switch (defaultValue) {
                  case "value":
                    break;
                  case "children":
                    break;
                  default:
                    setProp(domElement, tag, defaultValue, null, nextProps, name);
                }
            for (value in nextProps)
              if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (name != null || type != null))
                switch (value) {
                  case "value":
                    propKey$201 = name;
                    break;
                  case "defaultValue":
                    propKey = name;
                    break;
                  case "children":
                    break;
                  case "dangerouslySetInnerHTML":
                    if (name != null) throw Error(formatProdErrorMessage(91));
                    break;
                  default:
                    name !== type && setProp(domElement, tag, value, name, nextProps, type);
                }
            updateTextarea(domElement, propKey$201, propKey);
            return;
          case "option":
            for (var propKey$217 in lastProps)
              if (propKey$201 = lastProps[propKey$217], lastProps.hasOwnProperty(propKey$217) && propKey$201 != null && !nextProps.hasOwnProperty(propKey$217))
                switch (propKey$217) {
                  case "selected":
                    domElement.selected = !1;
                    break;
                  default:
                    setProp(
                      domElement,
                      tag,
                      propKey$217,
                      null,
                      nextProps,
                      propKey$201
                    );
                }
            for (lastDefaultValue in nextProps)
              if (propKey$201 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && propKey$201 !== propKey && (propKey$201 != null || propKey != null))
                switch (lastDefaultValue) {
                  case "selected":
                    domElement.selected = propKey$201 && typeof propKey$201 != "function" && typeof propKey$201 != "symbol";
                    break;
                  default:
                    setProp(
                      domElement,
                      tag,
                      lastDefaultValue,
                      propKey$201,
                      nextProps,
                      propKey
                    );
                }
            return;
          case "img":
          case "link":
          case "area":
          case "base":
          case "br":
          case "col":
          case "embed":
          case "hr":
          case "keygen":
          case "meta":
          case "param":
          case "source":
          case "track":
          case "wbr":
          case "menuitem":
            for (var propKey$222 in lastProps)
              propKey$201 = lastProps[propKey$222], lastProps.hasOwnProperty(propKey$222) && propKey$201 != null && !nextProps.hasOwnProperty(propKey$222) && setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);
            for (checked in nextProps)
              if (propKey$201 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && propKey$201 !== propKey && (propKey$201 != null || propKey != null))
                switch (checked) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    if (propKey$201 != null)
                      throw Error(formatProdErrorMessage(137, tag));
                    break;
                  default:
                    setProp(
                      domElement,
                      tag,
                      checked,
                      propKey$201,
                      nextProps,
                      propKey
                    );
                }
            return;
          default:
            if (isCustomElement(tag)) {
              for (var propKey$227 in lastProps)
                propKey$201 = lastProps[propKey$227], lastProps.hasOwnProperty(propKey$227) && propKey$201 !== void 0 && !nextProps.hasOwnProperty(propKey$227) && setPropOnCustomElement(
                  domElement,
                  tag,
                  propKey$227,
                  void 0,
                  nextProps,
                  propKey$201
                );
              for (defaultChecked in nextProps)
                propKey$201 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || propKey$201 === propKey || propKey$201 === void 0 && propKey === void 0 || setPropOnCustomElement(
                  domElement,
                  tag,
                  defaultChecked,
                  propKey$201,
                  nextProps,
                  propKey
                );
              return;
            }
        }
        for (var propKey$232 in lastProps)
          propKey$201 = lastProps[propKey$232], lastProps.hasOwnProperty(propKey$232) && propKey$201 != null && !nextProps.hasOwnProperty(propKey$232) && setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);
        for (lastProp in nextProps)
          propKey$201 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || propKey$201 === propKey || propKey$201 == null && propKey == null || setProp(domElement, tag, lastProp, propKey$201, nextProps, propKey);
      }
      function isLikelyStaticResource(initiatorType) {
        switch (initiatorType) {
          case "css":
          case "script":
          case "font":
          case "img":
          case "image":
          case "input":
          case "link":
            return !0;
          default:
            return !1;
        }
      }
      function estimateBandwidth() {
        if (typeof performance.getEntriesByType == "function") {
          for (var count = 0, bits = 0, resourceEntries = performance.getEntriesByType("resource"), i = 0; i < resourceEntries.length; i++) {
            var entry = resourceEntries[i], transferSize = entry.transferSize, initiatorType = entry.initiatorType, duration = entry.duration;
            if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
              for (initiatorType = 0, duration = entry.responseEnd, i += 1; i < resourceEntries.length; i++) {
                var overlapEntry = resourceEntries[i], overlapStartTime = overlapEntry.startTime;
                if (overlapStartTime > duration) break;
                var overlapTransferSize = overlapEntry.transferSize, overlapInitiatorType = overlapEntry.initiatorType;
                overlapTransferSize && isLikelyStaticResource(overlapInitiatorType) && (overlapEntry = overlapEntry.responseEnd, initiatorType += overlapTransferSize * (overlapEntry < duration ? 1 : (duration - overlapStartTime) / (overlapEntry - overlapStartTime)));
              }
              if (--i, bits += 8 * (transferSize + initiatorType) / (entry.duration / 1e3), count++, 10 < count) break;
            }
          }
          if (0 < count) return bits / count / 1e6;
        }
        return navigator.connection && (count = navigator.connection.downlink, typeof count == "number") ? count : 5;
      }
      var eventsEnabled = null, selectionInformation = null;
      function getOwnerDocumentFromRootContainer(rootContainerElement) {
        return rootContainerElement.nodeType === 9 ? rootContainerElement : rootContainerElement.ownerDocument;
      }
      function getOwnHostContext(namespaceURI) {
        switch (namespaceURI) {
          case "http://www.w3.org/2000/svg":
            return 1;
          case "http://www.w3.org/1998/Math/MathML":
            return 2;
          default:
            return 0;
        }
      }
      function getChildHostContextProd(parentNamespace, type) {
        if (parentNamespace === 0)
          switch (type) {
            case "svg":
              return 1;
            case "math":
              return 2;
            default:
              return 0;
          }
        return parentNamespace === 1 && type === "foreignObject" ? 0 : parentNamespace;
      }
      function shouldSetTextContent(type, props) {
        return type === "textarea" || type === "noscript" || typeof props.children == "string" || typeof props.children == "number" || typeof props.children == "bigint" || typeof props.dangerouslySetInnerHTML == "object" && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
      }
      var currentPopstateTransitionEvent = null;
      function shouldAttemptEagerTransition() {
        var event = window.event;
        return event && event.type === "popstate" ? event === currentPopstateTransitionEvent ? !1 : (currentPopstateTransitionEvent = event, !0) : (currentPopstateTransitionEvent = null, !1);
      }
      var scheduleTimeout = typeof setTimeout == "function" ? setTimeout : void 0, cancelTimeout = typeof clearTimeout == "function" ? clearTimeout : void 0, localPromise = typeof Promise == "function" ? Promise : void 0, scheduleMicrotask = typeof queueMicrotask == "function" ? queueMicrotask : typeof localPromise != "undefined" ? function(callback) {
        return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
      } : scheduleTimeout;
      function handleErrorInNextTick(error) {
        setTimeout(function() {
          throw error;
        });
      }
      function isSingletonScope(type) {
        return type === "head";
      }
      function clearHydrationBoundary(parentInstance, hydrationInstance) {
        var node = hydrationInstance, depth = 0;
        do {
          var nextNode = node.nextSibling;
          if (parentInstance.removeChild(node), nextNode && nextNode.nodeType === 8)
            if (node = nextNode.data, node === "/$" || node === "/&") {
              if (depth === 0) {
                parentInstance.removeChild(nextNode), retryIfBlockedOn(hydrationInstance);
                return;
              }
              depth--;
            } else if (node === "$" || node === "$?" || node === "$~" || node === "$!" || node === "&")
              depth++;
            else if (node === "html")
              releaseSingletonInstance(parentInstance.ownerDocument.documentElement);
            else if (node === "head") {
              node = parentInstance.ownerDocument.head, releaseSingletonInstance(node);
              for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
                var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
                node$jscomp$0[internalHoistableMarker] || nodeName === "SCRIPT" || nodeName === "STYLE" || nodeName === "LINK" && node$jscomp$0.rel.toLowerCase() === "stylesheet" || node.removeChild(node$jscomp$0), node$jscomp$0 = nextNode$jscomp$0;
              }
            } else
              node === "body" && releaseSingletonInstance(parentInstance.ownerDocument.body);
          node = nextNode;
        } while (node);
        retryIfBlockedOn(hydrationInstance);
      }
      function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
        var node = suspenseInstance;
        suspenseInstance = 0;
        do {
          var nextNode = node.nextSibling;
          if (node.nodeType === 1 ? isHidden ? (node._stashedDisplay = node.style.display, node.style.display = "none") : (node.style.display = node._stashedDisplay || "", node.getAttribute("style") === "" && node.removeAttribute("style")) : node.nodeType === 3 && (isHidden ? (node._stashedText = node.nodeValue, node.nodeValue = "") : node.nodeValue = node._stashedText || ""), nextNode && nextNode.nodeType === 8)
            if (node = nextNode.data, node === "/$") {
              if (suspenseInstance === 0) break;
              suspenseInstance--;
            } else
              node !== "$" && node !== "$?" && node !== "$~" && node !== "$!" || suspenseInstance++;
          node = nextNode;
        } while (node);
      }
      function clearContainerSparingly(container) {
        var nextNode = container.firstChild;
        for (nextNode && nextNode.nodeType === 10 && (nextNode = nextNode.nextSibling); nextNode; ) {
          var node = nextNode;
          switch (nextNode = nextNode.nextSibling, node.nodeName) {
            case "HTML":
            case "HEAD":
            case "BODY":
              clearContainerSparingly(node), detachDeletedInstance(node);
              continue;
            case "SCRIPT":
            case "STYLE":
              continue;
            case "LINK":
              if (node.rel.toLowerCase() === "stylesheet") continue;
          }
          container.removeChild(node);
        }
      }
      function canHydrateInstance(instance, type, props, inRootOrSingleton) {
        for (; instance.nodeType === 1; ) {
          var anyProps = props;
          if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
            if (!inRootOrSingleton && (instance.nodeName !== "INPUT" || instance.type !== "hidden"))
              break;
          } else if (inRootOrSingleton) {
            if (!instance[internalHoistableMarker])
              switch (type) {
                case "meta":
                  if (!instance.hasAttribute("itemprop")) break;
                  return instance;
                case "link":
                  if (name = instance.getAttribute("rel"), name === "stylesheet" && instance.hasAttribute("data-precedence"))
                    break;
                  if (name !== anyProps.rel || instance.getAttribute("href") !== (anyProps.href == null || anyProps.href === "" ? null : anyProps.href) || instance.getAttribute("crossorigin") !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin) || instance.getAttribute("title") !== (anyProps.title == null ? null : anyProps.title))
                    break;
                  return instance;
                case "style":
                  if (instance.hasAttribute("data-precedence")) break;
                  return instance;
                case "script":
                  if (name = instance.getAttribute("src"), (name !== (anyProps.src == null ? null : anyProps.src) || instance.getAttribute("type") !== (anyProps.type == null ? null : anyProps.type) || instance.getAttribute("crossorigin") !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin)) && name && instance.hasAttribute("async") && !instance.hasAttribute("itemprop"))
                    break;
                  return instance;
                default:
                  return instance;
              }
          } else if (type === "input" && instance.type === "hidden") {
            var name = anyProps.name == null ? null : "" + anyProps.name;
            if (anyProps.type === "hidden" && instance.getAttribute("name") === name)
              return instance;
          } else return instance;
          if (instance = getNextHydratable(instance.nextSibling), instance === null) break;
        }
        return null;
      }
      function canHydrateTextInstance(instance, text, inRootOrSingleton) {
        if (text === "") return null;
        for (; instance.nodeType !== 3; )
          if ((instance.nodeType !== 1 || instance.nodeName !== "INPUT" || instance.type !== "hidden") && !inRootOrSingleton || (instance = getNextHydratable(instance.nextSibling), instance === null)) return null;
        return instance;
      }
      function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
        for (; instance.nodeType !== 8; )
          if ((instance.nodeType !== 1 || instance.nodeName !== "INPUT" || instance.type !== "hidden") && !inRootOrSingleton || (instance = getNextHydratable(instance.nextSibling), instance === null)) return null;
        return instance;
      }
      function isSuspenseInstancePending(instance) {
        return instance.data === "$?" || instance.data === "$~";
      }
      function isSuspenseInstanceFallback(instance) {
        return instance.data === "$!" || instance.data === "$?" && instance.ownerDocument.readyState !== "loading";
      }
      function registerSuspenseInstanceRetry(instance, callback) {
        var ownerDocument = instance.ownerDocument;
        if (instance.data === "$~") instance._reactRetry = callback;
        else if (instance.data !== "$?" || ownerDocument.readyState !== "loading")
          callback();
        else {
          var listener = function() {
            callback(), ownerDocument.removeEventListener("DOMContentLoaded", listener);
          };
          ownerDocument.addEventListener("DOMContentLoaded", listener), instance._reactRetry = listener;
        }
      }
      function getNextHydratable(node) {
        for (; node != null; node = node.nextSibling) {
          var nodeType = node.nodeType;
          if (nodeType === 1 || nodeType === 3) break;
          if (nodeType === 8) {
            if (nodeType = node.data, nodeType === "$" || nodeType === "$!" || nodeType === "$?" || nodeType === "$~" || nodeType === "&" || nodeType === "F!" || nodeType === "F")
              break;
            if (nodeType === "/$" || nodeType === "/&") return null;
          }
        }
        return node;
      }
      var previousHydratableOnEnteringScopedSingleton = null;
      function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
        hydrationInstance = hydrationInstance.nextSibling;
        for (var depth = 0; hydrationInstance; ) {
          if (hydrationInstance.nodeType === 8) {
            var data2 = hydrationInstance.data;
            if (data2 === "/$" || data2 === "/&") {
              if (depth === 0)
                return getNextHydratable(hydrationInstance.nextSibling);
              depth--;
            } else
              data2 !== "$" && data2 !== "$!" && data2 !== "$?" && data2 !== "$~" && data2 !== "&" || depth++;
          }
          hydrationInstance = hydrationInstance.nextSibling;
        }
        return null;
      }
      function getParentHydrationBoundary(targetInstance) {
        targetInstance = targetInstance.previousSibling;
        for (var depth = 0; targetInstance; ) {
          if (targetInstance.nodeType === 8) {
            var data2 = targetInstance.data;
            if (data2 === "$" || data2 === "$!" || data2 === "$?" || data2 === "$~" || data2 === "&") {
              if (depth === 0) return targetInstance;
              depth--;
            } else data2 !== "/$" && data2 !== "/&" || depth++;
          }
          targetInstance = targetInstance.previousSibling;
        }
        return null;
      }
      function resolveSingletonInstance(type, props, rootContainerInstance) {
        switch (props = getOwnerDocumentFromRootContainer(rootContainerInstance), type) {
          case "html":
            if (type = props.documentElement, !type) throw Error(formatProdErrorMessage(452));
            return type;
          case "head":
            if (type = props.head, !type) throw Error(formatProdErrorMessage(453));
            return type;
          case "body":
            if (type = props.body, !type) throw Error(formatProdErrorMessage(454));
            return type;
          default:
            throw Error(formatProdErrorMessage(451));
        }
      }
      function releaseSingletonInstance(instance) {
        for (var attributes = instance.attributes; attributes.length; )
          instance.removeAttributeNode(attributes[0]);
        detachDeletedInstance(instance);
      }
      var preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set();
      function getHoistableRoot(container) {
        return typeof container.getRootNode == "function" ? container.getRootNode() : container.nodeType === 9 ? container : container.ownerDocument;
      }
      var previousDispatcher = ReactDOMSharedInternals.d;
      ReactDOMSharedInternals.d = {
        f: flushSyncWork,
        r: requestFormReset,
        D: prefetchDNS,
        C: preconnect,
        L: preload,
        m: preloadModule,
        X: preinitScript,
        S: preinitStyle,
        M: preinitModuleScript
      };
      function flushSyncWork() {
        var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
        return previousWasRendering || wasRendering;
      }
      function requestFormReset(form) {
        var formInst = getInstanceFromNode(form);
        formInst !== null && formInst.tag === 5 && formInst.type === "form" ? requestFormReset$1(formInst) : previousDispatcher.r(form);
      }
      var globalDocument = typeof document == "undefined" ? null : document;
      function preconnectAs(rel, href, crossOrigin) {
        var ownerDocument = globalDocument;
        if (ownerDocument && typeof href == "string" && href) {
          var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
          limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]', typeof crossOrigin == "string" && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]'), preconnectsSet.has(limitedEscapedHref) || (preconnectsSet.add(limitedEscapedHref), rel = { rel, crossOrigin, href }, ownerDocument.querySelector(limitedEscapedHref) === null && (href = ownerDocument.createElement("link"), setInitialProperties(href, "link", rel), markNodeAsHoistable(href), ownerDocument.head.appendChild(href)));
        }
      }
      function prefetchDNS(href) {
        previousDispatcher.D(href), preconnectAs("dns-prefetch", href, null);
      }
      function preconnect(href, crossOrigin) {
        previousDispatcher.C(href, crossOrigin), preconnectAs("preconnect", href, crossOrigin);
      }
      function preload(href, as, options2) {
        previousDispatcher.L(href, as, options2);
        var ownerDocument = globalDocument;
        if (ownerDocument && href && as) {
          var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
          as === "image" && options2 && options2.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
            options2.imageSrcSet
          ) + '"]', typeof options2.imageSizes == "string" && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
            options2.imageSizes
          ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
          var key = preloadSelector;
          switch (as) {
            case "style":
              key = getStyleKey(href);
              break;
            case "script":
              key = getScriptKey(href);
          }
          preloadPropsMap.has(key) || (href = assign(
            {
              rel: "preload",
              href: as === "image" && options2 && options2.imageSrcSet ? void 0 : href,
              as
            },
            options2
          ), preloadPropsMap.set(key, href), ownerDocument.querySelector(preloadSelector) !== null || as === "style" && ownerDocument.querySelector(getStylesheetSelectorFromKey(key)) || as === "script" && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
        }
      }
      function preloadModule(href, options2) {
        previousDispatcher.m(href, options2);
        var ownerDocument = globalDocument;
        if (ownerDocument && href) {
          var as = options2 && typeof options2.as == "string" ? options2.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
          switch (as) {
            case "audioworklet":
            case "paintworklet":
            case "serviceworker":
            case "sharedworker":
            case "worker":
            case "script":
              key = getScriptKey(href);
          }
          if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options2), preloadPropsMap.set(key, href), ownerDocument.querySelector(preloadSelector) === null)) {
            switch (as) {
              case "audioworklet":
              case "paintworklet":
              case "serviceworker":
              case "sharedworker":
              case "worker":
              case "script":
                if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
                  return;
            }
            as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as);
          }
        }
      }
      function preinitStyle(href, precedence, options2) {
        previousDispatcher.S(href, precedence, options2);
        var ownerDocument = globalDocument;
        if (ownerDocument && href) {
          var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
          precedence = precedence || "default";
          var resource = styles.get(key);
          if (!resource) {
            var state = { loading: 0, preload: null };
            if (resource = ownerDocument.querySelector(
              getStylesheetSelectorFromKey(key)
            ))
              state.loading = 5;
            else {
              href = assign(
                { rel: "stylesheet", href, "data-precedence": precedence },
                options2
              ), (options2 = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options2);
              var link = resource = ownerDocument.createElement("link");
              markNodeAsHoistable(link), setInitialProperties(link, "link", href), link._p = new Promise(function(resolve, reject) {
                link.onload = resolve, link.onerror = reject;
              }), link.addEventListener("load", function() {
                state.loading |= 1;
              }), link.addEventListener("error", function() {
                state.loading |= 2;
              }), state.loading |= 4, insertStylesheet(resource, precedence, ownerDocument);
            }
            resource = {
              type: "stylesheet",
              instance: resource,
              count: 1,
              state
            }, styles.set(key, resource);
          }
        }
      }
      function preinitScript(src, options2) {
        previousDispatcher.X(src, options2);
        var ownerDocument = globalDocument;
        if (ownerDocument && src) {
          var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
          resource || (resource = ownerDocument.querySelector(getScriptSelectorFromKey(key)), resource || (src = assign({ src, async: !0 }, options2), (options2 = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options2), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
            type: "script",
            instance: resource,
            count: 1,
            state: null
          }, scripts.set(key, resource));
        }
      }
      function preinitModuleScript(src, options2) {
        previousDispatcher.M(src, options2);
        var ownerDocument = globalDocument;
        if (ownerDocument && src) {
          var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
          resource || (resource = ownerDocument.querySelector(getScriptSelectorFromKey(key)), resource || (src = assign({ src, async: !0, type: "module" }, options2), (options2 = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options2), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
            type: "script",
            instance: resource,
            count: 1,
            state: null
          }, scripts.set(key, resource));
        }
      }
      function getResource(type, currentProps, pendingProps, currentResource) {
        var JSCompiler_inline_result = (JSCompiler_inline_result = rootInstanceStackCursor.current) ? getHoistableRoot(JSCompiler_inline_result) : null;
        if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));
        switch (type) {
          case "meta":
          case "title":
            return null;
          case "style":
            return typeof pendingProps.precedence == "string" && typeof pendingProps.href == "string" ? (currentProps = getStyleKey(pendingProps.href), pendingProps = getResourcesFromRoot(
              JSCompiler_inline_result
            ).hoistableStyles, currentResource = pendingProps.get(currentProps), currentResource || (currentResource = {
              type: "style",
              instance: null,
              count: 0,
              state: null
            }, pendingProps.set(currentProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
          case "link":
            if (pendingProps.rel === "stylesheet" && typeof pendingProps.href == "string" && typeof pendingProps.precedence == "string") {
              type = getStyleKey(pendingProps.href);
              var styles$243 = getResourcesFromRoot(
                JSCompiler_inline_result
              ).hoistableStyles, resource$244 = styles$243.get(type);
              if (resource$244 || (JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result, resource$244 = {
                type: "stylesheet",
                instance: null,
                count: 0,
                state: { loading: 0, preload: null }
              }, styles$243.set(type, resource$244), (styles$243 = JSCompiler_inline_result.querySelector(
                getStylesheetSelectorFromKey(type)
              )) && !styles$243._p && (resource$244.instance = styles$243, resource$244.state.loading = 5), preloadPropsMap.has(type) || (pendingProps = {
                rel: "preload",
                as: "style",
                href: pendingProps.href,
                crossOrigin: pendingProps.crossOrigin,
                integrity: pendingProps.integrity,
                media: pendingProps.media,
                hrefLang: pendingProps.hrefLang,
                referrerPolicy: pendingProps.referrerPolicy
              }, preloadPropsMap.set(type, pendingProps), styles$243 || preloadStylesheet(
                JSCompiler_inline_result,
                type,
                pendingProps,
                resource$244.state
              ))), currentProps && currentResource === null)
                throw Error(formatProdErrorMessage(528, ""));
              return resource$244;
            }
            if (currentProps && currentResource !== null)
              throw Error(formatProdErrorMessage(529, ""));
            return null;
          case "script":
            return currentProps = pendingProps.async, pendingProps = pendingProps.src, typeof pendingProps == "string" && currentProps && typeof currentProps != "function" && typeof currentProps != "symbol" ? (currentProps = getScriptKey(pendingProps), pendingProps = getResourcesFromRoot(
              JSCompiler_inline_result
            ).hoistableScripts, currentResource = pendingProps.get(currentProps), currentResource || (currentResource = {
              type: "script",
              instance: null,
              count: 0,
              state: null
            }, pendingProps.set(currentProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
          default:
            throw Error(formatProdErrorMessage(444, type));
        }
      }
      function getStyleKey(href) {
        return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
      }
      function getStylesheetSelectorFromKey(key) {
        return 'link[rel="stylesheet"][' + key + "]";
      }
      function stylesheetPropsFromRawProps(rawProps) {
        return assign({}, rawProps, {
          "data-precedence": rawProps.precedence,
          precedence: null
        });
      }
      function preloadStylesheet(ownerDocument, key, preloadProps, state) {
        ownerDocument.querySelector('link[rel="preload"][as="style"][' + key + "]") ? state.loading = 1 : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
          return state.loading |= 1;
        }), key.addEventListener("error", function() {
          return state.loading |= 2;
        }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
      }
      function getScriptKey(src) {
        return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
      }
      function getScriptSelectorFromKey(key) {
        return "script[async]" + key;
      }
      function acquireResource(hoistableRoot, resource, props) {
        if (resource.count++, resource.instance === null)
          switch (resource.type) {
            case "style":
              var instance = hoistableRoot.querySelector(
                'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
              );
              if (instance)
                return resource.instance = instance, markNodeAsHoistable(instance), instance;
              var styleProps = assign({}, props, {
                "data-href": props.href,
                "data-precedence": props.precedence,
                href: null,
                precedence: null
              });
              return instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(
                "style"
              ), markNodeAsHoistable(instance), setInitialProperties(instance, "style", styleProps), insertStylesheet(instance, props.precedence, hoistableRoot), resource.instance = instance;
            case "stylesheet":
              styleProps = getStyleKey(props.href);
              var instance$249 = hoistableRoot.querySelector(
                getStylesheetSelectorFromKey(styleProps)
              );
              if (instance$249)
                return resource.state.loading |= 4, resource.instance = instance$249, markNodeAsHoistable(instance$249), instance$249;
              instance = stylesheetPropsFromRawProps(props), (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps), instance$249 = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link"), markNodeAsHoistable(instance$249);
              var linkInstance = instance$249;
              return linkInstance._p = new Promise(function(resolve, reject) {
                linkInstance.onload = resolve, linkInstance.onerror = reject;
              }), setInitialProperties(instance$249, "link", instance), resource.state.loading |= 4, insertStylesheet(instance$249, props.precedence, hoistableRoot), resource.instance = instance$249;
            case "script":
              return instance$249 = getScriptKey(props.src), (styleProps = hoistableRoot.querySelector(
                getScriptSelectorFromKey(instance$249)
              )) ? (resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps) : (instance = props, (styleProps = preloadPropsMap.get(instance$249)) && (instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps)), hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot, styleProps = hoistableRoot.createElement("script"), markNodeAsHoistable(styleProps), setInitialProperties(styleProps, "link", instance), hoistableRoot.head.appendChild(styleProps), resource.instance = styleProps);
            case "void":
              return null;
            default:
              throw Error(formatProdErrorMessage(443, resource.type));
          }
        else
          resource.type === "stylesheet" && (resource.state.loading & 4) === 0 && (instance = resource.instance, resource.state.loading |= 4, insertStylesheet(instance, props.precedence, hoistableRoot));
        return resource.instance;
      }
      function insertStylesheet(instance, precedence, root2) {
        for (var nodes = root2.querySelectorAll(
          'link[rel="stylesheet"][data-precedence],style[data-precedence]'
        ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
          var node = nodes[i];
          if (node.dataset.precedence === precedence) prior = node;
          else if (prior !== last) break;
        }
        prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = root2.nodeType === 9 ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
      }
      function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
        stylesheetProps.crossOrigin == null && (stylesheetProps.crossOrigin = preloadProps.crossOrigin), stylesheetProps.referrerPolicy == null && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy), stylesheetProps.title == null && (stylesheetProps.title = preloadProps.title);
      }
      function adoptPreloadPropsForScript(scriptProps, preloadProps) {
        scriptProps.crossOrigin == null && (scriptProps.crossOrigin = preloadProps.crossOrigin), scriptProps.referrerPolicy == null && (scriptProps.referrerPolicy = preloadProps.referrerPolicy), scriptProps.integrity == null && (scriptProps.integrity = preloadProps.integrity);
      }
      var tagCaches = null;
      function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
        if (tagCaches === null) {
          var cache = /* @__PURE__ */ new Map(), caches = tagCaches = /* @__PURE__ */ new Map();
          caches.set(ownerDocument, cache);
        } else
          caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
        if (cache.has(type)) return cache;
        for (cache.set(type, null), ownerDocument = ownerDocument.getElementsByTagName(type), caches = 0; caches < ownerDocument.length; caches++) {
          var node = ownerDocument[caches];
          if (!(node[internalHoistableMarker] || node[internalInstanceKey] || type === "link" && node.getAttribute("rel") === "stylesheet") && node.namespaceURI !== "http://www.w3.org/2000/svg") {
            var nodeKey = node.getAttribute(keyAttribute) || "";
            nodeKey = type + nodeKey;
            var existing = cache.get(nodeKey);
            existing ? existing.push(node) : cache.set(nodeKey, [node]);
          }
        }
        return cache;
      }
      function mountHoistable(hoistableRoot, type, instance) {
        hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot, hoistableRoot.head.insertBefore(
          instance,
          type === "title" ? hoistableRoot.querySelector("head > title") : null
        );
      }
      function isHostHoistableType(type, props, hostContext) {
        if (hostContext === 1 || props.itemProp != null) return !1;
        switch (type) {
          case "meta":
          case "title":
            return !0;
          case "style":
            if (typeof props.precedence != "string" || typeof props.href != "string" || props.href === "")
              break;
            return !0;
          case "link":
            if (typeof props.rel != "string" || typeof props.href != "string" || props.href === "" || props.onLoad || props.onError)
              break;
            switch (props.rel) {
              case "stylesheet":
                return type = props.disabled, typeof props.precedence == "string" && type == null;
              default:
                return !0;
            }
          case "script":
            if (props.async && typeof props.async != "function" && typeof props.async != "symbol" && !props.onLoad && !props.onError && props.src && typeof props.src == "string")
              return !0;
        }
        return !1;
      }
      function preloadResource(resource) {
        return !(resource.type === "stylesheet" && (resource.state.loading & 3) === 0);
      }
      function suspendResource(state, hoistableRoot, resource, props) {
        if (resource.type === "stylesheet" && (typeof props.media != "string" || matchMedia(props.media).matches !== !1) && (resource.state.loading & 4) === 0) {
          if (resource.instance === null) {
            var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
              getStylesheetSelectorFromKey(key)
            );
            if (instance) {
              hoistableRoot = instance._p, hoistableRoot !== null && typeof hoistableRoot == "object" && typeof hoistableRoot.then == "function" && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state)), resource.state.loading |= 4, resource.instance = instance, markNodeAsHoistable(instance);
              return;
            }
            instance = hoistableRoot.ownerDocument || hoistableRoot, props = stylesheetPropsFromRawProps(props), (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key), instance = instance.createElement("link"), markNodeAsHoistable(instance);
            var linkInstance = instance;
            linkInstance._p = new Promise(function(resolve, reject) {
              linkInstance.onload = resolve, linkInstance.onerror = reject;
            }), setInitialProperties(instance, "link", props), resource.instance = instance;
          }
          state.stylesheets === null && (state.stylesheets = /* @__PURE__ */ new Map()), state.stylesheets.set(resource, hoistableRoot), (hoistableRoot = resource.state.preload) && (resource.state.loading & 3) === 0 && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
        }
      }
      var estimatedBytesWithinLimit = 0;
      function waitForCommitToBeReady(state, timeoutOffset) {
        return state.stylesheets && state.count === 0 && insertSuspendedStylesheets(state, state.stylesheets), 0 < state.count || 0 < state.imgCount ? function(commit) {
          var stylesheetTimer = setTimeout(function() {
            if (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend) {
              var unsuspend = state.unsuspend;
              state.unsuspend = null, unsuspend();
            }
          }, 6e4 + timeoutOffset);
          0 < state.imgBytes && estimatedBytesWithinLimit === 0 && (estimatedBytesWithinLimit = 62500 * estimateBandwidth());
          var imgTimer = setTimeout(
            function() {
              if (state.waitingForImages = !1, state.count === 0 && (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend)) {
                var unsuspend = state.unsuspend;
                state.unsuspend = null, unsuspend();
              }
            },
            (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) + timeoutOffset
          );
          return state.unsuspend = commit, function() {
            state.unsuspend = null, clearTimeout(stylesheetTimer), clearTimeout(imgTimer);
          };
        } : null;
      }
      function onUnsuspend() {
        if (this.count--, this.count === 0 && (this.imgCount === 0 || !this.waitingForImages)) {
          if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);
          else if (this.unsuspend) {
            var unsuspend = this.unsuspend;
            this.unsuspend = null, unsuspend();
          }
        }
      }
      var precedencesByRoot = null;
      function insertSuspendedStylesheets(state, resources) {
        state.stylesheets = null, state.unsuspend !== null && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
      }
      function insertStylesheetIntoRoot(root2, resource) {
        if (!(resource.state.loading & 4)) {
          var precedences = precedencesByRoot.get(root2);
          if (precedences) var last = precedences.get(null);
          else {
            precedences = /* @__PURE__ */ new Map(), precedencesByRoot.set(root2, precedences);
            for (var nodes = root2.querySelectorAll(
              "link[data-precedence],style[data-precedence]"
            ), i = 0; i < nodes.length; i++) {
              var node = nodes[i];
              (node.nodeName === "LINK" || node.getAttribute("media") !== "not all") && (precedences.set(node.dataset.precedence, node), last = node);
            }
            last && precedences.set(null, last);
          }
          nodes = resource.instance, node = nodes.getAttribute("data-precedence"), i = precedences.get(node) || last, i === last && precedences.set(null, nodes), precedences.set(node, nodes), this.count++, last = onUnsuspend.bind(this), nodes.addEventListener("load", last), nodes.addEventListener("error", last), i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = root2.nodeType === 9 ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild)), resource.state.loading |= 4;
        }
      }
      var HostTransitionContext = {
        $$typeof: REACT_CONTEXT_TYPE,
        Provider: null,
        Consumer: null,
        _currentValue: sharedNotPendingObject,
        _currentValue2: sharedNotPendingObject,
        _threadCount: 0
      };
      function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, formState) {
        this.tag = 1, this.containerInfo = containerInfo, this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null, this.callbackPriority = 0, this.expirationTimes = createLaneMap(-1), this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = createLaneMap(0), this.hiddenUpdates = createLaneMap(null), this.identifierPrefix = identifierPrefix, this.onUncaughtError = onUncaughtError, this.onCaughtError = onCaughtError, this.onRecoverableError = onRecoverableError, this.pooledCache = null, this.pooledCacheLanes = 0, this.formState = formState, this.incompleteTransitions = /* @__PURE__ */ new Map();
      }
      function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator) {
        return containerInfo = new FiberRootNode(
          containerInfo,
          tag,
          hydrate,
          identifierPrefix,
          onUncaughtError,
          onCaughtError,
          onRecoverableError,
          onDefaultTransitionIndicator,
          formState
        ), tag = 1, isStrictMode === !0 && (tag |= 24), isStrictMode = createFiberImplClass(3, null, null, tag), containerInfo.current = isStrictMode, isStrictMode.stateNode = containerInfo, tag = createCache(), tag.refCount++, containerInfo.pooledCache = tag, tag.refCount++, isStrictMode.memoizedState = {
          element: initialChildren,
          isDehydrated: hydrate,
          cache: tag
        }, initializeUpdateQueue(isStrictMode), containerInfo;
      }
      function getContextForSubtree(parentComponent) {
        return parentComponent ? (parentComponent = emptyContextObject, parentComponent) : emptyContextObject;
      }
      function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
        parentComponent = getContextForSubtree(parentComponent), container.context === null ? container.context = parentComponent : container.pendingContext = parentComponent, container = createUpdate(lane), container.payload = { element }, callback = callback === void 0 ? null : callback, callback !== null && (container.callback = callback), element = enqueueUpdate(rootFiber, container, lane), element !== null && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
      }
      function markRetryLaneImpl(fiber, retryLane) {
        if (fiber = fiber.memoizedState, fiber !== null && fiber.dehydrated !== null) {
          var a = fiber.retryLane;
          fiber.retryLane = a !== 0 && a < retryLane ? a : retryLane;
        }
      }
      function markRetryLaneIfNotHydrated(fiber, retryLane) {
        markRetryLaneImpl(fiber, retryLane), (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
      }
      function attemptContinuousHydration(fiber) {
        if (fiber.tag === 13 || fiber.tag === 31) {
          var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
          root2 !== null && scheduleUpdateOnFiber(root2, fiber, 67108864), markRetryLaneIfNotHydrated(fiber, 67108864);
        }
      }
      function attemptHydrationAtCurrentPriority(fiber) {
        if (fiber.tag === 13 || fiber.tag === 31) {
          var lane = requestUpdateLane();
          lane = getBumpedLaneForHydrationByLane(lane);
          var root2 = enqueueConcurrentRenderForLane(fiber, lane);
          root2 !== null && scheduleUpdateOnFiber(root2, fiber, lane), markRetryLaneIfNotHydrated(fiber, lane);
        }
      }
      var _enabled = !0;
      function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
        var prevTransition = ReactSharedInternals.T;
        ReactSharedInternals.T = null;
        var previousPriority = ReactDOMSharedInternals.p;
        try {
          ReactDOMSharedInternals.p = 2, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
        } finally {
          ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
        }
      }
      function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
        var prevTransition = ReactSharedInternals.T;
        ReactSharedInternals.T = null;
        var previousPriority = ReactDOMSharedInternals.p;
        try {
          ReactDOMSharedInternals.p = 8, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
        } finally {
          ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
        }
      }
      function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
        if (_enabled) {
          var blockedOn = findInstanceBlockingEvent(nativeEvent);
          if (blockedOn === null)
            dispatchEventForPluginEventSystem(
              domEventName,
              eventSystemFlags,
              nativeEvent,
              return_targetInst,
              targetContainer
            ), clearIfContinuousEvent(domEventName, nativeEvent);
          else if (queueIfContinuousEvent(
            blockedOn,
            domEventName,
            eventSystemFlags,
            targetContainer,
            nativeEvent
          ))
            nativeEvent.stopPropagation();
          else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
            for (; blockedOn !== null; ) {
              var fiber = getInstanceFromNode(blockedOn);
              if (fiber !== null)
                switch (fiber.tag) {
                  case 3:
                    if (fiber = fiber.stateNode, fiber.current.memoizedState.isDehydrated) {
                      var lanes = getHighestPriorityLanes(fiber.pendingLanes);
                      if (lanes !== 0) {
                        var root2 = fiber;
                        for (root2.pendingLanes |= 2, root2.entangledLanes |= 2; lanes; ) {
                          var lane = 1 << 31 - clz32(lanes);
                          root2.entanglements[1] |= lane, lanes &= ~lane;
                        }
                        ensureRootIsScheduled(fiber), (executionContext & 6) === 0 && (workInProgressRootRenderTargetTime = now() + 500, flushSyncWorkAcrossRoots_impl(0, !1));
                      }
                    }
                    break;
                  case 31:
                  case 13:
                    root2 = enqueueConcurrentRenderForLane(fiber, 2), root2 !== null && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
                }
              if (fiber = findInstanceBlockingEvent(nativeEvent), fiber === null && dispatchEventForPluginEventSystem(
                domEventName,
                eventSystemFlags,
                nativeEvent,
                return_targetInst,
                targetContainer
              ), fiber === blockedOn) break;
              blockedOn = fiber;
            }
            blockedOn !== null && nativeEvent.stopPropagation();
          } else
            dispatchEventForPluginEventSystem(
              domEventName,
              eventSystemFlags,
              nativeEvent,
              null,
              targetContainer
            );
        }
      }
      function findInstanceBlockingEvent(nativeEvent) {
        return nativeEvent = getEventTarget(nativeEvent), findInstanceBlockingTarget(nativeEvent);
      }
      var return_targetInst = null;
      function findInstanceBlockingTarget(targetNode) {
        if (return_targetInst = null, targetNode = getClosestInstanceFromNode(targetNode), targetNode !== null) {
          var nearestMounted = getNearestMountedFiber(targetNode);
          if (nearestMounted === null) targetNode = null;
          else {
            var tag = nearestMounted.tag;
            if (tag === 13) {
              if (targetNode = getSuspenseInstanceFromFiber(nearestMounted), targetNode !== null) return targetNode;
              targetNode = null;
            } else if (tag === 31) {
              if (targetNode = getActivityInstanceFromFiber(nearestMounted), targetNode !== null) return targetNode;
              targetNode = null;
            } else if (tag === 3) {
              if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
                return nearestMounted.tag === 3 ? nearestMounted.stateNode.containerInfo : null;
              targetNode = null;
            } else nearestMounted !== targetNode && (targetNode = null);
          }
        }
        return return_targetInst = targetNode, null;
      }
      function getEventPriority(domEventName) {
        switch (domEventName) {
          case "beforetoggle":
          case "cancel":
          case "click":
          case "close":
          case "contextmenu":
          case "copy":
          case "cut":
          case "auxclick":
          case "dblclick":
          case "dragend":
          case "dragstart":
          case "drop":
          case "focusin":
          case "focusout":
          case "input":
          case "invalid":
          case "keydown":
          case "keypress":
          case "keyup":
          case "mousedown":
          case "mouseup":
          case "paste":
          case "pause":
          case "play":
          case "pointercancel":
          case "pointerdown":
          case "pointerup":
          case "ratechange":
          case "reset":
          case "resize":
          case "seeked":
          case "submit":
          case "toggle":
          case "touchcancel":
          case "touchend":
          case "touchstart":
          case "volumechange":
          case "change":
          case "selectionchange":
          case "textInput":
          case "compositionstart":
          case "compositionend":
          case "compositionupdate":
          case "beforeblur":
          case "afterblur":
          case "beforeinput":
          case "blur":
          case "fullscreenchange":
          case "focus":
          case "hashchange":
          case "popstate":
          case "select":
          case "selectstart":
            return 2;
          case "drag":
          case "dragenter":
          case "dragexit":
          case "dragleave":
          case "dragover":
          case "mousemove":
          case "mouseout":
          case "mouseover":
          case "pointermove":
          case "pointerout":
          case "pointerover":
          case "scroll":
          case "touchmove":
          case "wheel":
          case "mouseenter":
          case "mouseleave":
          case "pointerenter":
          case "pointerleave":
            return 8;
          case "message":
            switch (getCurrentPriorityLevel()) {
              case ImmediatePriority:
                return 2;
              case UserBlockingPriority:
                return 8;
              case NormalPriority$1:
              case LowPriority:
                return 32;
              case IdlePriority:
                return 268435456;
              default:
                return 32;
            }
          default:
            return 32;
        }
      }
      var hasScheduledReplayAttempt = !1, queuedFocus = null, queuedDrag = null, queuedMouse = null, queuedPointers = /* @__PURE__ */ new Map(), queuedPointerCaptures = /* @__PURE__ */ new Map(), queuedExplicitHydrationTargets = [], discreteReplayableEvents = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
        " "
      );
      function clearIfContinuousEvent(domEventName, nativeEvent) {
        switch (domEventName) {
          case "focusin":
          case "focusout":
            queuedFocus = null;
            break;
          case "dragenter":
          case "dragleave":
            queuedDrag = null;
            break;
          case "mouseover":
          case "mouseout":
            queuedMouse = null;
            break;
          case "pointerover":
          case "pointerout":
            queuedPointers.delete(nativeEvent.pointerId);
            break;
          case "gotpointercapture":
          case "lostpointercapture":
            queuedPointerCaptures.delete(nativeEvent.pointerId);
        }
      }
      function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
        return existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent ? (existingQueuedEvent = {
          blockedOn,
          domEventName,
          eventSystemFlags,
          nativeEvent,
          targetContainers: [targetContainer]
        }, blockedOn !== null && (blockedOn = getInstanceFromNode(blockedOn), blockedOn !== null && attemptContinuousHydration(blockedOn)), existingQueuedEvent) : (existingQueuedEvent.eventSystemFlags |= eventSystemFlags, blockedOn = existingQueuedEvent.targetContainers, targetContainer !== null && blockedOn.indexOf(targetContainer) === -1 && blockedOn.push(targetContainer), existingQueuedEvent);
      }
      function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
        switch (domEventName) {
          case "focusin":
            return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
              queuedFocus,
              blockedOn,
              domEventName,
              eventSystemFlags,
              targetContainer,
              nativeEvent
            ), !0;
          case "dragenter":
            return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
              queuedDrag,
              blockedOn,
              domEventName,
              eventSystemFlags,
              targetContainer,
              nativeEvent
            ), !0;
          case "mouseover":
            return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
              queuedMouse,
              blockedOn,
              domEventName,
              eventSystemFlags,
              targetContainer,
              nativeEvent
            ), !0;
          case "pointerover":
            var pointerId = nativeEvent.pointerId;
            return queuedPointers.set(
              pointerId,
              accumulateOrCreateContinuousQueuedReplayableEvent(
                queuedPointers.get(pointerId) || null,
                blockedOn,
                domEventName,
                eventSystemFlags,
                targetContainer,
                nativeEvent
              )
            ), !0;
          case "gotpointercapture":
            return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
              pointerId,
              accumulateOrCreateContinuousQueuedReplayableEvent(
                queuedPointerCaptures.get(pointerId) || null,
                blockedOn,
                domEventName,
                eventSystemFlags,
                targetContainer,
                nativeEvent
              )
            ), !0;
        }
        return !1;
      }
      function attemptExplicitHydrationTarget(queuedTarget) {
        var targetInst = getClosestInstanceFromNode(queuedTarget.target);
        if (targetInst !== null) {
          var nearestMounted = getNearestMountedFiber(targetInst);
          if (nearestMounted !== null) {
            if (targetInst = nearestMounted.tag, targetInst === 13) {
              if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), targetInst !== null) {
                queuedTarget.blockedOn = targetInst, runWithPriority(queuedTarget.priority, function() {
                  attemptHydrationAtCurrentPriority(nearestMounted);
                });
                return;
              }
            } else if (targetInst === 31) {
              if (targetInst = getActivityInstanceFromFiber(nearestMounted), targetInst !== null) {
                queuedTarget.blockedOn = targetInst, runWithPriority(queuedTarget.priority, function() {
                  attemptHydrationAtCurrentPriority(nearestMounted);
                });
                return;
              }
            } else if (targetInst === 3 && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
              queuedTarget.blockedOn = nearestMounted.tag === 3 ? nearestMounted.stateNode.containerInfo : null;
              return;
            }
          }
        }
        queuedTarget.blockedOn = null;
      }
      function attemptReplayContinuousQueuedEvent(queuedEvent) {
        if (queuedEvent.blockedOn !== null) return !1;
        for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
          var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
          if (nextBlockedOn === null) {
            nextBlockedOn = queuedEvent.nativeEvent;
            var nativeEventClone = new nextBlockedOn.constructor(
              nextBlockedOn.type,
              nextBlockedOn
            );
            currentReplayingEvent = nativeEventClone, nextBlockedOn.target.dispatchEvent(nativeEventClone), currentReplayingEvent = null;
          } else
            return targetContainers = getInstanceFromNode(nextBlockedOn), targetContainers !== null && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, !1;
          targetContainers.shift();
        }
        return !0;
      }
      function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
        attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
      }
      function replayUnblockedEvents() {
        hasScheduledReplayAttempt = !1, queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null), queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null), queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null), queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap), queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
      }
      function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
        queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = !0, Scheduler.unstable_scheduleCallback(
          Scheduler.unstable_NormalPriority,
          replayUnblockedEvents
        )));
      }
      var lastScheduledReplayQueue = null;
      function scheduleReplayQueueIfNeeded(formReplayingQueue) {
        lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
          Scheduler.unstable_NormalPriority,
          function() {
            lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
            for (var i = 0; i < formReplayingQueue.length; i += 3) {
              var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
              if (typeof submitterOrAction != "function") {
                if (findInstanceBlockingTarget(submitterOrAction || form) === null)
                  continue;
                break;
              }
              var formInst = getInstanceFromNode(form);
              formInst !== null && (formReplayingQueue.splice(i, 3), i -= 3, startHostTransition(
                formInst,
                {
                  pending: !0,
                  data: formData,
                  method: form.method,
                  action: submitterOrAction
                },
                submitterOrAction,
                formData
              ));
            }
          }
        ));
      }
      function retryIfBlockedOn(unblocked) {
        function unblock(queuedEvent) {
          return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
        }
        queuedFocus !== null && scheduleCallbackIfUnblocked(queuedFocus, unblocked), queuedDrag !== null && scheduleCallbackIfUnblocked(queuedDrag, unblocked), queuedMouse !== null && scheduleCallbackIfUnblocked(queuedMouse, unblocked), queuedPointers.forEach(unblock), queuedPointerCaptures.forEach(unblock);
        for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
          var queuedTarget = queuedExplicitHydrationTargets[i];
          queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
        }
        for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], i.blockedOn === null); )
          attemptExplicitHydrationTarget(i), i.blockedOn === null && queuedExplicitHydrationTargets.shift();
        if (i = (unblocked.ownerDocument || unblocked).$$reactFormReplay, i != null)
          for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
            var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
            if (typeof submitterOrAction == "function")
              formProps || scheduleReplayQueueIfNeeded(i);
            else if (formProps) {
              var action = null;
              if (submitterOrAction && submitterOrAction.hasAttribute("formAction")) {
                if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
                  action = formProps.formAction;
                else if (findInstanceBlockingTarget(form) !== null) continue;
              } else action = formProps.action;
              typeof action == "function" ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3), scheduleReplayQueueIfNeeded(i);
            }
          }
      }
      function defaultOnDefaultTransitionIndicator() {
        function handleNavigate(event) {
          event.canIntercept && event.info === "react-transition" && event.intercept({
            handler: function() {
              return new Promise(function(resolve) {
                return pendingResolve = resolve;
              });
            },
            focusReset: "manual",
            scroll: "manual"
          });
        }
        function handleNavigateComplete() {
          pendingResolve !== null && (pendingResolve(), pendingResolve = null), isCancelled || setTimeout(startFakeNavigation, 20);
        }
        function startFakeNavigation() {
          if (!isCancelled && !navigation.transition) {
            var currentEntry = navigation.currentEntry;
            currentEntry && currentEntry.url != null && navigation.navigate(currentEntry.url, {
              state: currentEntry.getState(),
              info: "react-transition",
              history: "replace"
            });
          }
        }
        if (typeof navigation == "object") {
          var isCancelled = !1, pendingResolve = null;
          return navigation.addEventListener("navigate", handleNavigate), navigation.addEventListener("navigatesuccess", handleNavigateComplete), navigation.addEventListener("navigateerror", handleNavigateComplete), setTimeout(startFakeNavigation, 100), function() {
            isCancelled = !0, navigation.removeEventListener("navigate", handleNavigate), navigation.removeEventListener("navigatesuccess", handleNavigateComplete), navigation.removeEventListener("navigateerror", handleNavigateComplete), pendingResolve !== null && (pendingResolve(), pendingResolve = null);
          };
        }
      }
      function ReactDOMRoot(internalRoot) {
        this._internalRoot = internalRoot;
      }
      ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
        var root2 = this._internalRoot;
        if (root2 === null) throw Error(formatProdErrorMessage(409));
        var current = root2.current, lane = requestUpdateLane();
        updateContainerImpl(current, lane, children, root2, null, null);
      };
      ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
        var root2 = this._internalRoot;
        if (root2 !== null) {
          this._internalRoot = null;
          var container = root2.containerInfo;
          updateContainerImpl(root2.current, 2, null, root2, null, null), flushSyncWork$1(), container[internalContainerInstanceKey] = null;
        }
      };
      function ReactDOMHydrationRoot(internalRoot) {
        this._internalRoot = internalRoot;
      }
      ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
        if (target) {
          var updatePriority = resolveUpdatePriority();
          target = { blockedOn: null, target, priority: updatePriority };
          for (var i = 0; i < queuedExplicitHydrationTargets.length && updatePriority !== 0 && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
          queuedExplicitHydrationTargets.splice(i, 0, target), i === 0 && attemptExplicitHydrationTarget(target);
        }
      };
      var isomorphicReactPackageVersion$jscomp$inline_1840 = React69.version;
      if (isomorphicReactPackageVersion$jscomp$inline_1840 !== "19.2.1")
        throw Error(
          formatProdErrorMessage(
            527,
            isomorphicReactPackageVersion$jscomp$inline_1840,
            "19.2.1"
          )
        );
      ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
        var fiber = componentOrElement._reactInternals;
        if (fiber === void 0)
          throw typeof componentOrElement.render == "function" ? Error(formatProdErrorMessage(188)) : (componentOrElement = Object.keys(componentOrElement).join(","), Error(formatProdErrorMessage(268, componentOrElement)));
        return componentOrElement = findCurrentFiberUsingSlowPath(fiber), componentOrElement = componentOrElement !== null ? findCurrentHostFiberImpl(componentOrElement) : null, componentOrElement = componentOrElement === null ? null : componentOrElement.stateNode, componentOrElement;
      };
      var internals$jscomp$inline_2347 = {
        bundleType: 0,
        version: "19.2.1",
        rendererPackageName: "react-dom",
        currentDispatcherRef: ReactSharedInternals,
        reconcilerVersion: "19.2.1"
      };
      if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && (hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__, !hook$jscomp$inline_2348.isDisabled && hook$jscomp$inline_2348.supportsFiber))
        try {
          rendererID = hook$jscomp$inline_2348.inject(
            internals$jscomp$inline_2347
          ), injectedHook = hook$jscomp$inline_2348;
        } catch (err) {
        }
      var hook$jscomp$inline_2348;
      exports.createRoot = function(container, options2) {
        if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
        var isStrictMode = !1, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError;
        return options2 != null && (options2.unstable_strictMode === !0 && (isStrictMode = !0), options2.identifierPrefix !== void 0 && (identifierPrefix = options2.identifierPrefix), options2.onUncaughtError !== void 0 && (onUncaughtError = options2.onUncaughtError), options2.onCaughtError !== void 0 && (onCaughtError = options2.onCaughtError), options2.onRecoverableError !== void 0 && (onRecoverableError = options2.onRecoverableError)), options2 = createFiberRoot(
          container,
          1,
          !1,
          null,
          null,
          isStrictMode,
          identifierPrefix,
          null,
          onUncaughtError,
          onCaughtError,
          onRecoverableError,
          defaultOnDefaultTransitionIndicator
        ), container[internalContainerInstanceKey] = options2.current, listenToAllSupportedEvents(container), new ReactDOMRoot(options2);
      };
      exports.hydrateRoot = function(container, initialChildren, options2) {
        if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
        var isStrictMode = !1, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, formState = null;
        return options2 != null && (options2.unstable_strictMode === !0 && (isStrictMode = !0), options2.identifierPrefix !== void 0 && (identifierPrefix = options2.identifierPrefix), options2.onUncaughtError !== void 0 && (onUncaughtError = options2.onUncaughtError), options2.onCaughtError !== void 0 && (onCaughtError = options2.onCaughtError), options2.onRecoverableError !== void 0 && (onRecoverableError = options2.onRecoverableError), options2.formState !== void 0 && (formState = options2.formState)), initialChildren = createFiberRoot(
          container,
          1,
          !0,
          initialChildren,
          options2 != null ? options2 : null,
          isStrictMode,
          identifierPrefix,
          formState,
          onUncaughtError,
          onCaughtError,
          onRecoverableError,
          defaultOnDefaultTransitionIndicator
        ), initialChildren.context = getContextForSubtree(null), options2 = initialChildren.current, isStrictMode = requestUpdateLane(), isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode), identifierPrefix = createUpdate(isStrictMode), identifierPrefix.callback = null, enqueueUpdate(options2, identifierPrefix, isStrictMode), options2 = isStrictMode, initialChildren.current.lanes = options2, markRootUpdated$1(initialChildren, options2), ensureRootIsScheduled(initialChildren), container[internalContainerInstanceKey] = initialChildren.current, listenToAllSupportedEvents(container), new ReactDOMHydrationRoot(initialChildren);
      };
      exports.version = "19.2.1";
    }
  });

  // node_modules/react-dom/client.js
  var require_client = __commonJS({
    "node_modules/react-dom/client.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      function checkDCE() {
        if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ == "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
          try {
            __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
          } catch (err) {
            console.error(err);
          }
      }
      checkDCE(), module.exports = require_react_dom_client_production();
    }
  });

  // js/main.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react59 = __toESM(require_react()), import_client = __toESM(require_client());

  // node_modules/react-router-dom/dist/index.mjs
  init_define_SVG_ICONS_FONTAWESOME();

  // node_modules/react-router/dist/development/dom-export.mjs
  init_define_SVG_ICONS_FONTAWESOME();

  // node_modules/react-router/dist/development/chunk-EPOLDU6W.mjs
  init_define_SVG_ICONS_FONTAWESOME();
  var React = __toESM(require_react(), 1), React2 = __toESM(require_react(), 1), React3 = __toESM(require_react(), 1), React4 = __toESM(require_react(), 1), React9 = __toESM(require_react(), 1), React8 = __toESM(require_react(), 1), React7 = __toESM(require_react(), 1), React6 = __toESM(require_react(), 1), React5 = __toESM(require_react(), 1), React10 = __toESM(require_react(), 1), React11 = __toESM(require_react(), 1), import_meta = {};
  var __typeError = (msg) => {
    throw TypeError(msg);
  }, __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg), __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
  var PopStateEventType = "popstate";
  function createBrowserHistory(options = {}) {
    function createBrowserLocation(window2, globalHistory) {
      let { pathname, search, hash } = window2.location;
      return createLocation(
        "",
        { pathname, search, hash },
        // state defaults to `null` because `window.history.state` does
        globalHistory.state && globalHistory.state.usr || null,
        globalHistory.state && globalHistory.state.key || "default"
      );
    }
    function createBrowserHref(window2, to) {
      return typeof to == "string" ? to : createPath(to);
    }
    return getUrlBasedHistory(
      createBrowserLocation,
      createBrowserHref,
      null,
      options
    );
  }
  function invariant(value, message) {
    if (value === !1 || value === null || typeof value == "undefined")
      throw new Error(message);
  }
  function warning(cond, message) {
    if (!cond) {
      typeof console != "undefined" && console.warn(message);
      try {
        throw new Error(message);
      } catch (e) {
      }
    }
  }
  function createKey() {
    return Math.random().toString(36).substring(2, 10);
  }
  function getHistoryState(location2, index) {
    return {
      usr: location2.state,
      key: location2.key,
      idx: index
    };
  }
  function createLocation(current, to, state = null, key) {
    return {
      pathname: typeof current == "string" ? current : current.pathname,
      search: "",
      hash: "",
      ...typeof to == "string" ? parsePath(to) : to,
      state,
      // TODO: This could be cleaned up.  push/replace should probably just take
      // full Locations now and avoid the need to run through this flow at all
      // But that's a pretty big refactor to the current test suite so going to
      // keep as is for the time being and just let any incoming keys take precedence
      key: to && to.key || key || createKey()
    };
  }
  function createPath({
    pathname = "/",
    search = "",
    hash = ""
  }) {
    return search && search !== "?" && (pathname += search.charAt(0) === "?" ? search : "?" + search), hash && hash !== "#" && (pathname += hash.charAt(0) === "#" ? hash : "#" + hash), pathname;
  }
  function parsePath(path) {
    let parsedPath = {};
    if (path) {
      let hashIndex = path.indexOf("#");
      hashIndex >= 0 && (parsedPath.hash = path.substring(hashIndex), path = path.substring(0, hashIndex));
      let searchIndex = path.indexOf("?");
      searchIndex >= 0 && (parsedPath.search = path.substring(searchIndex), path = path.substring(0, searchIndex)), path && (parsedPath.pathname = path);
    }
    return parsedPath;
  }
  function getUrlBasedHistory(getLocation, createHref2, validateLocation, options = {}) {
    let { window: window2 = document.defaultView, v5Compat = !1 } = options, globalHistory = window2.history, action = "POP", listener = null, index = getIndex();
    index == null && (index = 0, globalHistory.replaceState({ ...globalHistory.state, idx: index }, ""));
    function getIndex() {
      return (globalHistory.state || { idx: null }).idx;
    }
    function handlePop() {
      action = "POP";
      let nextIndex = getIndex(), delta = nextIndex == null ? null : nextIndex - index;
      index = nextIndex, listener && listener({ action, location: history.location, delta });
    }
    function push(to, state) {
      action = "PUSH";
      let location2 = createLocation(history.location, to, state);
      validateLocation && validateLocation(location2, to), index = getIndex() + 1;
      let historyState = getHistoryState(location2, index), url = history.createHref(location2);
      try {
        globalHistory.pushState(historyState, "", url);
      } catch (error) {
        if (error instanceof DOMException && error.name === "DataCloneError")
          throw error;
        window2.location.assign(url);
      }
      v5Compat && listener && listener({ action, location: history.location, delta: 1 });
    }
    function replace2(to, state) {
      action = "REPLACE";
      let location2 = createLocation(history.location, to, state);
      validateLocation && validateLocation(location2, to), index = getIndex();
      let historyState = getHistoryState(location2, index), url = history.createHref(location2);
      globalHistory.replaceState(historyState, "", url), v5Compat && listener && listener({ action, location: history.location, delta: 0 });
    }
    function createURL(to) {
      return createBrowserURLImpl(to);
    }
    let history = {
      get action() {
        return action;
      },
      get location() {
        return getLocation(window2, globalHistory);
      },
      listen(fn) {
        if (listener)
          throw new Error("A history only accepts one active listener");
        return window2.addEventListener(PopStateEventType, handlePop), listener = fn, () => {
          window2.removeEventListener(PopStateEventType, handlePop), listener = null;
        };
      },
      createHref(to) {
        return createHref2(window2, to);
      },
      createURL,
      encodeLocation(to) {
        let url = createURL(to);
        return {
          pathname: url.pathname,
          search: url.search,
          hash: url.hash
        };
      },
      push,
      replace: replace2,
      go(n) {
        return globalHistory.go(n);
      }
    };
    return history;
  }
  function createBrowserURLImpl(to, isAbsolute = !1) {
    let base = "http://localhost";
    typeof window != "undefined" && (base = window.location.origin !== "null" ? window.location.origin : window.location.href), invariant(base, "No window.location.(origin|href) available to create URL");
    let href = typeof to == "string" ? to : createPath(to);
    return href = href.replace(/ $/, "%20"), !isAbsolute && href.startsWith("//") && (href = base + href), new URL(href, base);
  }
  function createContext4(defaultValue) {
    return { defaultValue };
  }
  var _map, RouterContextProvider = class {
    /**
     * Create a new `RouterContextProvider` instance
     * @param init An optional initial context map to populate the provider with
     */
    constructor(init) {
      if (__privateAdd(this, _map, /* @__PURE__ */ new Map()), init)
        for (let [context, value] of init)
          this.set(context, value);
    }
    /**
     * Access a value from the context. If no value has been set for the context,
     * it will return the context's `defaultValue` if provided, or throw an error
     * if no `defaultValue` was set.
     * @param context The context to get the value for
     * @returns The value for the context, or the context's `defaultValue` if no
     * value was set
     */
    get(context) {
      if (__privateGet(this, _map).has(context))
        return __privateGet(this, _map).get(context);
      if (context.defaultValue !== void 0)
        return context.defaultValue;
      throw new Error("No value found for context");
    }
    /**
     * Set a value for the context. If the context already has a value set, this
     * will overwrite it.
     *
     * @param context The context to set the value for
     * @param value The value to set for the context
     * @returns {void}
     */
    set(context, value) {
      __privateGet(this, _map).set(context, value);
    }
  };
  _map = /* @__PURE__ */ new WeakMap();
  var unsupportedLazyRouteObjectKeys = /* @__PURE__ */ new Set([
    "lazy",
    "caseSensitive",
    "path",
    "id",
    "index",
    "children"
  ]);
  function isUnsupportedLazyRouteObjectKey(key) {
    return unsupportedLazyRouteObjectKeys.has(
      key
    );
  }
  var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
    "lazy",
    "caseSensitive",
    "path",
    "id",
    "index",
    "middleware",
    "children"
  ]);
  function isUnsupportedLazyRouteFunctionKey(key) {
    return unsupportedLazyRouteFunctionKeys.has(
      key
    );
  }
  function isIndexRoute(route) {
    return route.index === !0;
  }
  function convertRoutesToDataRoutes(routes, mapRouteProperties2, parentPath = [], manifest = {}, allowInPlaceMutations = !1) {
    return routes.map((route, index) => {
      let treePath = [...parentPath, String(index)], id = typeof route.id == "string" ? route.id : treePath.join("-");
      if (invariant(
        route.index !== !0 || !route.children,
        "Cannot specify children on an index route"
      ), invariant(
        allowInPlaceMutations || !manifest[id],
        `Found a route id collision on id "${id}".  Route id's must be globally unique within Data Router usages`
      ), isIndexRoute(route)) {
        let indexRoute = {
          ...route,
          id
        };
        return manifest[id] = mergeRouteUpdates(
          indexRoute,
          mapRouteProperties2(indexRoute)
        ), indexRoute;
      } else {
        let pathOrLayoutRoute = {
          ...route,
          id,
          children: void 0
        };
        return manifest[id] = mergeRouteUpdates(
          pathOrLayoutRoute,
          mapRouteProperties2(pathOrLayoutRoute)
        ), route.children && (pathOrLayoutRoute.children = convertRoutesToDataRoutes(
          route.children,
          mapRouteProperties2,
          treePath,
          manifest,
          allowInPlaceMutations
        )), pathOrLayoutRoute;
      }
    });
  }
  function mergeRouteUpdates(route, updates) {
    return Object.assign(route, {
      ...updates,
      ...typeof updates.lazy == "object" && updates.lazy != null ? {
        lazy: {
          ...route.lazy,
          ...updates.lazy
        }
      } : {}
    });
  }
  function matchRoutes(routes, locationArg, basename = "/") {
    return matchRoutesImpl(routes, locationArg, basename, !1);
  }
  function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
    let location2 = typeof locationArg == "string" ? parsePath(locationArg) : locationArg, pathname = stripBasename(location2.pathname || "/", basename);
    if (pathname == null)
      return null;
    let branches = flattenRoutes(routes);
    rankRouteBranches(branches);
    let matches = null;
    for (let i = 0; matches == null && i < branches.length; ++i) {
      let decoded = decodePath(pathname);
      matches = matchRouteBranch(
        branches[i],
        decoded,
        allowPartial
      );
    }
    return matches;
  }
  function convertRouteMatchToUiMatch(match, loaderData) {
    let { route, pathname, params } = match;
    return {
      id: route.id,
      pathname,
      params,
      data: loaderData[route.id],
      loaderData: loaderData[route.id],
      handle: route.handle
    };
  }
  function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = !1) {
    let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
      let meta = {
        relativePath: relativePath === void 0 ? route.path || "" : relativePath,
        caseSensitive: route.caseSensitive === !0,
        childrenIndex: index,
        route
      };
      if (meta.relativePath.startsWith("/")) {
        if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments)
          return;
        invariant(
          meta.relativePath.startsWith(parentPath),
          `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
        ), meta.relativePath = meta.relativePath.slice(parentPath.length);
      }
      let path = joinPaths([parentPath, meta.relativePath]), routesMeta = parentsMeta.concat(meta);
      route.children && route.children.length > 0 && (invariant(
        // Our types know better, but runtime JS may not!
        // @ts-expect-error
        route.index !== !0,
        `Index routes must not have child routes. Please remove all child routes from route path "${path}".`
      ), flattenRoutes(
        route.children,
        branches,
        routesMeta,
        path,
        hasParentOptionalSegments
      )), !(route.path == null && !route.index) && branches.push({
        path,
        score: computeScore(path, route.index),
        routesMeta
      });
    };
    return routes.forEach((route, index) => {
      var _a2;
      if (route.path === "" || !((_a2 = route.path) != null && _a2.includes("?")))
        flattenRoute(route, index);
      else
        for (let exploded of explodeOptionalSegments(route.path))
          flattenRoute(route, index, !0, exploded);
    }), branches;
  }
  function explodeOptionalSegments(path) {
    let segments = path.split("/");
    if (segments.length === 0) return [];
    let [first, ...rest] = segments, isOptional = first.endsWith("?"), required = first.replace(/\?$/, "");
    if (rest.length === 0)
      return isOptional ? [required, ""] : [required];
    let restExploded = explodeOptionalSegments(rest.join("/")), result = [];
    return result.push(
      ...restExploded.map(
        (subpath) => subpath === "" ? required : [required, subpath].join("/")
      )
    ), isOptional && result.push(...restExploded), result.map(
      (exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded
    );
  }
  function rankRouteBranches(branches) {
    branches.sort(
      (a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(
        a.routesMeta.map((meta) => meta.childrenIndex),
        b.routesMeta.map((meta) => meta.childrenIndex)
      )
    );
  }
  var paramRe = /^:[\w-]+$/, dynamicSegmentValue = 3, indexRouteValue = 2, emptySegmentValue = 1, staticSegmentValue = 10, splatPenalty = -2, isSplat = (s) => s === "*";
  function computeScore(path, index) {
    let segments = path.split("/"), initialScore = segments.length;
    return segments.some(isSplat) && (initialScore += splatPenalty), index && (initialScore += indexRouteValue), segments.filter((s) => !isSplat(s)).reduce(
      (score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue),
      initialScore
    );
  }
  function compareIndexes(a, b) {
    return a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]) ? (
      // If two routes are siblings, we should try to match the earlier sibling
      // first. This allows people to have fine-grained control over the matching
      // behavior by simply putting routes with identical paths in the order they
      // want them tried.
      a[a.length - 1] - b[b.length - 1]
    ) : (
      // Otherwise, it doesn't really make sense to rank non-siblings by index,
      // so they sort equally.
      0
    );
  }
  function matchRouteBranch(branch, pathname, allowPartial = !1) {
    let { routesMeta } = branch, matchedParams = {}, matchedPathname = "/", matches = [];
    for (let i = 0; i < routesMeta.length; ++i) {
      let meta = routesMeta[i], end = i === routesMeta.length - 1, remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/", match = matchPath(
        { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },
        remainingPathname
      ), route = meta.route;
      if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index && (match = matchPath(
        {
          path: meta.relativePath,
          caseSensitive: meta.caseSensitive,
          end: !1
        },
        remainingPathname
      )), !match)
        return null;
      Object.assign(matchedParams, match.params), matches.push({
        // TODO: Can this as be avoided?
        params: matchedParams,
        pathname: joinPaths([matchedPathname, match.pathname]),
        pathnameBase: normalizePathname(
          joinPaths([matchedPathname, match.pathnameBase])
        ),
        route
      }), match.pathnameBase !== "/" && (matchedPathname = joinPaths([matchedPathname, match.pathnameBase]));
    }
    return matches;
  }
  function matchPath(pattern, pathname) {
    typeof pattern == "string" && (pattern = { path: pattern, caseSensitive: !1, end: !0 });
    let [matcher, compiledParams] = compilePath(
      pattern.path,
      pattern.caseSensitive,
      pattern.end
    ), match = pathname.match(matcher);
    if (!match) return null;
    let matchedPathname = match[0], pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1"), captureGroups = match.slice(1);
    return {
      params: compiledParams.reduce(
        (memo22, { paramName, isOptional }, index) => {
          if (paramName === "*") {
            let splatValue = captureGroups[index] || "";
            pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
          }
          let value = captureGroups[index];
          return isOptional && !value ? memo22[paramName] = void 0 : memo22[paramName] = (value || "").replace(/%2F/g, "/"), memo22;
        },
        {}
      ),
      pathname: matchedPathname,
      pathnameBase,
      pattern
    };
  }
  function compilePath(path, caseSensitive = !1, end = !0) {
    warning(
      path === "*" || !path.endsWith("*") || path.endsWith("/*"),
      `Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".`
    );
    let params = [], regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
      /\/:([\w-]+)(\?)?/g,
      (_, paramName, isOptional) => (params.push({ paramName, isOptional: isOptional != null }), isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)")
    ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
    return path.endsWith("*") ? (params.push({ paramName: "*" }), regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : end ? regexpSource += "\\/*$" : path !== "" && path !== "/" && (regexpSource += "(?:(?=\\/|$))"), [new RegExp(regexpSource, caseSensitive ? void 0 : "i"), params];
  }
  function decodePath(value) {
    try {
      return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
    } catch (error) {
      return warning(
        !1,
        `The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
      ), value;
    }
  }
  function stripBasename(pathname, basename) {
    if (basename === "/") return pathname;
    if (!pathname.toLowerCase().startsWith(basename.toLowerCase()))
      return null;
    let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length, nextChar = pathname.charAt(startIndex);
    return nextChar && nextChar !== "/" ? null : pathname.slice(startIndex) || "/";
  }
  function prependBasename({
    basename,
    pathname
  }) {
    return pathname === "/" ? basename : joinPaths([basename, pathname]);
  }
  var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
  function resolvePath(to, fromPathname = "/") {
    let {
      pathname: toPathname,
      search = "",
      hash = ""
    } = typeof to == "string" ? parsePath(to) : to, pathname;
    if (toPathname)
      if (isAbsoluteUrl(toPathname))
        pathname = toPathname;
      else {
        if (toPathname.includes("//")) {
          let oldPathname = toPathname;
          toPathname = toPathname.replace(/\/\/+/g, "/"), warning(
            !1,
            `Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`
          );
        }
        toPathname.startsWith("/") ? pathname = resolvePathname(toPathname.substring(1), "/") : pathname = resolvePathname(toPathname, fromPathname);
      }
    else
      pathname = fromPathname;
    return {
      pathname,
      search: normalizeSearch(search),
      hash: normalizeHash(hash)
    };
  }
  function resolvePathname(relativePath, fromPathname) {
    let segments = fromPathname.replace(/\/+$/, "").split("/");
    return relativePath.split("/").forEach((segment) => {
      segment === ".." ? segments.length > 1 && segments.pop() : segment !== "." && segments.push(segment);
    }), segments.length > 1 ? segments.join("/") : "/";
  }
  function getInvalidPathError(char, field, dest, path) {
    return `Cannot include a '${char}' character in a manually specified \`to.${field}\` field [${JSON.stringify(
      path
    )}].  Please separate it out to the \`to.${dest}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
  }
  function getPathContributingMatches(matches) {
    return matches.filter(
      (match, index) => index === 0 || match.route.path && match.route.path.length > 0
    );
  }
  function getResolveToMatches(matches) {
    let pathMatches = getPathContributingMatches(matches);
    return pathMatches.map(
      (match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase
    );
  }
  function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = !1) {
    let to;
    typeof toArg == "string" ? to = parsePath(toArg) : (to = { ...toArg }, invariant(
      !to.pathname || !to.pathname.includes("?"),
      getInvalidPathError("?", "pathname", "search", to)
    ), invariant(
      !to.pathname || !to.pathname.includes("#"),
      getInvalidPathError("#", "pathname", "hash", to)
    ), invariant(
      !to.search || !to.search.includes("#"),
      getInvalidPathError("#", "search", "hash", to)
    ));
    let isEmptyPath = toArg === "" || to.pathname === "", toPathname = isEmptyPath ? "/" : to.pathname, from;
    if (toPathname == null)
      from = locationPathname;
    else {
      let routePathnameIndex = routePathnames.length - 1;
      if (!isPathRelative && toPathname.startsWith("..")) {
        let toSegments = toPathname.split("/");
        for (; toSegments[0] === ".."; )
          toSegments.shift(), routePathnameIndex -= 1;
        to.pathname = toSegments.join("/");
      }
      from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
    }
    let path = resolvePath(to, from), hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/"), hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
    return !path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash) && (path.pathname += "/"), path;
  }
  var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/"), normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/"), normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search, normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
  var ErrorResponseImpl = class {
    constructor(status, statusText, data2, internal = !1) {
      this.status = status, this.statusText = statusText || "", this.internal = internal, data2 instanceof Error ? (this.data = data2.toString(), this.error = data2) : this.data = data2;
    }
  };
  function isRouteErrorResponse(error) {
    return error != null && typeof error.status == "number" && typeof error.statusText == "string" && typeof error.internal == "boolean" && "data" in error;
  }
  function getRoutePattern(matches) {
    return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
  }
  var isBrowser = typeof window != "undefined" && typeof window.document != "undefined" && typeof window.document.createElement != "undefined";
  function parseToInfo(_to, basename) {
    let to = _to;
    if (typeof to != "string" || !ABSOLUTE_URL_REGEX.test(to))
      return {
        absoluteURL: void 0,
        isExternal: !1,
        to
      };
    let absoluteURL = to, isExternal = !1;
    if (isBrowser)
      try {
        let currentUrl = new URL(window.location.href), targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to), path = stripBasename(targetUrl.pathname, basename);
        targetUrl.origin === currentUrl.origin && path != null ? to = path + targetUrl.search + targetUrl.hash : isExternal = !0;
      } catch (e) {
        warning(
          !1,
          `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
        );
      }
    return {
      absoluteURL,
      isExternal,
      to
    };
  }
  var UninstrumentedSymbol = /* @__PURE__ */ Symbol("Uninstrumented");
  function getRouteInstrumentationUpdates(fns, route) {
    let aggregated = {
      lazy: [],
      "lazy.loader": [],
      "lazy.action": [],
      "lazy.middleware": [],
      middleware: [],
      loader: [],
      action: []
    };
    fns.forEach(
      (fn) => fn({
        id: route.id,
        index: route.index,
        path: route.path,
        instrument(i) {
          let keys = Object.keys(aggregated);
          for (let key of keys)
            i[key] && aggregated[key].push(i[key]);
        }
      })
    );
    let updates = {};
    if (typeof route.lazy == "function" && aggregated.lazy.length > 0) {
      let instrumented = wrapImpl(aggregated.lazy, route.lazy, () => {
      });
      instrumented && (updates.lazy = instrumented);
    }
    if (typeof route.lazy == "object") {
      let lazyObject = route.lazy;
      ["middleware", "loader", "action"].forEach((key) => {
        let lazyFn = lazyObject[key], instrumentations = aggregated[`lazy.${key}`];
        if (typeof lazyFn == "function" && instrumentations.length > 0) {
          let instrumented = wrapImpl(instrumentations, lazyFn, () => {
          });
          instrumented && (updates.lazy = Object.assign(updates.lazy || {}, {
            [key]: instrumented
          }));
        }
      });
    }
    return ["loader", "action"].forEach((key) => {
      var _a2;
      let handler = route[key];
      if (typeof handler == "function" && aggregated[key].length > 0) {
        let original = (_a2 = handler[UninstrumentedSymbol]) != null ? _a2 : handler, instrumented = wrapImpl(
          aggregated[key],
          original,
          (...args) => getHandlerInfo(args[0])
        );
        instrumented && (key === "loader" && original.hydrate === !0 && (instrumented.hydrate = !0), instrumented[UninstrumentedSymbol] = original, updates[key] = instrumented);
      }
    }), route.middleware && route.middleware.length > 0 && aggregated.middleware.length > 0 && (updates.middleware = route.middleware.map((middleware) => {
      var _a2;
      let original = (_a2 = middleware[UninstrumentedSymbol]) != null ? _a2 : middleware, instrumented = wrapImpl(
        aggregated.middleware,
        original,
        (...args) => getHandlerInfo(args[0])
      );
      return instrumented ? (instrumented[UninstrumentedSymbol] = original, instrumented) : middleware;
    })), updates;
  }
  function instrumentClientSideRouter(router, fns) {
    var _a2, _b;
    let aggregated = {
      navigate: [],
      fetch: []
    };
    if (fns.forEach(
      (fn) => fn({
        instrument(i) {
          let keys = Object.keys(i);
          for (let key of keys)
            i[key] && aggregated[key].push(i[key]);
        }
      })
    ), aggregated.navigate.length > 0) {
      let navigate = (_a2 = router.navigate[UninstrumentedSymbol]) != null ? _a2 : router.navigate, instrumentedNavigate = wrapImpl(
        aggregated.navigate,
        navigate,
        (...args) => {
          let [to, opts] = args;
          return {
            to: typeof to == "number" || typeof to == "string" ? to : to ? createPath(to) : ".",
            ...getRouterInfo(router, opts != null ? opts : {})
          };
        }
      );
      instrumentedNavigate && (instrumentedNavigate[UninstrumentedSymbol] = navigate, router.navigate = instrumentedNavigate);
    }
    if (aggregated.fetch.length > 0) {
      let fetch2 = (_b = router.fetch[UninstrumentedSymbol]) != null ? _b : router.fetch, instrumentedFetch = wrapImpl(aggregated.fetch, fetch2, (...args) => {
        let [key, , href, opts] = args;
        return {
          href: href != null ? href : ".",
          fetcherKey: key,
          ...getRouterInfo(router, opts != null ? opts : {})
        };
      });
      instrumentedFetch && (instrumentedFetch[UninstrumentedSymbol] = fetch2, router.fetch = instrumentedFetch);
    }
    return router;
  }
  function wrapImpl(impls, handler, getInfo) {
    return impls.length === 0 ? null : async (...args) => {
      let result = await recurseRight(
        impls,
        getInfo(...args),
        () => handler(...args),
        impls.length - 1
      );
      if (result.type === "error")
        throw result.value;
      return result.value;
    };
  }
  async function recurseRight(impls, info, handler, index) {
    let impl = impls[index], result;
    if (impl) {
      let handlerPromise, callHandler = async () => (handlerPromise ? console.error("You cannot call instrumented handlers more than once") : handlerPromise = recurseRight(impls, info, handler, index - 1), result = await handlerPromise, invariant(result, "Expected a result"), result.type === "error" && result.value instanceof Error ? { status: "error", error: result.value } : { status: "success", error: void 0 });
      try {
        await impl(callHandler, info);
      } catch (e) {
        console.error("An instrumentation function threw an error:", e);
      }
      handlerPromise || await callHandler(), await handlerPromise;
    } else
      try {
        result = { type: "success", value: await handler() };
      } catch (e) {
        result = { type: "error", value: e };
      }
    return result || {
      type: "error",
      value: new Error("No result assigned in instrumentation chain.")
    };
  }
  function getHandlerInfo(args) {
    let { request, context, params, unstable_pattern } = args;
    return {
      request: getReadonlyRequest(request),
      params: { ...params },
      unstable_pattern,
      context: getReadonlyContext(context)
    };
  }
  function getRouterInfo(router, opts) {
    return {
      currentUrl: createPath(router.state.location),
      ..."formMethod" in opts ? { formMethod: opts.formMethod } : {},
      ..."formEncType" in opts ? { formEncType: opts.formEncType } : {},
      ..."formData" in opts ? { formData: opts.formData } : {},
      ..."body" in opts ? { body: opts.body } : {}
    };
  }
  function getReadonlyRequest(request) {
    return {
      method: request.method,
      url: request.url,
      headers: {
        get: (...args) => request.headers.get(...args)
      }
    };
  }
  function getReadonlyContext(context) {
    if (isPlainObject(context)) {
      let frozen = { ...context };
      return Object.freeze(frozen), frozen;
    } else
      return {
        get: (ctx) => context.get(ctx)
      };
  }
  var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
  function isPlainObject(thing) {
    if (thing === null || typeof thing != "object")
      return !1;
    let proto = Object.getPrototypeOf(thing);
    return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames;
  }
  var validMutationMethodsArr = [
    "POST",
    "PUT",
    "PATCH",
    "DELETE"
  ], validMutationMethods = new Set(
    validMutationMethodsArr
  ), validRequestMethodsArr = [
    "GET",
    ...validMutationMethodsArr
  ], validRequestMethods = new Set(validRequestMethodsArr), redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), redirectPreserveMethodStatusCodes = /* @__PURE__ */ new Set([307, 308]), IDLE_NAVIGATION = {
    state: "idle",
    location: void 0,
    formMethod: void 0,
    formAction: void 0,
    formEncType: void 0,
    formData: void 0,
    json: void 0,
    text: void 0
  }, IDLE_FETCHER = {
    state: "idle",
    data: void 0,
    formMethod: void 0,
    formAction: void 0,
    formEncType: void 0,
    formData: void 0,
    json: void 0,
    text: void 0
  }, IDLE_BLOCKER = {
    state: "unblocked",
    proceed: void 0,
    reset: void 0,
    location: void 0
  }, defaultMapRouteProperties = (route) => ({
    hasErrorBoundary: !!route.hasErrorBoundary
  }), TRANSITIONS_STORAGE_KEY = "remix-router-transitions", ResetLoaderDataSymbol = /* @__PURE__ */ Symbol("ResetLoaderData");
  function createRouter(init) {
    let routerWindow = init.window ? init.window : typeof window != "undefined" ? window : void 0, isBrowser3 = typeof routerWindow != "undefined" && typeof routerWindow.document != "undefined" && typeof routerWindow.document.createElement != "undefined";
    invariant(
      init.routes.length > 0,
      "You must provide a non-empty routes array to createRouter"
    );
    let hydrationRouteProperties2 = init.hydrationRouteProperties || [], _mapRouteProperties = init.mapRouteProperties || defaultMapRouteProperties, mapRouteProperties2 = _mapRouteProperties;
    if (init.unstable_instrumentations) {
      let instrumentations = init.unstable_instrumentations;
      mapRouteProperties2 = (route) => ({
        ..._mapRouteProperties(route),
        ...getRouteInstrumentationUpdates(
          instrumentations.map((i) => i.route).filter(Boolean),
          route
        )
      });
    }
    let manifest = {}, dataRoutes = convertRoutesToDataRoutes(
      init.routes,
      mapRouteProperties2,
      void 0,
      manifest
    ), inFlightDataRoutes, basename = init.basename || "/";
    basename.startsWith("/") || (basename = `/${basename}`);
    let dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware, future = {
      ...init.future
    }, unlistenHistory = null, subscribers = /* @__PURE__ */ new Set(), savedScrollPositions2 = null, getScrollRestorationKey2 = null, getScrollPosition = null, initialScrollRestored = init.hydrationData != null, initialMatches = matchRoutes(dataRoutes, init.history.location, basename), initialMatchesIsFOW = !1, initialErrors = null, initialized;
    if (initialMatches == null && !init.patchRoutesOnNavigation) {
      let error = getInternalRouterError(404, {
        pathname: init.history.location.pathname
      }), { matches, route } = getShortCircuitMatches(dataRoutes);
      initialized = !0, initialMatches = matches, initialErrors = { [route.id]: error };
    } else if (initialMatches && !init.hydrationData && checkFogOfWar(
      initialMatches,
      dataRoutes,
      init.history.location.pathname
    ).active && (initialMatches = null), initialMatches)
      if (initialMatches.some((m) => m.route.lazy))
        initialized = !1;
      else if (!initialMatches.some((m) => routeHasLoaderOrMiddleware(m.route)))
        initialized = !0;
      else {
        let loaderData = init.hydrationData ? init.hydrationData.loaderData : null, errors = init.hydrationData ? init.hydrationData.errors : null;
        if (errors) {
          let idx = initialMatches.findIndex(
            (m) => errors[m.route.id] !== void 0
          );
          initialized = initialMatches.slice(0, idx + 1).every(
            (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)
          );
        } else
          initialized = initialMatches.every(
            (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)
          );
      }
    else {
      initialized = !1, initialMatches = [];
      let fogOfWar = checkFogOfWar(
        null,
        dataRoutes,
        init.history.location.pathname
      );
      fogOfWar.active && fogOfWar.matches && (initialMatchesIsFOW = !0, initialMatches = fogOfWar.matches);
    }
    let router, state = {
      historyAction: init.history.action,
      location: init.history.location,
      matches: initialMatches,
      initialized,
      navigation: IDLE_NAVIGATION,
      // Don't restore on initial updateState() if we were SSR'd
      restoreScrollPosition: init.hydrationData != null ? !1 : null,
      preventScrollReset: !1,
      revalidation: "idle",
      loaderData: init.hydrationData && init.hydrationData.loaderData || {},
      actionData: init.hydrationData && init.hydrationData.actionData || null,
      errors: init.hydrationData && init.hydrationData.errors || initialErrors,
      fetchers: /* @__PURE__ */ new Map(),
      blockers: /* @__PURE__ */ new Map()
    }, pendingAction = "POP", pendingPopstateNavigationDfd = null, pendingPreventScrollReset = !1, pendingNavigationController, pendingViewTransitionEnabled = !1, appliedViewTransitions = /* @__PURE__ */ new Map(), removePageHideEventListener = null, isUninterruptedRevalidation = !1, isRevalidationRequired = !1, cancelledFetcherLoads = /* @__PURE__ */ new Set(), fetchControllers = /* @__PURE__ */ new Map(), incrementingLoadId = 0, pendingNavigationLoadId = -1, fetchReloadIds = /* @__PURE__ */ new Map(), fetchRedirectIds = /* @__PURE__ */ new Set(), fetchLoadMatches = /* @__PURE__ */ new Map(), activeFetchers = /* @__PURE__ */ new Map(), fetchersQueuedForDeletion = /* @__PURE__ */ new Set(), blockerFunctions = /* @__PURE__ */ new Map(), unblockBlockerHistoryUpdate, pendingRevalidationDfd = null;
    function initialize() {
      if (unlistenHistory = init.history.listen(
        ({ action: historyAction, location: location2, delta }) => {
          if (unblockBlockerHistoryUpdate) {
            unblockBlockerHistoryUpdate(), unblockBlockerHistoryUpdate = void 0;
            return;
          }
          warning(
            blockerFunctions.size === 0 || delta != null,
            "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL."
          );
          let blockerKey = shouldBlockNavigation({
            currentLocation: state.location,
            nextLocation: location2,
            historyAction
          });
          if (blockerKey && delta != null) {
            let nextHistoryUpdatePromise = new Promise((resolve) => {
              unblockBlockerHistoryUpdate = resolve;
            });
            init.history.go(delta * -1), updateBlocker(blockerKey, {
              state: "blocked",
              location: location2,
              proceed() {
                updateBlocker(blockerKey, {
                  state: "proceeding",
                  proceed: void 0,
                  reset: void 0,
                  location: location2
                }), nextHistoryUpdatePromise.then(() => init.history.go(delta));
              },
              reset() {
                let blockers = new Map(state.blockers);
                blockers.set(blockerKey, IDLE_BLOCKER), updateState({ blockers });
              }
            }), pendingPopstateNavigationDfd == null || pendingPopstateNavigationDfd.resolve(), pendingPopstateNavigationDfd = null;
            return;
          }
          return startNavigation(historyAction, location2);
        }
      ), isBrowser3) {
        restoreAppliedTransitions(routerWindow, appliedViewTransitions);
        let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
        routerWindow.addEventListener("pagehide", _saveAppliedTransitions), removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
      }
      return state.initialized || startNavigation("POP", state.location, {
        initialHydration: !0
      }), router;
    }
    function dispose() {
      unlistenHistory && unlistenHistory(), removePageHideEventListener && removePageHideEventListener(), subscribers.clear(), pendingNavigationController && pendingNavigationController.abort(), state.fetchers.forEach((_, key) => deleteFetcher(key)), state.blockers.forEach((_, key) => deleteBlocker(key));
    }
    function subscribe2(fn) {
      return subscribers.add(fn), () => subscribers.delete(fn);
    }
    function updateState(newState, opts = {}) {
      newState.matches && (newState.matches = newState.matches.map((m) => {
        let route = manifest[m.route.id], matchRoute = m.route;
        return matchRoute.element !== route.element || matchRoute.errorElement !== route.errorElement || matchRoute.hydrateFallbackElement !== route.hydrateFallbackElement ? {
          ...m,
          route
        } : m;
      })), state = {
        ...state,
        ...newState
      };
      let unmountedFetchers = [], mountedFetchers = [];
      state.fetchers.forEach((fetcher, key) => {
        fetcher.state === "idle" && (fetchersQueuedForDeletion.has(key) ? unmountedFetchers.push(key) : mountedFetchers.push(key));
      }), fetchersQueuedForDeletion.forEach((key) => {
        !state.fetchers.has(key) && !fetchControllers.has(key) && unmountedFetchers.push(key);
      }), [...subscribers].forEach(
        (subscriber) => {
          var _a2;
          return subscriber(state, {
            deletedFetchers: unmountedFetchers,
            newErrors: (_a2 = newState.errors) != null ? _a2 : null,
            viewTransitionOpts: opts.viewTransitionOpts,
            flushSync: opts.flushSync === !0
          });
        }
      ), unmountedFetchers.forEach((key) => deleteFetcher(key)), mountedFetchers.forEach((key) => state.fetchers.delete(key));
    }
    function completeNavigation(location2, newState, { flushSync: flushSync4 } = {}) {
      var _a2, _b;
      let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_a2 = location2.state) == null ? void 0 : _a2._isRedirect) !== !0, actionData;
      newState.actionData ? Object.keys(newState.actionData).length > 0 ? actionData = newState.actionData : actionData = null : isActionReload ? actionData = state.actionData : actionData = null;
      let loaderData = newState.loaderData ? mergeLoaderData(
        state.loaderData,
        newState.loaderData,
        newState.matches || [],
        newState.errors
      ) : state.loaderData, blockers = state.blockers;
      blockers.size > 0 && (blockers = new Map(blockers), blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER)));
      let restoreScrollPosition = isUninterruptedRevalidation ? !1 : getSavedScrollPosition(location2, newState.matches || state.matches), preventScrollReset = pendingPreventScrollReset === !0 || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_b = location2.state) == null ? void 0 : _b._isRedirect) !== !0;
      inFlightDataRoutes && (dataRoutes = inFlightDataRoutes, inFlightDataRoutes = void 0), isUninterruptedRevalidation || pendingAction === "POP" || (pendingAction === "PUSH" ? init.history.push(location2, location2.state) : pendingAction === "REPLACE" && init.history.replace(location2, location2.state));
      let viewTransitionOpts;
      if (pendingAction === "POP") {
        let priorPaths = appliedViewTransitions.get(state.location.pathname);
        priorPaths && priorPaths.has(location2.pathname) ? viewTransitionOpts = {
          currentLocation: state.location,
          nextLocation: location2
        } : appliedViewTransitions.has(location2.pathname) && (viewTransitionOpts = {
          currentLocation: location2,
          nextLocation: state.location
        });
      } else if (pendingViewTransitionEnabled) {
        let toPaths = appliedViewTransitions.get(state.location.pathname);
        toPaths ? toPaths.add(location2.pathname) : (toPaths = /* @__PURE__ */ new Set([location2.pathname]), appliedViewTransitions.set(state.location.pathname, toPaths)), viewTransitionOpts = {
          currentLocation: state.location,
          nextLocation: location2
        };
      }
      updateState(
        {
          ...newState,
          // matches, errors, fetchers go through as-is
          actionData,
          loaderData,
          historyAction: pendingAction,
          location: location2,
          initialized: !0,
          navigation: IDLE_NAVIGATION,
          revalidation: "idle",
          restoreScrollPosition,
          preventScrollReset,
          blockers
        },
        {
          viewTransitionOpts,
          flushSync: flushSync4 === !0
        }
      ), pendingAction = "POP", pendingPreventScrollReset = !1, pendingViewTransitionEnabled = !1, isUninterruptedRevalidation = !1, isRevalidationRequired = !1, pendingPopstateNavigationDfd == null || pendingPopstateNavigationDfd.resolve(), pendingPopstateNavigationDfd = null, pendingRevalidationDfd == null || pendingRevalidationDfd.resolve(), pendingRevalidationDfd = null;
    }
    async function navigate(to, opts) {
      if (pendingPopstateNavigationDfd == null || pendingPopstateNavigationDfd.resolve(), pendingPopstateNavigationDfd = null, typeof to == "number") {
        pendingPopstateNavigationDfd || (pendingPopstateNavigationDfd = createDeferred());
        let promise = pendingPopstateNavigationDfd.promise;
        return init.history.go(to), promise;
      }
      let normalizedPath = normalizeTo(
        state.location,
        state.matches,
        basename,
        to,
        opts == null ? void 0 : opts.fromRouteId,
        opts == null ? void 0 : opts.relative
      ), { path, submission, error } = normalizeNavigateOptions(
        !1,
        normalizedPath,
        opts
      ), currentLocation = state.location, nextLocation = createLocation(state.location, path, opts && opts.state);
      nextLocation = {
        ...nextLocation,
        ...init.history.encodeLocation(nextLocation)
      };
      let userReplace = opts && opts.replace != null ? opts.replace : void 0, historyAction = "PUSH";
      userReplace === !0 ? historyAction = "REPLACE" : userReplace === !1 || submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search && (historyAction = "REPLACE");
      let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === !0 : void 0, flushSync4 = (opts && opts.flushSync) === !0, blockerKey = shouldBlockNavigation({
        currentLocation,
        nextLocation,
        historyAction
      });
      if (blockerKey) {
        updateBlocker(blockerKey, {
          state: "blocked",
          location: nextLocation,
          proceed() {
            updateBlocker(blockerKey, {
              state: "proceeding",
              proceed: void 0,
              reset: void 0,
              location: nextLocation
            }), navigate(to, opts);
          },
          reset() {
            let blockers = new Map(state.blockers);
            blockers.set(blockerKey, IDLE_BLOCKER), updateState({ blockers });
          }
        });
        return;
      }
      await startNavigation(historyAction, nextLocation, {
        submission,
        // Send through the formData serialization error if we have one so we can
        // render at the right error boundary after we match routes
        pendingError: error,
        preventScrollReset,
        replace: opts && opts.replace,
        enableViewTransition: opts && opts.viewTransition,
        flushSync: flushSync4,
        callSiteDefaultShouldRevalidate: opts && opts.unstable_defaultShouldRevalidate
      });
    }
    function revalidate() {
      pendingRevalidationDfd || (pendingRevalidationDfd = createDeferred()), interruptActiveLoads(), updateState({ revalidation: "loading" });
      let promise = pendingRevalidationDfd.promise;
      return state.navigation.state === "submitting" ? promise : state.navigation.state === "idle" ? (startNavigation(state.historyAction, state.location, {
        startUninterruptedRevalidation: !0
      }), promise) : (startNavigation(
        pendingAction || state.historyAction,
        state.navigation.location,
        {
          overrideNavigation: state.navigation,
          // Proxy through any rending view transition
          enableViewTransition: pendingViewTransitionEnabled === !0
        }
      ), promise);
    }
    async function startNavigation(historyAction, location2, opts) {
      pendingNavigationController && pendingNavigationController.abort(), pendingNavigationController = null, pendingAction = historyAction, isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === !0, saveScrollPosition(state.location, state.matches), pendingPreventScrollReset = (opts && opts.preventScrollReset) === !0, pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === !0;
      let routesToUse = inFlightDataRoutes || dataRoutes, loadingNavigation = opts && opts.overrideNavigation, matches = opts != null && opts.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
        // `matchRoutes()` has already been called if we're in here via `router.initialize()`
        state.matches
      ) : matchRoutes(routesToUse, location2, basename), flushSync4 = (opts && opts.flushSync) === !0;
      if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location2) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
        completeNavigation(location2, { matches }, { flushSync: flushSync4 });
        return;
      }
      let fogOfWar = checkFogOfWar(matches, routesToUse, location2.pathname);
      if (fogOfWar.active && fogOfWar.matches && (matches = fogOfWar.matches), !matches) {
        let { error, notFoundMatches, route } = handleNavigational404(
          location2.pathname
        );
        completeNavigation(
          location2,
          {
            matches: notFoundMatches,
            loaderData: {},
            errors: {
              [route.id]: error
            }
          },
          { flushSync: flushSync4 }
        );
        return;
      }
      pendingNavigationController = new AbortController();
      let request = createClientSideRequest(
        init.history,
        location2,
        pendingNavigationController.signal,
        opts && opts.submission
      ), scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider(), pendingActionResult;
      if (opts && opts.pendingError)
        pendingActionResult = [
          findNearestBoundary(matches).route.id,
          { type: "error", error: opts.pendingError }
        ];
      else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
        let actionResult = await handleAction(
          request,
          location2,
          opts.submission,
          matches,
          scopedContext,
          fogOfWar.active,
          opts && opts.initialHydration === !0,
          { replace: opts.replace, flushSync: flushSync4 }
        );
        if (actionResult.shortCircuited)
          return;
        if (actionResult.pendingActionResult) {
          let [routeId, result] = actionResult.pendingActionResult;
          if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {
            pendingNavigationController = null, completeNavigation(location2, {
              matches: actionResult.matches,
              loaderData: {},
              errors: {
                [routeId]: result.error
              }
            });
            return;
          }
        }
        matches = actionResult.matches || matches, pendingActionResult = actionResult.pendingActionResult, loadingNavigation = getLoadingNavigation(location2, opts.submission), flushSync4 = !1, fogOfWar.active = !1, request = createClientSideRequest(
          init.history,
          request.url,
          request.signal
        );
      }
      let {
        shortCircuited,
        matches: updatedMatches,
        loaderData,
        errors
      } = await handleLoaders(
        request,
        location2,
        matches,
        scopedContext,
        fogOfWar.active,
        loadingNavigation,
        opts && opts.submission,
        opts && opts.fetcherSubmission,
        opts && opts.replace,
        opts && opts.initialHydration === !0,
        flushSync4,
        pendingActionResult,
        opts && opts.callSiteDefaultShouldRevalidate
      );
      shortCircuited || (pendingNavigationController = null, completeNavigation(location2, {
        matches: updatedMatches || matches,
        ...getActionDataForCommit(pendingActionResult),
        loaderData,
        errors
      }));
    }
    async function handleAction(request, location2, submission, matches, scopedContext, isFogOfWar, initialHydration, opts = {}) {
      interruptActiveLoads();
      let navigation2 = getSubmittingNavigation(location2, submission);
      if (updateState({ navigation: navigation2 }, { flushSync: opts.flushSync === !0 }), isFogOfWar) {
        let discoverResult = await discoverRoutes(
          matches,
          location2.pathname,
          request.signal
        );
        if (discoverResult.type === "aborted")
          return { shortCircuited: !0 };
        if (discoverResult.type === "error") {
          if (discoverResult.partialMatches.length === 0) {
            let { matches: matches2, route } = getShortCircuitMatches(dataRoutes);
            return {
              matches: matches2,
              pendingActionResult: [
                route.id,
                {
                  type: "error",
                  error: discoverResult.error
                }
              ]
            };
          }
          let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;
          return {
            matches: discoverResult.partialMatches,
            pendingActionResult: [
              boundaryId,
              {
                type: "error",
                error: discoverResult.error
              }
            ]
          };
        } else if (discoverResult.matches)
          matches = discoverResult.matches;
        else {
          let { notFoundMatches, error, route } = handleNavigational404(
            location2.pathname
          );
          return {
            matches: notFoundMatches,
            pendingActionResult: [
              route.id,
              {
                type: "error",
                error
              }
            ]
          };
        }
      }
      let result, actionMatch = getTargetMatch(matches, location2);
      if (!actionMatch.route.action && !actionMatch.route.lazy)
        result = {
          type: "error",
          error: getInternalRouterError(405, {
            method: request.method,
            pathname: location2.pathname,
            routeId: actionMatch.route.id
          })
        };
      else {
        let dsMatches = getTargetedDataStrategyMatches(
          mapRouteProperties2,
          manifest,
          request,
          matches,
          actionMatch,
          initialHydration ? [] : hydrationRouteProperties2,
          scopedContext
        ), results = await callDataStrategy(
          request,
          dsMatches,
          scopedContext,
          null
        );
        if (result = results[actionMatch.route.id], !result) {
          for (let match of matches)
            if (results[match.route.id]) {
              result = results[match.route.id];
              break;
            }
        }
        if (request.signal.aborted)
          return { shortCircuited: !0 };
      }
      if (isRedirectResult(result)) {
        let replace2;
        return opts && opts.replace != null ? replace2 = opts.replace : replace2 = normalizeRedirectLocation(
          result.response.headers.get("Location"),
          new URL(request.url),
          basename,
          init.history
        ) === state.location.pathname + state.location.search, await startRedirectNavigation(request, result, !0, {
          submission,
          replace: replace2
        }), { shortCircuited: !0 };
      }
      if (isErrorResult(result)) {
        let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
        return (opts && opts.replace) !== !0 && (pendingAction = "PUSH"), {
          matches,
          pendingActionResult: [
            boundaryMatch.route.id,
            result,
            actionMatch.route.id
          ]
        };
      }
      return {
        matches,
        pendingActionResult: [actionMatch.route.id, result]
      };
    }
    async function handleLoaders(request, location2, matches, scopedContext, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace2, initialHydration, flushSync4, pendingActionResult, callSiteDefaultShouldRevalidate) {
      let loadingNavigation = overrideNavigation || getLoadingNavigation(location2, submission), activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation), shouldUpdateNavigationState = !isUninterruptedRevalidation && !initialHydration;
      if (isFogOfWar) {
        if (shouldUpdateNavigationState) {
          let actionData = getUpdatedActionData(pendingActionResult);
          updateState(
            {
              navigation: loadingNavigation,
              ...actionData !== void 0 ? { actionData } : {}
            },
            {
              flushSync: flushSync4
            }
          );
        }
        let discoverResult = await discoverRoutes(
          matches,
          location2.pathname,
          request.signal
        );
        if (discoverResult.type === "aborted")
          return { shortCircuited: !0 };
        if (discoverResult.type === "error") {
          if (discoverResult.partialMatches.length === 0) {
            let { matches: matches2, route } = getShortCircuitMatches(dataRoutes);
            return {
              matches: matches2,
              loaderData: {},
              errors: {
                [route.id]: discoverResult.error
              }
            };
          }
          let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;
          return {
            matches: discoverResult.partialMatches,
            loaderData: {},
            errors: {
              [boundaryId]: discoverResult.error
            }
          };
        } else if (discoverResult.matches)
          matches = discoverResult.matches;
        else {
          let { error, notFoundMatches, route } = handleNavigational404(
            location2.pathname
          );
          return {
            matches: notFoundMatches,
            loaderData: {},
            errors: {
              [route.id]: error
            }
          };
        }
      }
      let routesToUse = inFlightDataRoutes || dataRoutes, { dsMatches, revalidatingFetchers } = getMatchesToLoad(
        request,
        scopedContext,
        mapRouteProperties2,
        manifest,
        init.history,
        state,
        matches,
        activeSubmission,
        location2,
        initialHydration ? [] : hydrationRouteProperties2,
        initialHydration === !0,
        isRevalidationRequired,
        cancelledFetcherLoads,
        fetchersQueuedForDeletion,
        fetchLoadMatches,
        fetchRedirectIds,
        routesToUse,
        basename,
        init.patchRoutesOnNavigation != null,
        pendingActionResult,
        callSiteDefaultShouldRevalidate
      );
      if (pendingNavigationLoadId = ++incrementingLoadId, !init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some(
        (m) => m.route.middleware && m.route.middleware.length > 0
      ) && revalidatingFetchers.length === 0) {
        let updatedFetchers2 = markFetchRedirectsDone();
        return completeNavigation(
          location2,
          {
            matches,
            loaderData: {},
            // Commit pending error if we're short circuiting
            errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null,
            ...getActionDataForCommit(pendingActionResult),
            ...updatedFetchers2 ? { fetchers: new Map(state.fetchers) } : {}
          },
          { flushSync: flushSync4 }
        ), { shortCircuited: !0 };
      }
      if (shouldUpdateNavigationState) {
        let updates = {};
        if (!isFogOfWar) {
          updates.navigation = loadingNavigation;
          let actionData = getUpdatedActionData(pendingActionResult);
          actionData !== void 0 && (updates.actionData = actionData);
        }
        revalidatingFetchers.length > 0 && (updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers)), updateState(updates, { flushSync: flushSync4 });
      }
      revalidatingFetchers.forEach((rf) => {
        abortFetcher(rf.key), rf.controller && fetchControllers.set(rf.key, rf.controller);
      });
      let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key));
      pendingNavigationController && pendingNavigationController.signal.addEventListener(
        "abort",
        abortPendingFetchRevalidations
      );
      let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(
        dsMatches,
        revalidatingFetchers,
        request,
        scopedContext
      );
      if (request.signal.aborted)
        return { shortCircuited: !0 };
      pendingNavigationController && pendingNavigationController.signal.removeEventListener(
        "abort",
        abortPendingFetchRevalidations
      ), revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));
      let redirect2 = findRedirect(loaderResults);
      if (redirect2)
        return await startRedirectNavigation(request, redirect2.result, !0, {
          replace: replace2
        }), { shortCircuited: !0 };
      if (redirect2 = findRedirect(fetcherResults), redirect2)
        return fetchRedirectIds.add(redirect2.key), await startRedirectNavigation(request, redirect2.result, !0, {
          replace: replace2
        }), { shortCircuited: !0 };
      let { loaderData, errors } = processLoaderData(
        state,
        matches,
        loaderResults,
        pendingActionResult,
        revalidatingFetchers,
        fetcherResults
      );
      initialHydration && state.errors && (errors = { ...state.errors, ...errors });
      let updatedFetchers = markFetchRedirectsDone(), didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId), shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
      return {
        matches,
        loaderData,
        errors,
        ...shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {}
      };
    }
    function getUpdatedActionData(pendingActionResult) {
      if (pendingActionResult && !isErrorResult(pendingActionResult[1]))
        return {
          [pendingActionResult[0]]: pendingActionResult[1].data
        };
      if (state.actionData)
        return Object.keys(state.actionData).length === 0 ? null : state.actionData;
    }
    function getUpdatedRevalidatingFetchers(revalidatingFetchers) {
      return revalidatingFetchers.forEach((rf) => {
        let fetcher = state.fetchers.get(rf.key), revalidatingFetcher = getLoadingFetcher(
          void 0,
          fetcher ? fetcher.data : void 0
        );
        state.fetchers.set(rf.key, revalidatingFetcher);
      }), new Map(state.fetchers);
    }
    async function fetch2(key, routeId, href, opts) {
      abortFetcher(key);
      let flushSync4 = (opts && opts.flushSync) === !0, routesToUse = inFlightDataRoutes || dataRoutes, normalizedPath = normalizeTo(
        state.location,
        state.matches,
        basename,
        href,
        routeId,
        opts == null ? void 0 : opts.relative
      ), matches = matchRoutes(routesToUse, normalizedPath, basename), fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);
      if (fogOfWar.active && fogOfWar.matches && (matches = fogOfWar.matches), !matches) {
        setFetcherError(
          key,
          routeId,
          getInternalRouterError(404, { pathname: normalizedPath }),
          { flushSync: flushSync4 }
        );
        return;
      }
      let { path, submission, error } = normalizeNavigateOptions(
        !0,
        normalizedPath,
        opts
      );
      if (error) {
        setFetcherError(key, routeId, error, { flushSync: flushSync4 });
        return;
      }
      let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider(), preventScrollReset = (opts && opts.preventScrollReset) === !0;
      if (submission && isMutationMethod(submission.formMethod)) {
        await handleFetcherAction(
          key,
          routeId,
          path,
          matches,
          scopedContext,
          fogOfWar.active,
          flushSync4,
          preventScrollReset,
          submission,
          opts && opts.unstable_defaultShouldRevalidate
        );
        return;
      }
      fetchLoadMatches.set(key, { routeId, path }), await handleFetcherLoader(
        key,
        routeId,
        path,
        matches,
        scopedContext,
        fogOfWar.active,
        flushSync4,
        preventScrollReset,
        submission
      );
    }
    async function handleFetcherAction(key, routeId, path, requestMatches, scopedContext, isFogOfWar, flushSync4, preventScrollReset, submission, callSiteDefaultShouldRevalidate) {
      interruptActiveLoads(), fetchLoadMatches.delete(key);
      let existingFetcher = state.fetchers.get(key);
      updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {
        flushSync: flushSync4
      });
      let abortController = new AbortController(), fetchRequest = createClientSideRequest(
        init.history,
        path,
        abortController.signal,
        submission
      );
      if (isFogOfWar) {
        let discoverResult = await discoverRoutes(
          requestMatches,
          new URL(fetchRequest.url).pathname,
          fetchRequest.signal,
          key
        );
        if (discoverResult.type === "aborted")
          return;
        if (discoverResult.type === "error") {
          setFetcherError(key, routeId, discoverResult.error, { flushSync: flushSync4 });
          return;
        } else if (discoverResult.matches)
          requestMatches = discoverResult.matches;
        else {
          setFetcherError(
            key,
            routeId,
            getInternalRouterError(404, { pathname: path }),
            { flushSync: flushSync4 }
          );
          return;
        }
      }
      let match = getTargetMatch(requestMatches, path);
      if (!match.route.action && !match.route.lazy) {
        let error = getInternalRouterError(405, {
          method: submission.formMethod,
          pathname: path,
          routeId
        });
        setFetcherError(key, routeId, error, { flushSync: flushSync4 });
        return;
      }
      fetchControllers.set(key, abortController);
      let originatingLoadId = incrementingLoadId, fetchMatches = getTargetedDataStrategyMatches(
        mapRouteProperties2,
        manifest,
        fetchRequest,
        requestMatches,
        match,
        hydrationRouteProperties2,
        scopedContext
      ), actionResults = await callDataStrategy(
        fetchRequest,
        fetchMatches,
        scopedContext,
        key
      ), actionResult = actionResults[match.route.id];
      if (!actionResult) {
        for (let match2 of fetchMatches)
          if (actionResults[match2.route.id]) {
            actionResult = actionResults[match2.route.id];
            break;
          }
      }
      if (fetchRequest.signal.aborted) {
        fetchControllers.get(key) === abortController && fetchControllers.delete(key);
        return;
      }
      if (fetchersQueuedForDeletion.has(key)) {
        if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {
          updateFetcherState(key, getDoneFetcher(void 0));
          return;
        }
      } else {
        if (isRedirectResult(actionResult))
          if (fetchControllers.delete(key), pendingNavigationLoadId > originatingLoadId) {
            updateFetcherState(key, getDoneFetcher(void 0));
            return;
          } else
            return fetchRedirectIds.add(key), updateFetcherState(key, getLoadingFetcher(submission)), startRedirectNavigation(fetchRequest, actionResult, !1, {
              fetcherSubmission: submission,
              preventScrollReset
            });
        if (isErrorResult(actionResult)) {
          setFetcherError(key, routeId, actionResult.error);
          return;
        }
      }
      let nextLocation = state.navigation.location || state.location, revalidationRequest = createClientSideRequest(
        init.history,
        nextLocation,
        abortController.signal
      ), routesToUse = inFlightDataRoutes || dataRoutes, matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
      invariant(matches, "Didn't find any matches after fetcher action");
      let loadId = ++incrementingLoadId;
      fetchReloadIds.set(key, loadId);
      let loadFetcher = getLoadingFetcher(submission, actionResult.data);
      state.fetchers.set(key, loadFetcher);
      let { dsMatches, revalidatingFetchers } = getMatchesToLoad(
        revalidationRequest,
        scopedContext,
        mapRouteProperties2,
        manifest,
        init.history,
        state,
        matches,
        submission,
        nextLocation,
        hydrationRouteProperties2,
        !1,
        isRevalidationRequired,
        cancelledFetcherLoads,
        fetchersQueuedForDeletion,
        fetchLoadMatches,
        fetchRedirectIds,
        routesToUse,
        basename,
        init.patchRoutesOnNavigation != null,
        [match.route.id, actionResult],
        callSiteDefaultShouldRevalidate
      );
      revalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => {
        let staleKey = rf.key, existingFetcher2 = state.fetchers.get(staleKey), revalidatingFetcher = getLoadingFetcher(
          void 0,
          existingFetcher2 ? existingFetcher2.data : void 0
        );
        state.fetchers.set(staleKey, revalidatingFetcher), abortFetcher(staleKey), rf.controller && fetchControllers.set(staleKey, rf.controller);
      }), updateState({ fetchers: new Map(state.fetchers) });
      let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));
      abortController.signal.addEventListener(
        "abort",
        abortPendingFetchRevalidations
      );
      let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(
        dsMatches,
        revalidatingFetchers,
        revalidationRequest,
        scopedContext
      );
      if (abortController.signal.aborted)
        return;
      if (abortController.signal.removeEventListener(
        "abort",
        abortPendingFetchRevalidations
      ), fetchReloadIds.delete(key), fetchControllers.delete(key), revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key)), state.fetchers.has(key)) {
        let doneFetcher = getDoneFetcher(actionResult.data);
        state.fetchers.set(key, doneFetcher);
      }
      let redirect2 = findRedirect(loaderResults);
      if (redirect2)
        return startRedirectNavigation(
          revalidationRequest,
          redirect2.result,
          !1,
          { preventScrollReset }
        );
      if (redirect2 = findRedirect(fetcherResults), redirect2)
        return fetchRedirectIds.add(redirect2.key), startRedirectNavigation(
          revalidationRequest,
          redirect2.result,
          !1,
          { preventScrollReset }
        );
      let { loaderData, errors } = processLoaderData(
        state,
        matches,
        loaderResults,
        void 0,
        revalidatingFetchers,
        fetcherResults
      );
      abortStaleFetchLoads(loadId), state.navigation.state === "loading" && loadId > pendingNavigationLoadId ? (invariant(pendingAction, "Expected pending action"), pendingNavigationController && pendingNavigationController.abort(), completeNavigation(state.navigation.location, {
        matches,
        loaderData,
        errors,
        fetchers: new Map(state.fetchers)
      })) : (updateState({
        errors,
        loaderData: mergeLoaderData(
          state.loaderData,
          loaderData,
          matches,
          errors
        ),
        fetchers: new Map(state.fetchers)
      }), isRevalidationRequired = !1);
    }
    async function handleFetcherLoader(key, routeId, path, matches, scopedContext, isFogOfWar, flushSync4, preventScrollReset, submission) {
      let existingFetcher = state.fetchers.get(key);
      updateFetcherState(
        key,
        getLoadingFetcher(
          submission,
          existingFetcher ? existingFetcher.data : void 0
        ),
        { flushSync: flushSync4 }
      );
      let abortController = new AbortController(), fetchRequest = createClientSideRequest(
        init.history,
        path,
        abortController.signal
      );
      if (isFogOfWar) {
        let discoverResult = await discoverRoutes(
          matches,
          new URL(fetchRequest.url).pathname,
          fetchRequest.signal,
          key
        );
        if (discoverResult.type === "aborted")
          return;
        if (discoverResult.type === "error") {
          setFetcherError(key, routeId, discoverResult.error, { flushSync: flushSync4 });
          return;
        } else if (discoverResult.matches)
          matches = discoverResult.matches;
        else {
          setFetcherError(
            key,
            routeId,
            getInternalRouterError(404, { pathname: path }),
            { flushSync: flushSync4 }
          );
          return;
        }
      }
      let match = getTargetMatch(matches, path);
      fetchControllers.set(key, abortController);
      let originatingLoadId = incrementingLoadId, dsMatches = getTargetedDataStrategyMatches(
        mapRouteProperties2,
        manifest,
        fetchRequest,
        matches,
        match,
        hydrationRouteProperties2,
        scopedContext
      ), result = (await callDataStrategy(
        fetchRequest,
        dsMatches,
        scopedContext,
        key
      ))[match.route.id];
      if (fetchControllers.get(key) === abortController && fetchControllers.delete(key), !fetchRequest.signal.aborted) {
        if (fetchersQueuedForDeletion.has(key)) {
          updateFetcherState(key, getDoneFetcher(void 0));
          return;
        }
        if (isRedirectResult(result))
          if (pendingNavigationLoadId > originatingLoadId) {
            updateFetcherState(key, getDoneFetcher(void 0));
            return;
          } else {
            fetchRedirectIds.add(key), await startRedirectNavigation(fetchRequest, result, !1, {
              preventScrollReset
            });
            return;
          }
        if (isErrorResult(result)) {
          setFetcherError(key, routeId, result.error);
          return;
        }
        updateFetcherState(key, getDoneFetcher(result.data));
      }
    }
    async function startRedirectNavigation(request, redirect2, isNavigation, {
      submission,
      fetcherSubmission,
      preventScrollReset,
      replace: replace2
    } = {}) {
      isNavigation || (pendingPopstateNavigationDfd == null || pendingPopstateNavigationDfd.resolve(), pendingPopstateNavigationDfd = null), redirect2.response.headers.has("X-Remix-Revalidate") && (isRevalidationRequired = !0);
      let location2 = redirect2.response.headers.get("Location");
      invariant(location2, "Expected a Location header on the redirect Response"), location2 = normalizeRedirectLocation(
        location2,
        new URL(request.url),
        basename,
        init.history
      );
      let redirectLocation = createLocation(state.location, location2, {
        _isRedirect: !0
      });
      if (isBrowser3) {
        let isDocumentReload = !1;
        if (redirect2.response.headers.has("X-Remix-Reload-Document"))
          isDocumentReload = !0;
        else if (isAbsoluteUrl(location2)) {
          let url = createBrowserURLImpl(location2, !0);
          isDocumentReload = // Hard reload if it's an absolute URL to a new origin
          url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename
          stripBasename(url.pathname, basename) == null;
        }
        if (isDocumentReload) {
          replace2 ? routerWindow.location.replace(location2) : routerWindow.location.assign(location2);
          return;
        }
      }
      pendingNavigationController = null;
      let redirectNavigationType = replace2 === !0 || redirect2.response.headers.has("X-Remix-Replace") ? "REPLACE" : "PUSH", { formMethod, formAction, formEncType } = state.navigation;
      !submission && !fetcherSubmission && formMethod && formAction && formEncType && (submission = getSubmissionFromNavigation(state.navigation));
      let activeSubmission = submission || fetcherSubmission;
      if (redirectPreserveMethodStatusCodes.has(redirect2.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod))
        await startNavigation(redirectNavigationType, redirectLocation, {
          submission: {
            ...activeSubmission,
            formAction: location2
          },
          // Preserve these flags across redirects
          preventScrollReset: preventScrollReset || pendingPreventScrollReset,
          enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0
        });
      else {
        let overrideNavigation = getLoadingNavigation(
          redirectLocation,
          submission
        );
        await startNavigation(redirectNavigationType, redirectLocation, {
          overrideNavigation,
          // Send fetcher submissions through for shouldRevalidate
          fetcherSubmission,
          // Preserve these flags across redirects
          preventScrollReset: preventScrollReset || pendingPreventScrollReset,
          enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0
        });
      }
    }
    async function callDataStrategy(request, matches, scopedContext, fetcherKey) {
      var _a2;
      let results, dataResults = {};
      try {
        results = await callDataStrategyImpl(
          dataStrategyImpl,
          request,
          matches,
          fetcherKey,
          scopedContext,
          !1
        );
      } catch (e) {
        return matches.filter((m) => m.shouldLoad).forEach((m) => {
          dataResults[m.route.id] = {
            type: "error",
            error: e
          };
        }), dataResults;
      }
      if (request.signal.aborted)
        return dataResults;
      if (!isMutationMethod(request.method))
        for (let match of matches) {
          if (((_a2 = results[match.route.id]) == null ? void 0 : _a2.type) === "error")
            break;
          !results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler() && (results[match.route.id] = {
            type: "error",
            result: new Error(
              `No result returned from dataStrategy for route ${match.route.id}`
            )
          });
        }
      for (let [routeId, result] of Object.entries(results))
        if (isRedirectDataStrategyResult(result)) {
          let response = result.result;
          dataResults[routeId] = {
            type: "redirect",
            response: normalizeRelativeRoutingRedirectResponse(
              response,
              request,
              routeId,
              matches,
              basename
            )
          };
        } else
          dataResults[routeId] = await convertDataStrategyResultToDataResult(result);
      return dataResults;
    }
    async function callLoadersAndMaybeResolveData(matches, fetchersToLoad, request, scopedContext) {
      let loaderResultsPromise = callDataStrategy(
        request,
        matches,
        scopedContext,
        null
      ), fetcherResultsPromise = Promise.all(
        fetchersToLoad.map(async (f) => {
          if (f.matches && f.match && f.request && f.controller) {
            let result = (await callDataStrategy(
              f.request,
              f.matches,
              scopedContext,
              f.key
            ))[f.match.route.id];
            return { [f.key]: result };
          } else
            return Promise.resolve({
              [f.key]: {
                type: "error",
                error: getInternalRouterError(404, {
                  pathname: f.path
                })
              }
            });
        })
      ), loaderResults = await loaderResultsPromise, fetcherResults = (await fetcherResultsPromise).reduce(
        (acc, r) => Object.assign(acc, r),
        {}
      );
      return {
        loaderResults,
        fetcherResults
      };
    }
    function interruptActiveLoads() {
      isRevalidationRequired = !0, fetchLoadMatches.forEach((_, key) => {
        fetchControllers.has(key) && cancelledFetcherLoads.add(key), abortFetcher(key);
      });
    }
    function updateFetcherState(key, fetcher, opts = {}) {
      state.fetchers.set(key, fetcher), updateState(
        { fetchers: new Map(state.fetchers) },
        { flushSync: (opts && opts.flushSync) === !0 }
      );
    }
    function setFetcherError(key, routeId, error, opts = {}) {
      let boundaryMatch = findNearestBoundary(state.matches, routeId);
      deleteFetcher(key), updateState(
        {
          errors: {
            [boundaryMatch.route.id]: error
          },
          fetchers: new Map(state.fetchers)
        },
        { flushSync: (opts && opts.flushSync) === !0 }
      );
    }
    function getFetcher(key) {
      return activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1), fetchersQueuedForDeletion.has(key) && fetchersQueuedForDeletion.delete(key), state.fetchers.get(key) || IDLE_FETCHER;
    }
    function resetFetcher(key, opts) {
      abortFetcher(key, opts == null ? void 0 : opts.reason), updateFetcherState(key, getDoneFetcher(null));
    }
    function deleteFetcher(key) {
      let fetcher = state.fetchers.get(key);
      fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key)) && abortFetcher(key), fetchLoadMatches.delete(key), fetchReloadIds.delete(key), fetchRedirectIds.delete(key), fetchersQueuedForDeletion.delete(key), cancelledFetcherLoads.delete(key), state.fetchers.delete(key);
    }
    function queueFetcherForDeletion(key) {
      let count = (activeFetchers.get(key) || 0) - 1;
      count <= 0 ? (activeFetchers.delete(key), fetchersQueuedForDeletion.add(key)) : activeFetchers.set(key, count), updateState({ fetchers: new Map(state.fetchers) });
    }
    function abortFetcher(key, reason) {
      let controller = fetchControllers.get(key);
      controller && (controller.abort(reason), fetchControllers.delete(key));
    }
    function markFetchersDone(keys) {
      for (let key of keys) {
        let fetcher = getFetcher(key), doneFetcher = getDoneFetcher(fetcher.data);
        state.fetchers.set(key, doneFetcher);
      }
    }
    function markFetchRedirectsDone() {
      let doneKeys = [], updatedFetchers = !1;
      for (let key of fetchRedirectIds) {
        let fetcher = state.fetchers.get(key);
        invariant(fetcher, `Expected fetcher: ${key}`), fetcher.state === "loading" && (fetchRedirectIds.delete(key), doneKeys.push(key), updatedFetchers = !0);
      }
      return markFetchersDone(doneKeys), updatedFetchers;
    }
    function abortStaleFetchLoads(landedId) {
      let yeetedKeys = [];
      for (let [key, id] of fetchReloadIds)
        if (id < landedId) {
          let fetcher = state.fetchers.get(key);
          invariant(fetcher, `Expected fetcher: ${key}`), fetcher.state === "loading" && (abortFetcher(key), fetchReloadIds.delete(key), yeetedKeys.push(key));
        }
      return markFetchersDone(yeetedKeys), yeetedKeys.length > 0;
    }
    function getBlocker(key, fn) {
      let blocker = state.blockers.get(key) || IDLE_BLOCKER;
      return blockerFunctions.get(key) !== fn && blockerFunctions.set(key, fn), blocker;
    }
    function deleteBlocker(key) {
      state.blockers.delete(key), blockerFunctions.delete(key);
    }
    function updateBlocker(key, newBlocker) {
      let blocker = state.blockers.get(key) || IDLE_BLOCKER;
      invariant(
        blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked",
        `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`
      );
      let blockers = new Map(state.blockers);
      blockers.set(key, newBlocker), updateState({ blockers });
    }
    function shouldBlockNavigation({
      currentLocation,
      nextLocation,
      historyAction
    }) {
      if (blockerFunctions.size === 0)
        return;
      blockerFunctions.size > 1 && warning(!1, "A router only supports one blocker at a time");
      let entries = Array.from(blockerFunctions.entries()), [blockerKey, blockerFunction] = entries[entries.length - 1], blocker = state.blockers.get(blockerKey);
      if (!(blocker && blocker.state === "proceeding") && blockerFunction({ currentLocation, nextLocation, historyAction }))
        return blockerKey;
    }
    function handleNavigational404(pathname) {
      let error = getInternalRouterError(404, { pathname }), routesToUse = inFlightDataRoutes || dataRoutes, { matches, route } = getShortCircuitMatches(routesToUse);
      return { notFoundMatches: matches, route, error };
    }
    function enableScrollRestoration(positions, getPosition, getKey) {
      if (savedScrollPositions2 = positions, getScrollPosition = getPosition, getScrollRestorationKey2 = getKey || null, !initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
        initialScrollRestored = !0;
        let y = getSavedScrollPosition(state.location, state.matches);
        y != null && updateState({ restoreScrollPosition: y });
      }
      return () => {
        savedScrollPositions2 = null, getScrollPosition = null, getScrollRestorationKey2 = null;
      };
    }
    function getScrollKey(location2, matches) {
      return getScrollRestorationKey2 && getScrollRestorationKey2(
        location2,
        matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))
      ) || location2.key;
    }
    function saveScrollPosition(location2, matches) {
      if (savedScrollPositions2 && getScrollPosition) {
        let key = getScrollKey(location2, matches);
        savedScrollPositions2[key] = getScrollPosition();
      }
    }
    function getSavedScrollPosition(location2, matches) {
      if (savedScrollPositions2) {
        let key = getScrollKey(location2, matches), y = savedScrollPositions2[key];
        if (typeof y == "number")
          return y;
      }
      return null;
    }
    function checkFogOfWar(matches, routesToUse, pathname) {
      if (init.patchRoutesOnNavigation)
        if (matches) {
          if (Object.keys(matches[0].params).length > 0)
            return { active: !0, matches: matchRoutesImpl(
              routesToUse,
              pathname,
              basename,
              !0
            ) };
        } else
          return { active: !0, matches: matchRoutesImpl(
            routesToUse,
            pathname,
            basename,
            !0
          ) || [] };
      return { active: !1, matches: null };
    }
    async function discoverRoutes(matches, pathname, signal, fetcherKey) {
      if (!init.patchRoutesOnNavigation)
        return { type: "success", matches };
      let partialMatches = matches;
      for (; ; ) {
        let isNonHMR = inFlightDataRoutes == null, routesToUse = inFlightDataRoutes || dataRoutes, localManifest = manifest;
        try {
          await init.patchRoutesOnNavigation({
            signal,
            path: pathname,
            matches: partialMatches,
            fetcherKey,
            patch: (routeId, children) => {
              signal.aborted || patchRoutesImpl(
                routeId,
                children,
                routesToUse,
                localManifest,
                mapRouteProperties2,
                !1
              );
            }
          });
        } catch (e) {
          return { type: "error", error: e, partialMatches };
        } finally {
          isNonHMR && !signal.aborted && (dataRoutes = [...dataRoutes]);
        }
        if (signal.aborted)
          return { type: "aborted" };
        let newMatches = matchRoutes(routesToUse, pathname, basename), newPartialMatches = null;
        if (newMatches) {
          if (Object.keys(newMatches[0].params).length === 0)
            return { type: "success", matches: newMatches };
          if (newPartialMatches = matchRoutesImpl(
            routesToUse,
            pathname,
            basename,
            !0
          ), !(newPartialMatches && partialMatches.length < newPartialMatches.length && compareMatches(
            partialMatches,
            newPartialMatches.slice(0, partialMatches.length)
          )))
            return { type: "success", matches: newMatches };
        }
        if (newPartialMatches || (newPartialMatches = matchRoutesImpl(
          routesToUse,
          pathname,
          basename,
          !0
        )), !newPartialMatches || compareMatches(partialMatches, newPartialMatches))
          return { type: "success", matches: null };
        partialMatches = newPartialMatches;
      }
    }
    function compareMatches(a, b) {
      return a.length === b.length && a.every((m, i) => m.route.id === b[i].route.id);
    }
    function _internalSetRoutes(newRoutes) {
      manifest = {}, inFlightDataRoutes = convertRoutesToDataRoutes(
        newRoutes,
        mapRouteProperties2,
        void 0,
        manifest
      );
    }
    function patchRoutes(routeId, children, unstable_allowElementMutations = !1) {
      let isNonHMR = inFlightDataRoutes == null;
      patchRoutesImpl(
        routeId,
        children,
        inFlightDataRoutes || dataRoutes,
        manifest,
        mapRouteProperties2,
        unstable_allowElementMutations
      ), isNonHMR && (dataRoutes = [...dataRoutes], updateState({}));
    }
    return router = {
      get basename() {
        return basename;
      },
      get future() {
        return future;
      },
      get state() {
        return state;
      },
      get routes() {
        return dataRoutes;
      },
      get window() {
        return routerWindow;
      },
      initialize,
      subscribe: subscribe2,
      enableScrollRestoration,
      navigate,
      fetch: fetch2,
      revalidate,
      // Passthrough to history-aware createHref used by useHref so we get proper
      // hash-aware URLs in DOM paths
      createHref: (to) => init.history.createHref(to),
      encodeLocation: (to) => init.history.encodeLocation(to),
      getFetcher,
      resetFetcher,
      deleteFetcher: queueFetcherForDeletion,
      dispose,
      getBlocker,
      deleteBlocker,
      patchRoutes,
      _internalFetchControllers: fetchControllers,
      // TODO: Remove setRoutes, it's temporary to avoid dealing with
      // updating the tree while validating the update algorithm.
      _internalSetRoutes,
      _internalSetStateDoNotUseOrYouWillBreakYourApp(newState) {
        updateState(newState);
      }
    }, init.unstable_instrumentations && (router = instrumentClientSideRouter(
      router,
      init.unstable_instrumentations.map((i) => i.router).filter(Boolean)
    )), router;
  }
  function isSubmissionNavigation(opts) {
    return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== void 0);
  }
  function normalizeTo(location2, matches, basename, to, fromRouteId, relative) {
    let contextualMatches, activeRouteMatch;
    if (fromRouteId) {
      contextualMatches = [];
      for (let match of matches)
        if (contextualMatches.push(match), match.route.id === fromRouteId) {
          activeRouteMatch = match;
          break;
        }
    } else
      contextualMatches = matches, activeRouteMatch = matches[matches.length - 1];
    let path = resolveTo(
      to || ".",
      getResolveToMatches(contextualMatches),
      stripBasename(location2.pathname, basename) || location2.pathname,
      relative === "path"
    );
    if (to == null && (path.search = location2.search, path.hash = location2.hash), (to == null || to === "" || to === ".") && activeRouteMatch) {
      let nakedIndex = hasNakedIndexQuery(path.search);
      if (activeRouteMatch.route.index && !nakedIndex)
        path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
      else if (!activeRouteMatch.route.index && nakedIndex) {
        let params = new URLSearchParams(path.search), indexValues = params.getAll("index");
        params.delete("index"), indexValues.filter((v) => v).forEach((v) => params.append("index", v));
        let qs = params.toString();
        path.search = qs ? `?${qs}` : "";
      }
    }
    return basename !== "/" && (path.pathname = prependBasename({ basename, pathname: path.pathname })), createPath(path);
  }
  function normalizeNavigateOptions(isFetcher, path, opts) {
    if (!opts || !isSubmissionNavigation(opts))
      return { path };
    if (opts.formMethod && !isValidMethod(opts.formMethod))
      return {
        path,
        error: getInternalRouterError(405, { method: opts.formMethod })
      };
    let getInvalidBodyError = () => ({
      path,
      error: getInternalRouterError(400, { type: "invalid-body" })
    }), formMethod = (opts.formMethod || "get").toUpperCase(), formAction = stripHashFromPath(path);
    if (opts.body !== void 0) {
      if (opts.formEncType === "text/plain") {
        if (!isMutationMethod(formMethod))
          return getInvalidBodyError();
        let text = typeof opts.body == "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? (
          // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
          Array.from(opts.body.entries()).reduce(
            (acc, [name, value]) => `${acc}${name}=${value}
`,
            ""
          )
        ) : String(opts.body);
        return {
          path,
          submission: {
            formMethod,
            formAction,
            formEncType: opts.formEncType,
            formData: void 0,
            json: void 0,
            text
          }
        };
      } else if (opts.formEncType === "application/json") {
        if (!isMutationMethod(formMethod))
          return getInvalidBodyError();
        try {
          let json = typeof opts.body == "string" ? JSON.parse(opts.body) : opts.body;
          return {
            path,
            submission: {
              formMethod,
              formAction,
              formEncType: opts.formEncType,
              formData: void 0,
              json,
              text: void 0
            }
          };
        } catch (e) {
          return getInvalidBodyError();
        }
      }
    }
    invariant(
      typeof FormData == "function",
      "FormData is not available in this environment"
    );
    let searchParams, formData;
    if (opts.formData)
      searchParams = convertFormDataToSearchParams(opts.formData), formData = opts.formData;
    else if (opts.body instanceof FormData)
      searchParams = convertFormDataToSearchParams(opts.body), formData = opts.body;
    else if (opts.body instanceof URLSearchParams)
      searchParams = opts.body, formData = convertSearchParamsToFormData(searchParams);
    else if (opts.body == null)
      searchParams = new URLSearchParams(), formData = new FormData();
    else
      try {
        searchParams = new URLSearchParams(opts.body), formData = convertSearchParamsToFormData(searchParams);
      } catch (e) {
        return getInvalidBodyError();
      }
    let submission = {
      formMethod,
      formAction,
      formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
      formData,
      json: void 0,
      text: void 0
    };
    if (isMutationMethod(submission.formMethod))
      return { path, submission };
    let parsedPath = parsePath(path);
    return isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search) && searchParams.append("index", ""), parsedPath.search = `?${searchParams}`, { path: createPath(parsedPath), submission };
  }
  function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location2, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, pendingActionResult, callSiteDefaultShouldRevalidate) {
    var _a2;
    let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0, currentUrl = history.createURL(state.location), nextUrl = history.createURL(location2), maxIdx;
    if (initialHydration && state.errors) {
      let boundaryId = Object.keys(state.errors)[0];
      maxIdx = matches.findIndex((m) => m.route.id === boundaryId);
    } else if (pendingActionResult && isErrorResult(pendingActionResult[1])) {
      let boundaryId = pendingActionResult[0];
      maxIdx = matches.findIndex((m) => m.route.id === boundaryId) - 1;
    }
    let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : void 0, shouldSkipRevalidation = actionStatus && actionStatus >= 400, baseShouldRevalidateArgs = {
      currentUrl,
      currentParams: ((_a2 = state.matches[0]) == null ? void 0 : _a2.params) || {},
      nextUrl,
      nextParams: matches[0].params,
      ...submission,
      actionResult,
      actionStatus
    }, pattern = getRoutePattern(matches), dsMatches = matches.map((match, index) => {
      let { route } = match, forceShouldLoad = null;
      if (maxIdx != null && index > maxIdx ? forceShouldLoad = !1 : route.lazy ? forceShouldLoad = !0 : routeHasLoaderOrMiddleware(route) ? initialHydration ? forceShouldLoad = shouldLoadRouteOnHydration(
        route,
        state.loaderData,
        state.errors
      ) : isNewLoader(state.loaderData, state.matches[index], match) && (forceShouldLoad = !0) : forceShouldLoad = !1, forceShouldLoad !== null)
        return getDataStrategyMatch(
          mapRouteProperties2,
          manifest,
          request,
          pattern,
          match,
          lazyRoutePropertiesToSkip,
          scopedContext,
          forceShouldLoad
        );
      let defaultShouldRevalidate = !1;
      typeof callSiteDefaultShouldRevalidate == "boolean" ? defaultShouldRevalidate = callSiteDefaultShouldRevalidate : shouldSkipRevalidation ? defaultShouldRevalidate = !1 : (isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || currentUrl.search !== nextUrl.search || isNewRouteInstance(state.matches[index], match)) && (defaultShouldRevalidate = !0);
      let shouldRevalidateArgs = {
        ...baseShouldRevalidateArgs,
        defaultShouldRevalidate
      }, shouldLoad = shouldRevalidateLoader(match, shouldRevalidateArgs);
      return getDataStrategyMatch(
        mapRouteProperties2,
        manifest,
        request,
        pattern,
        match,
        lazyRoutePropertiesToSkip,
        scopedContext,
        shouldLoad,
        shouldRevalidateArgs,
        callSiteDefaultShouldRevalidate
      );
    }), revalidatingFetchers = [];
    return fetchLoadMatches.forEach((f, key) => {
      if (initialHydration || !matches.some((m) => m.route.id === f.routeId) || fetchersQueuedForDeletion.has(key))
        return;
      let fetcher = state.fetchers.get(key), isMidInitialLoad = fetcher && fetcher.state !== "idle" && fetcher.data === void 0, fetcherMatches = matchRoutes(routesToUse, f.path, basename);
      if (!fetcherMatches) {
        if (hasPatchRoutesOnNavigation && isMidInitialLoad)
          return;
        revalidatingFetchers.push({
          key,
          routeId: f.routeId,
          path: f.path,
          matches: null,
          match: null,
          request: null,
          controller: null
        });
        return;
      }
      if (fetchRedirectIds.has(key))
        return;
      let fetcherMatch = getTargetMatch(fetcherMatches, f.path), fetchController = new AbortController(), fetchRequest = createClientSideRequest(
        history,
        f.path,
        fetchController.signal
      ), fetcherDsMatches = null;
      if (cancelledFetcherLoads.has(key))
        cancelledFetcherLoads.delete(key), fetcherDsMatches = getTargetedDataStrategyMatches(
          mapRouteProperties2,
          manifest,
          fetchRequest,
          fetcherMatches,
          fetcherMatch,
          lazyRoutePropertiesToSkip,
          scopedContext
        );
      else if (isMidInitialLoad)
        isRevalidationRequired && (fetcherDsMatches = getTargetedDataStrategyMatches(
          mapRouteProperties2,
          manifest,
          fetchRequest,
          fetcherMatches,
          fetcherMatch,
          lazyRoutePropertiesToSkip,
          scopedContext
        ));
      else {
        let defaultShouldRevalidate;
        typeof callSiteDefaultShouldRevalidate == "boolean" ? defaultShouldRevalidate = callSiteDefaultShouldRevalidate : shouldSkipRevalidation ? defaultShouldRevalidate = !1 : defaultShouldRevalidate = isRevalidationRequired;
        let shouldRevalidateArgs = {
          ...baseShouldRevalidateArgs,
          defaultShouldRevalidate
        };
        shouldRevalidateLoader(fetcherMatch, shouldRevalidateArgs) && (fetcherDsMatches = getTargetedDataStrategyMatches(
          mapRouteProperties2,
          manifest,
          fetchRequest,
          fetcherMatches,
          fetcherMatch,
          lazyRoutePropertiesToSkip,
          scopedContext,
          shouldRevalidateArgs
        ));
      }
      fetcherDsMatches && revalidatingFetchers.push({
        key,
        routeId: f.routeId,
        path: f.path,
        matches: fetcherDsMatches,
        match: fetcherMatch,
        request: fetchRequest,
        controller: fetchController
      });
    }), { dsMatches, revalidatingFetchers };
  }
  function routeHasLoaderOrMiddleware(route) {
    return route.loader != null || route.middleware != null && route.middleware.length > 0;
  }
  function shouldLoadRouteOnHydration(route, loaderData, errors) {
    if (route.lazy)
      return !0;
    if (!routeHasLoaderOrMiddleware(route))
      return !1;
    let hasData = loaderData != null && route.id in loaderData, hasError = errors != null && errors[route.id] !== void 0;
    return !hasData && hasError ? !1 : typeof route.loader == "function" && route.loader.hydrate === !0 ? !0 : !hasData && !hasError;
  }
  function isNewLoader(currentLoaderData, currentMatch, match) {
    let isNew = (
      // [a] -> [a, b]
      !currentMatch || // [a, b] -> [a, c]
      match.route.id !== currentMatch.route.id
    ), isMissingData = !currentLoaderData.hasOwnProperty(match.route.id);
    return isNew || isMissingData;
  }
  function isNewRouteInstance(currentMatch, match) {
    let currentPath = currentMatch.route.path;
    return (
      // param change for this match, /users/123 -> /users/456
      currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path
      // e.g. /files/images/avatar.jpg -> files/finances.xls
      currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
    );
  }
  function shouldRevalidateLoader(loaderMatch, arg) {
    if (loaderMatch.route.shouldRevalidate) {
      let routeChoice = loaderMatch.route.shouldRevalidate(arg);
      if (typeof routeChoice == "boolean")
        return routeChoice;
    }
    return arg.defaultShouldRevalidate;
  }
  function patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties2, allowElementMutations) {
    let childrenToPatch;
    if (routeId) {
      let route = manifest[routeId];
      invariant(
        route,
        `No route found to patch children into: routeId = ${routeId}`
      ), route.children || (route.children = []), childrenToPatch = route.children;
    } else
      childrenToPatch = routesToUse;
    let uniqueChildren = [], existingChildren = [];
    if (children.forEach((newRoute) => {
      let existingRoute = childrenToPatch.find(
        (existingRoute2) => isSameRoute(newRoute, existingRoute2)
      );
      existingRoute ? existingChildren.push({ existingRoute, newRoute }) : uniqueChildren.push(newRoute);
    }), uniqueChildren.length > 0) {
      let newRoutes = convertRoutesToDataRoutes(
        uniqueChildren,
        mapRouteProperties2,
        [routeId || "_", "patch", String((childrenToPatch == null ? void 0 : childrenToPatch.length) || "0")],
        manifest
      );
      childrenToPatch.push(...newRoutes);
    }
    if (allowElementMutations && existingChildren.length > 0)
      for (let i = 0; i < existingChildren.length; i++) {
        let { existingRoute, newRoute } = existingChildren[i], existingRouteTyped = existingRoute, [newRouteTyped] = convertRoutesToDataRoutes(
          [newRoute],
          mapRouteProperties2,
          [],
          // Doesn't matter for mutated routes since they already have an id
          {},
          // Don't touch the manifest here since we're updating in place
          !0
        );
        Object.assign(existingRouteTyped, {
          element: newRouteTyped.element ? newRouteTyped.element : existingRouteTyped.element,
          errorElement: newRouteTyped.errorElement ? newRouteTyped.errorElement : existingRouteTyped.errorElement,
          hydrateFallbackElement: newRouteTyped.hydrateFallbackElement ? newRouteTyped.hydrateFallbackElement : existingRouteTyped.hydrateFallbackElement
        });
      }
  }
  function isSameRoute(newRoute, existingRoute) {
    return "id" in newRoute && "id" in existingRoute && newRoute.id === existingRoute.id ? !0 : newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive ? (!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0) ? !0 : newRoute.children.every(
      (aChild, i) => {
        var _a2;
        return (_a2 = existingRoute.children) == null ? void 0 : _a2.some((bChild) => isSameRoute(aChild, bChild));
      }
    ) : !1;
  }
  var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap(), loadLazyRouteProperty = ({
    key,
    route,
    manifest,
    mapRouteProperties: mapRouteProperties2
  }) => {
    let routeToUpdate = manifest[route.id];
    if (invariant(routeToUpdate, "No route found in manifest"), !routeToUpdate.lazy || typeof routeToUpdate.lazy != "object")
      return;
    let lazyFn = routeToUpdate.lazy[key];
    if (!lazyFn)
      return;
    let cache = lazyRoutePropertyCache.get(routeToUpdate);
    cache || (cache = {}, lazyRoutePropertyCache.set(routeToUpdate, cache));
    let cachedPromise = cache[key];
    if (cachedPromise)
      return cachedPromise;
    let propertyPromise = (async () => {
      let isUnsupported = isUnsupportedLazyRouteObjectKey(key), isStaticallyDefined = routeToUpdate[key] !== void 0 && key !== "hasErrorBoundary";
      if (isUnsupported)
        warning(
          !isUnsupported,
          "Route property " + key + " is not a supported lazy route property. This property will be ignored."
        ), cache[key] = Promise.resolve();
      else if (isStaticallyDefined)
        warning(
          !1,
          `Route "${routeToUpdate.id}" has a static property "${key}" defined. The lazy property will be ignored.`
        );
      else {
        let value = await lazyFn();
        value != null && (Object.assign(routeToUpdate, { [key]: value }), Object.assign(routeToUpdate, mapRouteProperties2(routeToUpdate)));
      }
      typeof routeToUpdate.lazy == "object" && (routeToUpdate.lazy[key] = void 0, Object.values(routeToUpdate.lazy).every((value) => value === void 0) && (routeToUpdate.lazy = void 0));
    })();
    return cache[key] = propertyPromise, propertyPromise;
  }, lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
  function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRoutePropertiesToSkip) {
    let routeToUpdate = manifest[route.id];
    if (invariant(routeToUpdate, "No route found in manifest"), !route.lazy)
      return {
        lazyRoutePromise: void 0,
        lazyHandlerPromise: void 0
      };
    if (typeof route.lazy == "function") {
      let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
      if (cachedPromise)
        return {
          lazyRoutePromise: cachedPromise,
          lazyHandlerPromise: cachedPromise
        };
      let lazyRoutePromise2 = (async () => {
        invariant(
          typeof route.lazy == "function",
          "No lazy route function found"
        );
        let lazyRoute = await route.lazy(), routeUpdates = {};
        for (let lazyRouteProperty in lazyRoute) {
          let lazyValue = lazyRoute[lazyRouteProperty];
          if (lazyValue === void 0)
            continue;
          let isUnsupported = isUnsupportedLazyRouteFunctionKey(lazyRouteProperty), isStaticallyDefined = routeToUpdate[lazyRouteProperty] !== void 0 && // This property isn't static since it should always be updated based
          // on the route updates
          lazyRouteProperty !== "hasErrorBoundary";
          isUnsupported ? warning(
            !isUnsupported,
            "Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored."
          ) : isStaticallyDefined ? warning(
            !isStaticallyDefined,
            `Route "${routeToUpdate.id}" has a static property "${lazyRouteProperty}" defined but its lazy function is also returning a value for this property. The lazy route property "${lazyRouteProperty}" will be ignored.`
          ) : routeUpdates[lazyRouteProperty] = lazyValue;
        }
        Object.assign(routeToUpdate, routeUpdates), Object.assign(routeToUpdate, {
          // To keep things framework agnostic, we use the provided `mapRouteProperties`
          // function to set the framework-aware properties (`element`/`hasErrorBoundary`)
          // since the logic will differ between frameworks.
          ...mapRouteProperties2(routeToUpdate),
          lazy: void 0
        });
      })();
      return lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise2), lazyRoutePromise2.catch(() => {
      }), {
        lazyRoutePromise: lazyRoutePromise2,
        lazyHandlerPromise: lazyRoutePromise2
      };
    }
    let lazyKeys = Object.keys(route.lazy), lazyPropertyPromises = [], lazyHandlerPromise;
    for (let key of lazyKeys) {
      if (lazyRoutePropertiesToSkip && lazyRoutePropertiesToSkip.includes(key))
        continue;
      let promise = loadLazyRouteProperty({
        key,
        route,
        manifest,
        mapRouteProperties: mapRouteProperties2
      });
      promise && (lazyPropertyPromises.push(promise), key === type && (lazyHandlerPromise = promise));
    }
    let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {
    }) : void 0;
    return lazyRoutePromise == null || lazyRoutePromise.catch(() => {
    }), lazyHandlerPromise == null || lazyHandlerPromise.catch(() => {
    }), {
      lazyRoutePromise,
      lazyHandlerPromise
    };
  }
  async function defaultDataStrategy(args) {
    let matchesToLoad = args.matches.filter((m) => m.shouldLoad), keyedResults = {};
    return (await Promise.all(matchesToLoad.map((m) => m.resolve()))).forEach((result, i) => {
      keyedResults[matchesToLoad[i].route.id] = result;
    }), keyedResults;
  }
  async function defaultDataStrategyWithMiddleware(args) {
    return args.matches.some((m) => m.route.middleware) ? runClientMiddlewarePipeline(args, () => defaultDataStrategy(args)) : defaultDataStrategy(args);
  }
  function runClientMiddlewarePipeline(args, handler) {
    return runMiddlewarePipeline(
      args,
      handler,
      (r) => {
        if (isRedirectResponse(r))
          throw r;
        return r;
      },
      isDataStrategyResults,
      errorHandler
    );
    function errorHandler(error, routeId, nextResult) {
      if (nextResult)
        return Promise.resolve(
          Object.assign(nextResult.value, {
            [routeId]: { type: "error", result: error }
          })
        );
      {
        let { matches } = args, maxBoundaryIdx = Math.min(
          // Throwing route
          Math.max(
            matches.findIndex((m) => m.route.id === routeId),
            0
          ),
          // or the shallowest route that needs to load data
          Math.max(
            matches.findIndex((m) => m.shouldCallHandler()),
            0
          )
        ), boundaryRouteId = findNearestBoundary(
          matches,
          matches[maxBoundaryIdx].route.id
        ).route.id;
        return Promise.resolve({
          [boundaryRouteId]: { type: "error", result: error }
        });
      }
    }
  }
  async function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {
    let { matches, request, params, context, unstable_pattern } = args, tuples = matches.flatMap(
      (m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []
    );
    return await callRouteMiddleware(
      {
        request,
        params,
        context,
        unstable_pattern
      },
      tuples,
      handler,
      processResult,
      isResult,
      errorHandler
    );
  }
  async function callRouteMiddleware(args, middlewares, handler, processResult, isResult, errorHandler, idx = 0) {
    var _a2;
    let { request } = args;
    if (request.signal.aborted)
      throw (_a2 = request.signal.reason) != null ? _a2 : new Error(`Request aborted: ${request.method} ${request.url}`);
    let tuple = middlewares[idx];
    if (!tuple)
      return await handler();
    let [routeId, middleware] = tuple, nextResult, next = async () => {
      if (nextResult)
        throw new Error("You may only call `next()` once per middleware");
      try {
        return nextResult = { value: await callRouteMiddleware(
          args,
          middlewares,
          handler,
          processResult,
          isResult,
          errorHandler,
          idx + 1
        ) }, nextResult.value;
      } catch (error) {
        return nextResult = { value: await errorHandler(error, routeId, nextResult) }, nextResult.value;
      }
    };
    try {
      let value = await middleware(args, next), result = value != null ? processResult(value) : void 0;
      return isResult(result) ? result : nextResult ? result != null ? result : nextResult.value : (nextResult = { value: await next() }, nextResult.value);
    } catch (error) {
      return await errorHandler(error, routeId, nextResult);
    }
  }
  function getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip) {
    let lazyMiddlewarePromise = loadLazyRouteProperty({
      key: "middleware",
      route: match.route,
      manifest,
      mapRouteProperties: mapRouteProperties2
    }), lazyRoutePromises = loadLazyRoute(
      match.route,
      isMutationMethod(request.method) ? "action" : "loader",
      manifest,
      mapRouteProperties2,
      lazyRoutePropertiesToSkip
    );
    return {
      middleware: lazyMiddlewarePromise,
      route: lazyRoutePromises.lazyRoutePromise,
      handler: lazyRoutePromises.lazyHandlerPromise
    };
  }
  function getDataStrategyMatch(mapRouteProperties2, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {
    let isUsingNewApi = !1, _lazyPromises = getDataStrategyMatchLazyPromises(
      mapRouteProperties2,
      manifest,
      request,
      match,
      lazyRoutePropertiesToSkip
    );
    return {
      ...match,
      _lazyPromises,
      shouldLoad,
      shouldRevalidateArgs,
      shouldCallHandler(defaultShouldRevalidate) {
        return isUsingNewApi = !0, shouldRevalidateArgs ? typeof callSiteDefaultShouldRevalidate == "boolean" ? shouldRevalidateLoader(match, {
          ...shouldRevalidateArgs,
          defaultShouldRevalidate: callSiteDefaultShouldRevalidate
        }) : typeof defaultShouldRevalidate == "boolean" ? shouldRevalidateLoader(match, {
          ...shouldRevalidateArgs,
          defaultShouldRevalidate
        }) : shouldRevalidateLoader(match, shouldRevalidateArgs) : shouldLoad;
      },
      resolve(handlerOverride) {
        let { lazy, loader, middleware } = match.route, callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader), isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;
        return callHandler && (isMutationMethod(request.method) || !isMiddlewareOnlyRoute) ? callLoaderOrAction({
          request,
          unstable_pattern,
          match,
          lazyHandlerPromise: _lazyPromises == null ? void 0 : _lazyPromises.handler,
          lazyRoutePromise: _lazyPromises == null ? void 0 : _lazyPromises.route,
          handlerOverride,
          scopedContext
        }) : Promise.resolve({ type: "data", result: void 0 });
      }
    };
  }
  function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request, matches, targetMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs = null) {
    return matches.map((match) => match.route.id !== targetMatch.route.id ? {
      ...match,
      shouldLoad: !1,
      shouldRevalidateArgs,
      shouldCallHandler: () => !1,
      _lazyPromises: getDataStrategyMatchLazyPromises(
        mapRouteProperties2,
        manifest,
        request,
        match,
        lazyRoutePropertiesToSkip
      ),
      resolve: () => Promise.resolve({ type: "data", result: void 0 })
    } : getDataStrategyMatch(
      mapRouteProperties2,
      manifest,
      request,
      getRoutePattern(matches),
      match,
      lazyRoutePropertiesToSkip,
      scopedContext,
      !0,
      shouldRevalidateArgs
    ));
  }
  async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherKey, scopedContext, isStaticHandler) {
    matches.some((m) => {
      var _a2;
      return (_a2 = m._lazyPromises) == null ? void 0 : _a2.middleware;
    }) && await Promise.all(matches.map((m) => {
      var _a2;
      return (_a2 = m._lazyPromises) == null ? void 0 : _a2.middleware;
    }));
    let dataStrategyArgs = {
      request,
      unstable_pattern: getRoutePattern(matches),
      params: matches[0].params,
      context: scopedContext,
      matches
    }, results = await dataStrategyImpl({
      ...dataStrategyArgs,
      fetcherKey,
      runClientMiddleware: isStaticHandler ? () => {
        throw new Error(
          "You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`"
        );
      } : (cb) => {
        let typedDataStrategyArgs = dataStrategyArgs;
        return runClientMiddlewarePipeline(typedDataStrategyArgs, () => cb({
          ...typedDataStrategyArgs,
          fetcherKey,
          runClientMiddleware: () => {
            throw new Error(
              "Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler"
            );
          }
        }));
      }
    });
    try {
      await Promise.all(
        matches.flatMap((m) => {
          var _a2, _b;
          return [
            (_a2 = m._lazyPromises) == null ? void 0 : _a2.handler,
            (_b = m._lazyPromises) == null ? void 0 : _b.route
          ];
        })
      );
    } catch (e) {
    }
    return results;
  }
  async function callLoaderOrAction({
    request,
    unstable_pattern,
    match,
    lazyHandlerPromise,
    lazyRoutePromise,
    handlerOverride,
    scopedContext
  }) {
    let result, onReject, isAction = isMutationMethod(request.method), type = isAction ? "action" : "loader", runHandler = (handler) => {
      let reject, abortPromise = new Promise((_, r) => reject = r);
      onReject = () => reject(), request.signal.addEventListener("abort", onReject);
      let actualHandler = (ctx) => typeof handler != "function" ? Promise.reject(
        new Error(
          `You cannot call the handler for a route which defines a boolean "${type}" [routeId: ${match.route.id}]`
        )
      ) : handler(
        {
          request,
          unstable_pattern,
          params: match.params,
          context: scopedContext
        },
        ...ctx !== void 0 ? [ctx] : []
      ), handlerPromise = (async () => {
        try {
          return { type: "data", result: await (handlerOverride ? handlerOverride((ctx) => actualHandler(ctx)) : actualHandler()) };
        } catch (e) {
          return { type: "error", result: e };
        }
      })();
      return Promise.race([handlerPromise, abortPromise]);
    };
    try {
      let handler = isAction ? match.route.action : match.route.loader;
      if (lazyHandlerPromise || lazyRoutePromise)
        if (handler) {
          let handlerError, [value] = await Promise.all([
            // If the handler throws, don't let it immediately bubble out,
            // since we need to let the lazy() execution finish so we know if this
            // route has a boundary that can handle the error
            runHandler(handler).catch((e) => {
              handlerError = e;
            }),
            // Ensure all lazy route promises are resolved before continuing
            lazyHandlerPromise,
            lazyRoutePromise
          ]);
          if (handlerError !== void 0)
            throw handlerError;
          result = value;
        } else {
          await lazyHandlerPromise;
          let handler2 = isAction ? match.route.action : match.route.loader;
          if (handler2)
            [result] = await Promise.all([runHandler(handler2), lazyRoutePromise]);
          else if (type === "action") {
            let url = new URL(request.url), pathname = url.pathname + url.search;
            throw getInternalRouterError(405, {
              method: request.method,
              pathname,
              routeId: match.route.id
            });
          } else
            return { type: "data", result: void 0 };
        }
      else if (handler)
        result = await runHandler(handler);
      else {
        let url = new URL(request.url), pathname = url.pathname + url.search;
        throw getInternalRouterError(404, {
          pathname
        });
      }
    } catch (e) {
      return { type: "error", result: e };
    } finally {
      onReject && request.signal.removeEventListener("abort", onReject);
    }
    return result;
  }
  async function parseResponseBody(response) {
    let contentType = response.headers.get("Content-Type");
    return contentType && /\bapplication\/json\b/.test(contentType) ? response.body == null ? null : response.json() : response.text();
  }
  async function convertDataStrategyResultToDataResult(dataStrategyResult) {
    var _a2, _b, _c, _d, _e;
    let { result, type } = dataStrategyResult;
    if (isResponse(result)) {
      let data2;
      try {
        data2 = await parseResponseBody(result);
      } catch (e) {
        return { type: "error", error: e };
      }
      return type === "error" ? {
        type: "error",
        error: new ErrorResponseImpl(result.status, result.statusText, data2),
        statusCode: result.status,
        headers: result.headers
      } : {
        type: "data",
        data: data2,
        statusCode: result.status,
        headers: result.headers
      };
    }
    return type === "error" ? isDataWithResponseInit(result) ? result.data instanceof Error ? {
      type: "error",
      error: result.data,
      statusCode: (_a2 = result.init) == null ? void 0 : _a2.status,
      headers: (_b = result.init) != null && _b.headers ? new Headers(result.init.headers) : void 0
    } : {
      type: "error",
      error: dataWithResponseInitToErrorResponse(result),
      statusCode: isRouteErrorResponse(result) ? result.status : void 0,
      headers: (_c = result.init) != null && _c.headers ? new Headers(result.init.headers) : void 0
    } : {
      type: "error",
      error: result,
      statusCode: isRouteErrorResponse(result) ? result.status : void 0
    } : isDataWithResponseInit(result) ? {
      type: "data",
      data: result.data,
      statusCode: (_d = result.init) == null ? void 0 : _d.status,
      headers: (_e = result.init) != null && _e.headers ? new Headers(result.init.headers) : void 0
    } : { type: "data", data: result };
  }
  function normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename) {
    let location2 = response.headers.get("Location");
    if (invariant(
      location2,
      "Redirects returned/thrown from loaders/actions must have a Location header"
    ), !isAbsoluteUrl(location2)) {
      let trimmedMatches = matches.slice(
        0,
        matches.findIndex((m) => m.route.id === routeId) + 1
      );
      location2 = normalizeTo(
        new URL(request.url),
        trimmedMatches,
        basename,
        location2
      ), response.headers.set("Location", location2);
    }
    return response;
  }
  function normalizeRedirectLocation(location2, currentUrl, basename, historyInstance) {
    let invalidProtocols = [
      "about:",
      "blob:",
      "chrome:",
      "chrome-untrusted:",
      "content:",
      "data:",
      "devtools:",
      "file:",
      "filesystem:",
      // eslint-disable-next-line no-script-url
      "javascript:"
    ];
    if (isAbsoluteUrl(location2)) {
      let normalizedLocation = location2, url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);
      if (invalidProtocols.includes(url.protocol))
        throw new Error("Invalid redirect location");
      let isSameBasename = stripBasename(url.pathname, basename) != null;
      if (url.origin === currentUrl.origin && isSameBasename)
        return url.pathname + url.search + url.hash;
    }
    try {
      let url = historyInstance.createURL(location2);
      if (invalidProtocols.includes(url.protocol))
        throw new Error("Invalid redirect location");
    } catch (e) {
    }
    return location2;
  }
  function createClientSideRequest(history, location2, signal, submission) {
    let url = history.createURL(stripHashFromPath(location2)).toString(), init = { signal };
    if (submission && isMutationMethod(submission.formMethod)) {
      let { formMethod, formEncType } = submission;
      init.method = formMethod.toUpperCase(), formEncType === "application/json" ? (init.headers = new Headers({ "Content-Type": formEncType }), init.body = JSON.stringify(submission.json)) : formEncType === "text/plain" ? init.body = submission.text : formEncType === "application/x-www-form-urlencoded" && submission.formData ? init.body = convertFormDataToSearchParams(submission.formData) : init.body = submission.formData;
    }
    return new Request(url, init);
  }
  function convertFormDataToSearchParams(formData) {
    let searchParams = new URLSearchParams();
    for (let [key, value] of formData.entries())
      searchParams.append(key, typeof value == "string" ? value : value.name);
    return searchParams;
  }
  function convertSearchParamsToFormData(searchParams) {
    let formData = new FormData();
    for (let [key, value] of searchParams.entries())
      formData.append(key, value);
    return formData;
  }
  function processRouteLoaderData(matches, results, pendingActionResult, isStaticHandler = !1, skipLoaderErrorBubbling = !1) {
    let loaderData = {}, errors = null, statusCode, foundError = !1, loaderHeaders = {}, pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : void 0;
    return matches.forEach((match) => {
      if (!(match.route.id in results))
        return;
      let id = match.route.id, result = results[id];
      if (invariant(
        !isRedirectResult(result),
        "Cannot handle redirect results in processLoaderData"
      ), isErrorResult(result)) {
        let error = result.error;
        if (pendingError !== void 0 && (error = pendingError, pendingError = void 0), errors = errors || {}, skipLoaderErrorBubbling)
          errors[id] = error;
        else {
          let boundaryMatch = findNearestBoundary(matches, id);
          errors[boundaryMatch.route.id] == null && (errors[boundaryMatch.route.id] = error);
        }
        isStaticHandler || (loaderData[id] = ResetLoaderDataSymbol), foundError || (foundError = !0, statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500), result.headers && (loaderHeaders[id] = result.headers);
      } else
        loaderData[id] = result.data, result.statusCode && result.statusCode !== 200 && !foundError && (statusCode = result.statusCode), result.headers && (loaderHeaders[id] = result.headers);
    }), pendingError !== void 0 && pendingActionResult && (errors = { [pendingActionResult[0]]: pendingError }, pendingActionResult[2] && (loaderData[pendingActionResult[2]] = void 0)), {
      loaderData,
      errors,
      statusCode: statusCode || 200,
      loaderHeaders
    };
  }
  function processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults) {
    let { loaderData, errors } = processRouteLoaderData(
      matches,
      results,
      pendingActionResult
    );
    return revalidatingFetchers.filter((f) => !f.matches || f.matches.some((m) => m.shouldLoad)).forEach((rf) => {
      let { key, match, controller } = rf;
      if (controller && controller.signal.aborted)
        return;
      let result = fetcherResults[key];
      if (invariant(result, "Did not find corresponding fetcher result"), isErrorResult(result)) {
        let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
        errors && errors[boundaryMatch.route.id] || (errors = {
          ...errors,
          [boundaryMatch.route.id]: result.error
        }), state.fetchers.delete(key);
      } else if (isRedirectResult(result))
        invariant(!1, "Unhandled fetcher revalidation redirect");
      else {
        let doneFetcher = getDoneFetcher(result.data);
        state.fetchers.set(key, doneFetcher);
      }
    }), { loaderData, errors };
  }
  function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
    let mergedLoaderData = Object.entries(newLoaderData).filter(([, v]) => v !== ResetLoaderDataSymbol).reduce((merged, [k, v]) => (merged[k] = v, merged), {});
    for (let match of matches) {
      let id = match.route.id;
      if (!newLoaderData.hasOwnProperty(id) && loaderData.hasOwnProperty(id) && match.route.loader && (mergedLoaderData[id] = loaderData[id]), errors && errors.hasOwnProperty(id))
        break;
    }
    return mergedLoaderData;
  }
  function getActionDataForCommit(pendingActionResult) {
    return pendingActionResult ? isErrorResult(pendingActionResult[1]) ? {
      // Clear out prior actionData on errors
      actionData: {}
    } : {
      actionData: {
        [pendingActionResult[0]]: pendingActionResult[1].data
      }
    } : {};
  }
  function findNearestBoundary(matches, routeId) {
    return (routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches]).reverse().find((m) => m.route.hasErrorBoundary === !0) || matches[0];
  }
  function getShortCircuitMatches(routes) {
    let route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === "/") || {
      id: "__shim-error-route__"
    };
    return {
      matches: [
        {
          params: {},
          pathname: "",
          pathnameBase: "",
          route
        }
      ],
      route
    };
  }
  function getInternalRouterError(status, {
    pathname,
    routeId,
    method,
    type,
    message
  } = {}) {
    let statusText = "Unknown Server Error", errorMessage = "Unknown @remix-run/router error";
    return status === 400 ? (statusText = "Bad Request", method && pathname && routeId ? errorMessage = `You made a ${method} request to "${pathname}" but did not provide a \`loader\` for route "${routeId}", so there is no way to handle the request.` : type === "invalid-body" && (errorMessage = "Unable to encode submission body")) : status === 403 ? (statusText = "Forbidden", errorMessage = `Route "${routeId}" does not match URL "${pathname}"`) : status === 404 ? (statusText = "Not Found", errorMessage = `No route matches URL "${pathname}"`) : status === 405 && (statusText = "Method Not Allowed", method && pathname && routeId ? errorMessage = `You made a ${method.toUpperCase()} request to "${pathname}" but did not provide an \`action\` for route "${routeId}", so there is no way to handle the request.` : method && (errorMessage = `Invalid request method "${method.toUpperCase()}"`)), new ErrorResponseImpl(
      status || 500,
      statusText,
      new Error(errorMessage),
      !0
    );
  }
  function findRedirect(results) {
    let entries = Object.entries(results);
    for (let i = entries.length - 1; i >= 0; i--) {
      let [key, result] = entries[i];
      if (isRedirectResult(result))
        return { key, result };
    }
  }
  function stripHashFromPath(path) {
    let parsedPath = typeof path == "string" ? parsePath(path) : path;
    return createPath({ ...parsedPath, hash: "" });
  }
  function isHashChangeOnly(a, b) {
    return a.pathname !== b.pathname || a.search !== b.search ? !1 : a.hash === "" ? b.hash !== "" : a.hash === b.hash ? !0 : b.hash !== "";
  }
  function dataWithResponseInitToErrorResponse(data2) {
    var _a2, _b, _c, _d;
    return new ErrorResponseImpl(
      (_b = (_a2 = data2.init) == null ? void 0 : _a2.status) != null ? _b : 500,
      (_d = (_c = data2.init) == null ? void 0 : _c.statusText) != null ? _d : "Internal Server Error",
      data2.data
    );
  }
  function isDataStrategyResults(result) {
    return result != null && typeof result == "object" && Object.entries(result).every(
      ([key, value]) => typeof key == "string" && isDataStrategyResult(value)
    );
  }
  function isDataStrategyResult(result) {
    return result != null && typeof result == "object" && "type" in result && "result" in result && (result.type === "data" || result.type === "error");
  }
  function isRedirectDataStrategyResult(result) {
    return isResponse(result.result) && redirectStatusCodes.has(result.result.status);
  }
  function isErrorResult(result) {
    return result.type === "error";
  }
  function isRedirectResult(result) {
    return (result && result.type) === "redirect";
  }
  function isDataWithResponseInit(value) {
    return typeof value == "object" && value != null && "type" in value && "data" in value && "init" in value && value.type === "DataWithResponseInit";
  }
  function isResponse(value) {
    return value != null && typeof value.status == "number" && typeof value.statusText == "string" && typeof value.headers == "object" && typeof value.body != "undefined";
  }
  function isRedirectStatusCode(statusCode) {
    return redirectStatusCodes.has(statusCode);
  }
  function isRedirectResponse(result) {
    return isResponse(result) && isRedirectStatusCode(result.status) && result.headers.has("Location");
  }
  function isValidMethod(method) {
    return validRequestMethods.has(method.toUpperCase());
  }
  function isMutationMethod(method) {
    return validMutationMethods.has(method.toUpperCase());
  }
  function hasNakedIndexQuery(search) {
    return new URLSearchParams(search).getAll("index").some((v) => v === "");
  }
  function getTargetMatch(matches, location2) {
    let search = typeof location2 == "string" ? parsePath(location2).search : location2.search;
    if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || ""))
      return matches[matches.length - 1];
    let pathMatches = getPathContributingMatches(matches);
    return pathMatches[pathMatches.length - 1];
  }
  function getSubmissionFromNavigation(navigation2) {
    let { formMethod, formAction, formEncType, text, formData, json } = navigation2;
    if (!(!formMethod || !formAction || !formEncType)) {
      if (text != null)
        return {
          formMethod,
          formAction,
          formEncType,
          formData: void 0,
          json: void 0,
          text
        };
      if (formData != null)
        return {
          formMethod,
          formAction,
          formEncType,
          formData,
          json: void 0,
          text: void 0
        };
      if (json !== void 0)
        return {
          formMethod,
          formAction,
          formEncType,
          formData: void 0,
          json,
          text: void 0
        };
    }
  }
  function getLoadingNavigation(location2, submission) {
    return submission ? {
      state: "loading",
      location: location2,
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text
    } : {
      state: "loading",
      location: location2,
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0
    };
  }
  function getSubmittingNavigation(location2, submission) {
    return {
      state: "submitting",
      location: location2,
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text
    };
  }
  function getLoadingFetcher(submission, data2) {
    return submission ? {
      state: "loading",
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text,
      data: data2
    } : {
      state: "loading",
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0,
      data: data2
    };
  }
  function getSubmittingFetcher(submission, existingFetcher) {
    return {
      state: "submitting",
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text,
      data: existingFetcher ? existingFetcher.data : void 0
    };
  }
  function getDoneFetcher(data2) {
    return {
      state: "idle",
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0,
      data: data2
    };
  }
  function restoreAppliedTransitions(_window, transitions) {
    try {
      let sessionPositions = _window.sessionStorage.getItem(
        TRANSITIONS_STORAGE_KEY
      );
      if (sessionPositions) {
        let json = JSON.parse(sessionPositions);
        for (let [k, v] of Object.entries(json || {}))
          v && Array.isArray(v) && transitions.set(k, new Set(v || []));
      }
    } catch (e) {
    }
  }
  function persistAppliedTransitions(_window, transitions) {
    if (transitions.size > 0) {
      let json = {};
      for (let [k, v] of transitions)
        json[k] = [...v];
      try {
        _window.sessionStorage.setItem(
          TRANSITIONS_STORAGE_KEY,
          JSON.stringify(json)
        );
      } catch (error) {
        warning(
          !1,
          `Failed to save applied view transitions in sessionStorage (${error}).`
        );
      }
    }
  }
  function createDeferred() {
    let resolve, reject, promise = new Promise((res, rej) => {
      resolve = async (val) => {
        res(val);
        try {
          await promise;
        } catch (e) {
        }
      }, reject = async (error) => {
        rej(error);
        try {
          await promise;
        } catch (e) {
        }
      };
    });
    return {
      promise,
      //@ts-ignore
      resolve,
      //@ts-ignore
      reject
    };
  }
  var DataRouterContext = React.createContext(null);
  DataRouterContext.displayName = "DataRouter";
  var DataRouterStateContext = React.createContext(null);
  DataRouterStateContext.displayName = "DataRouterState";
  var RSCRouterContext = React.createContext(!1);
  function useIsRSCRouterContext() {
    return React.useContext(RSCRouterContext);
  }
  var ViewTransitionContext = React.createContext({
    isTransitioning: !1
  });
  ViewTransitionContext.displayName = "ViewTransition";
  var FetchersContext = React.createContext(
    /* @__PURE__ */ new Map()
  );
  FetchersContext.displayName = "Fetchers";
  var AwaitContext = React.createContext(null);
  AwaitContext.displayName = "Await";
  var NavigationContext = React.createContext(
    null
  );
  NavigationContext.displayName = "Navigation";
  var LocationContext = React.createContext(
    null
  );
  LocationContext.displayName = "Location";
  var RouteContext = React.createContext({
    outlet: null,
    matches: [],
    isDataRoute: !1
  });
  RouteContext.displayName = "Route";
  var RouteErrorContext = React.createContext(null);
  RouteErrorContext.displayName = "RouteError";
  var ENABLE_DEV_WARNINGS = !0, ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR", ERROR_DIGEST_REDIRECT = "REDIRECT", ERROR_DIGEST_ROUTE_ERROR_RESPONSE = "ROUTE_ERROR_RESPONSE";
  function decodeRedirectErrorDigest(digest) {
    if (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))
      try {
        let parsed = JSON.parse(digest.slice(28));
        if (typeof parsed == "object" && parsed && typeof parsed.status == "number" && typeof parsed.statusText == "string" && typeof parsed.location == "string" && typeof parsed.reloadDocument == "boolean" && typeof parsed.replace == "boolean")
          return parsed;
      } catch (e) {
      }
  }
  function decodeRouteErrorResponseDigest(digest) {
    if (digest.startsWith(
      `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`
    ))
      try {
        let parsed = JSON.parse(digest.slice(40));
        if (typeof parsed == "object" && parsed && typeof parsed.status == "number" && typeof parsed.statusText == "string")
          return new ErrorResponseImpl(
            parsed.status,
            parsed.statusText,
            parsed.data
          );
      } catch (e) {
      }
  }
  function useHref(to, { relative } = {}) {
    invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of the
      // router loaded. We can help them understand how to avoid that.
      "useHref() may be used only in the context of a <Router> component."
    );
    let { basename, navigator: navigator2 } = React2.useContext(NavigationContext), { hash, pathname, search } = useResolvedPath(to, { relative }), joinedPathname = pathname;
    return basename !== "/" && (joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname])), navigator2.createHref({ pathname: joinedPathname, search, hash });
  }
  function useInRouterContext() {
    return React2.useContext(LocationContext) != null;
  }
  function useLocation() {
    return invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of the
      // router loaded. We can help them understand how to avoid that.
      "useLocation() may be used only in the context of a <Router> component."
    ), React2.useContext(LocationContext).location;
  }
  function useMatch(pattern) {
    invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of the
      // router loaded. We can help them understand how to avoid that.
      "useMatch() may be used only in the context of a <Router> component."
    );
    let { pathname } = useLocation();
    return React2.useMemo(
      () => matchPath(pattern, decodePath(pathname)),
      [pathname, pattern]
    );
  }
  var navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
  function useIsomorphicLayoutEffect(cb) {
    React2.useContext(NavigationContext).static || React2.useLayoutEffect(cb);
  }
  function useNavigate() {
    let { isDataRoute } = React2.useContext(RouteContext);
    return isDataRoute ? useNavigateStable() : useNavigateUnstable();
  }
  function useNavigateUnstable() {
    invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of the
      // router loaded. We can help them understand how to avoid that.
      "useNavigate() may be used only in the context of a <Router> component."
    );
    let dataRouterContext = React2.useContext(DataRouterContext), { basename, navigator: navigator2 } = React2.useContext(NavigationContext), { matches } = React2.useContext(RouteContext), { pathname: locationPathname } = useLocation(), routePathnamesJson = JSON.stringify(getResolveToMatches(matches)), activeRef = React2.useRef(!1);
    return useIsomorphicLayoutEffect(() => {
      activeRef.current = !0;
    }), React2.useCallback(
      (to, options = {}) => {
        if (warning(activeRef.current, navigateEffectWarning), !activeRef.current) return;
        if (typeof to == "number") {
          navigator2.go(to);
          return;
        }
        let path = resolveTo(
          to,
          JSON.parse(routePathnamesJson),
          locationPathname,
          options.relative === "path"
        );
        dataRouterContext == null && basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), (options.replace ? navigator2.replace : navigator2.push)(
          path,
          options.state,
          options
        );
      },
      [
        basename,
        navigator2,
        routePathnamesJson,
        locationPathname,
        dataRouterContext
      ]
    );
  }
  var OutletContext = React2.createContext(null);
  function useResolvedPath(to, { relative } = {}) {
    let { matches } = React2.useContext(RouteContext), { pathname: locationPathname } = useLocation(), routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
    return React2.useMemo(
      () => resolveTo(
        to,
        JSON.parse(routePathnamesJson),
        locationPathname,
        relative === "path"
      ),
      [to, routePathnamesJson, locationPathname, relative]
    );
  }
  function useRoutesImpl(routes, locationArg, dataRouterState, onError, future) {
    var _a2;
    invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of the
      // router loaded. We can help them understand how to avoid that.
      "useRoutes() may be used only in the context of a <Router> component."
    );
    let { navigator: navigator2 } = React2.useContext(NavigationContext), { matches: parentMatches } = React2.useContext(RouteContext), routeMatch = parentMatches[parentMatches.length - 1], parentParams = routeMatch ? routeMatch.params : {}, parentPathname = routeMatch ? routeMatch.pathname : "/", parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/", parentRoute = routeMatch && routeMatch.route;
    if (ENABLE_DEV_WARNINGS) {
      let parentPath = parentRoute && parentRoute.path || "";
      warningOnce(
        parentPathname,
        !parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"),
        `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${parentPathname}" (under <Route path="${parentPath}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${parentPath}"> to <Route path="${parentPath === "/" ? "*" : `${parentPath}/*`}">.`
      );
    }
    let locationFromContext = useLocation(), location2;
    if (locationArg) {
      let parsedLocationArg = typeof locationArg == "string" ? parsePath(locationArg) : locationArg;
      invariant(
        parentPathnameBase === "/" || ((_a2 = parsedLocationArg.pathname) == null ? void 0 : _a2.startsWith(parentPathnameBase)),
        `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
      ), location2 = parsedLocationArg;
    } else
      location2 = locationFromContext;
    let pathname = location2.pathname || "/", remainingPathname = pathname;
    if (parentPathnameBase !== "/") {
      let parentSegments = parentPathnameBase.replace(/^\//, "").split("/");
      remainingPathname = "/" + pathname.replace(/^\//, "").split("/").slice(parentSegments.length).join("/");
    }
    let matches = matchRoutes(routes, { pathname: remainingPathname });
    ENABLE_DEV_WARNINGS && (warning(
      parentRoute || matches != null,
      `No routes matched location "${location2.pathname}${location2.search}${location2.hash}" `
    ), warning(
      matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,
      `Matched leaf route at location "${location2.pathname}${location2.search}${location2.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
    ));
    let renderedMatches = _renderMatches(
      matches && matches.map(
        (match) => Object.assign({}, match, {
          params: Object.assign({}, parentParams, match.params),
          pathname: joinPaths([
            parentPathnameBase,
            // Re-encode pathnames that were decoded inside matchRoutes.
            // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
            // `new URL()` internally and we need to prevent it from treating
            // them as separators
            navigator2.encodeLocation ? navigator2.encodeLocation(
              match.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")
            ).pathname : match.pathname
          ]),
          pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
            parentPathnameBase,
            // Re-encode pathnames that were decoded inside matchRoutes
            // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
            // `new URL()` internally and we need to prevent it from treating
            // them as separators
            navigator2.encodeLocation ? navigator2.encodeLocation(
              match.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")
            ).pathname : match.pathnameBase
          ])
        })
      ),
      parentMatches,
      dataRouterState,
      onError,
      future
    );
    return locationArg && renderedMatches ? /* @__PURE__ */ React2.createElement(
      LocationContext.Provider,
      {
        value: {
          location: {
            pathname: "/",
            search: "",
            hash: "",
            state: null,
            key: "default",
            ...location2
          },
          navigationType: "POP"
          /* Pop */
        }
      },
      renderedMatches
    ) : renderedMatches;
  }
  function DefaultErrorComponent() {
    let error = useRouteError(), message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error), stack = error instanceof Error ? error.stack : null, lightgrey = "rgba(200,200,200, 0.5)", preStyles = { padding: "0.5rem", backgroundColor: lightgrey }, codeStyles = { padding: "2px 4px", backgroundColor: lightgrey }, devInfo = null;
    return ENABLE_DEV_WARNINGS && (console.error(
      "Error handled by React Router default ErrorBoundary:",
      error
    ), devInfo = /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("p", null, "\u{1F4BF} Hey developer \u{1F44B}"), /* @__PURE__ */ React2.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React2.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React2.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."))), /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React2.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React2.createElement("pre", { style: preStyles }, stack) : null, devInfo);
  }
  var defaultErrorElement = /* @__PURE__ */ React2.createElement(DefaultErrorComponent, null), RenderErrorBoundary = class extends React2.Component {
    constructor(props) {
      super(props), this.state = {
        location: props.location,
        revalidation: props.revalidation,
        error: props.error
      };
    }
    static getDerivedStateFromError(error) {
      return { error };
    }
    static getDerivedStateFromProps(props, state) {
      return state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle" ? {
        error: props.error,
        location: props.location,
        revalidation: props.revalidation
      } : {
        error: props.error !== void 0 ? props.error : state.error,
        location: state.location,
        revalidation: props.revalidation || state.revalidation
      };
    }
    componentDidCatch(error, errorInfo) {
      this.props.onError ? this.props.onError(error, errorInfo) : console.error(
        "React Router caught the following error during render",
        error
      );
    }
    render() {
      let error = this.state.error;
      if (this.context && typeof error == "object" && error && "digest" in error && typeof error.digest == "string") {
        let decoded = decodeRouteErrorResponseDigest(error.digest);
        decoded && (error = decoded);
      }
      let result = error !== void 0 ? /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React2.createElement(
        RouteErrorContext.Provider,
        {
          value: error,
          children: this.props.component
        }
      )) : this.props.children;
      return this.context ? /* @__PURE__ */ React2.createElement(RSCErrorHandler, { error }, result) : result;
    }
  };
  RenderErrorBoundary.contextType = RSCRouterContext;
  var errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();
  function RSCErrorHandler({
    children,
    error
  }) {
    let { basename } = React2.useContext(NavigationContext);
    if (typeof error == "object" && error && "digest" in error && typeof error.digest == "string") {
      let redirect2 = decodeRedirectErrorDigest(error.digest);
      if (redirect2) {
        let existingRedirect = errorRedirectHandledMap.get(error);
        if (existingRedirect) throw existingRedirect;
        let parsed = parseToInfo(redirect2.location, basename);
        if (isBrowser && !errorRedirectHandledMap.get(error))
          if (parsed.isExternal || redirect2.reloadDocument)
            window.location.href = parsed.absoluteURL || parsed.to;
          else {
            let redirectPromise = Promise.resolve().then(
              () => window.__reactRouterDataRouter.navigate(parsed.to, {
                replace: redirect2.replace
              })
            );
            throw errorRedirectHandledMap.set(error, redirectPromise), redirectPromise;
          }
        return /* @__PURE__ */ React2.createElement(
          "meta",
          {
            httpEquiv: "refresh",
            content: `0;url=${parsed.absoluteURL || parsed.to}`
          }
        );
      }
    }
    return children;
  }
  function RenderedRoute({ routeContext, match, children }) {
    let dataRouterContext = React2.useContext(DataRouterContext);
    return dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary) && (dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id), /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: routeContext }, children);
  }
  function _renderMatches(matches, parentMatches = [], dataRouterState = null, onErrorHandler = null, future = null) {
    if (matches == null) {
      if (!dataRouterState)
        return null;
      if (dataRouterState.errors)
        matches = dataRouterState.matches;
      else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0)
        matches = dataRouterState.matches;
      else
        return null;
    }
    let renderedMatches = matches, errors = dataRouterState == null ? void 0 : dataRouterState.errors;
    if (errors != null) {
      let errorIndex = renderedMatches.findIndex(
        (m) => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== void 0
      );
      invariant(
        errorIndex >= 0,
        `Could not find a matching route for errors on route IDs: ${Object.keys(
          errors
        ).join(",")}`
      ), renderedMatches = renderedMatches.slice(
        0,
        Math.min(renderedMatches.length, errorIndex + 1)
      );
    }
    let renderFallback = !1, fallbackIndex = -1;
    if (dataRouterState)
      for (let i = 0; i < renderedMatches.length; i++) {
        let match = renderedMatches[i];
        if ((match.route.HydrateFallback || match.route.hydrateFallbackElement) && (fallbackIndex = i), match.route.id) {
          let { loaderData, errors: errors2 } = dataRouterState, needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);
          if (match.route.lazy || needsToRunLoader) {
            renderFallback = !0, fallbackIndex >= 0 ? renderedMatches = renderedMatches.slice(0, fallbackIndex + 1) : renderedMatches = [renderedMatches[0]];
            break;
          }
        }
      }
    let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
      var _a2, _b, _c;
      onErrorHandler(error, {
        location: dataRouterState.location,
        params: (_c = (_b = (_a2 = dataRouterState.matches) == null ? void 0 : _a2[0]) == null ? void 0 : _b.params) != null ? _c : {},
        unstable_pattern: getRoutePattern(dataRouterState.matches),
        errorInfo
      });
    } : void 0;
    return renderedMatches.reduceRight(
      (outlet, match, index) => {
        let error, shouldRenderHydrateFallback = !1, errorElement = null, hydrateFallbackElement = null;
        dataRouterState && (error = errors && match.route.id ? errors[match.route.id] : void 0, errorElement = match.route.errorElement || defaultErrorElement, renderFallback && (fallbackIndex < 0 && index === 0 ? (warningOnce(
          "route-fallback",
          !1,
          "No `HydrateFallback` element provided to render during initial hydration"
        ), shouldRenderHydrateFallback = !0, hydrateFallbackElement = null) : fallbackIndex === index && (shouldRenderHydrateFallback = !0, hydrateFallbackElement = match.route.hydrateFallbackElement || null)));
        let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1)), getChildren = () => {
          let children;
          return error ? children = errorElement : shouldRenderHydrateFallback ? children = hydrateFallbackElement : match.route.Component ? children = /* @__PURE__ */ React2.createElement(match.route.Component, null) : match.route.element ? children = match.route.element : children = outlet, /* @__PURE__ */ React2.createElement(
            RenderedRoute,
            {
              match,
              routeContext: {
                outlet,
                matches: matches2,
                isDataRoute: dataRouterState != null
              },
              children
            }
          );
        };
        return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2.createElement(
          RenderErrorBoundary,
          {
            location: dataRouterState.location,
            revalidation: dataRouterState.revalidation,
            component: errorElement,
            error,
            children: getChildren(),
            routeContext: { outlet: null, matches: matches2, isDataRoute: !0 },
            onError
          }
        ) : getChildren();
      },
      null
    );
  }
  function getDataRouterConsoleError(hookName) {
    return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;
  }
  function useDataRouterContext(hookName) {
    let ctx = React2.useContext(DataRouterContext);
    return invariant(ctx, getDataRouterConsoleError(hookName)), ctx;
  }
  function useDataRouterState(hookName) {
    let state = React2.useContext(DataRouterStateContext);
    return invariant(state, getDataRouterConsoleError(hookName)), state;
  }
  function useRouteContext(hookName) {
    let route = React2.useContext(RouteContext);
    return invariant(route, getDataRouterConsoleError(hookName)), route;
  }
  function useCurrentRouteId(hookName) {
    let route = useRouteContext(hookName), thisRoute = route.matches[route.matches.length - 1];
    return invariant(
      thisRoute.route.id,
      `${hookName} can only be used on routes that contain a unique "id"`
    ), thisRoute.route.id;
  }
  function useRouteId() {
    return useCurrentRouteId(
      "useRouteId"
      /* UseRouteId */
    );
  }
  function useNavigation() {
    return useDataRouterState(
      "useNavigation"
      /* UseNavigation */
    ).navigation;
  }
  function useMatches() {
    let { matches, loaderData } = useDataRouterState(
      "useMatches"
      /* UseMatches */
    );
    return React2.useMemo(
      () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),
      [matches, loaderData]
    );
  }
  function useRouteError() {
    var _a2;
    let error = React2.useContext(RouteErrorContext), state = useDataRouterState(
      "useRouteError"
      /* UseRouteError */
    ), routeId = useCurrentRouteId(
      "useRouteError"
      /* UseRouteError */
    );
    return error !== void 0 ? error : (_a2 = state.errors) == null ? void 0 : _a2[routeId];
  }
  var blockerId = 0;
  function useBlocker(shouldBlock) {
    let { router, basename } = useDataRouterContext(
      "useBlocker"
      /* UseBlocker */
    ), state = useDataRouterState(
      "useBlocker"
      /* UseBlocker */
    ), [blockerKey, setBlockerKey] = React2.useState(""), blockerFunction = React2.useCallback(
      (arg) => {
        if (typeof shouldBlock != "function")
          return !!shouldBlock;
        if (basename === "/")
          return shouldBlock(arg);
        let { currentLocation, nextLocation, historyAction } = arg;
        return shouldBlock({
          currentLocation: {
            ...currentLocation,
            pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname
          },
          nextLocation: {
            ...nextLocation,
            pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname
          },
          historyAction
        });
      },
      [basename, shouldBlock]
    );
    return React2.useEffect(() => {
      let key = String(++blockerId);
      return setBlockerKey(key), () => router.deleteBlocker(key);
    }, [router]), React2.useEffect(() => {
      blockerKey !== "" && router.getBlocker(blockerKey, blockerFunction);
    }, [router, blockerKey, blockerFunction]), blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;
  }
  function useNavigateStable() {
    let { router } = useDataRouterContext(
      "useNavigate"
      /* UseNavigateStable */
    ), id = useCurrentRouteId(
      "useNavigate"
      /* UseNavigateStable */
    ), activeRef = React2.useRef(!1);
    return useIsomorphicLayoutEffect(() => {
      activeRef.current = !0;
    }), React2.useCallback(
      async (to, options = {}) => {
        warning(activeRef.current, navigateEffectWarning), activeRef.current && (typeof to == "number" ? await router.navigate(to) : await router.navigate(to, { fromRouteId: id, ...options }));
      },
      [router, id]
    );
  }
  var alreadyWarned = {};
  function warningOnce(key, cond, message) {
    !cond && !alreadyWarned[key] && (alreadyWarned[key] = !0, warning(!1, message));
  }
  var alreadyWarned2 = {};
  function warnOnce(condition, message) {
    !condition && !alreadyWarned2[message] && (alreadyWarned2[message] = !0, console.warn(message));
  }
  var USE_OPTIMISTIC = "useOptimistic", useOptimisticImpl = React3[USE_OPTIMISTIC], stableUseOptimisticSetter = () => {
  };
  function useOptimisticSafe(val) {
    return useOptimisticImpl ? useOptimisticImpl(val) : [val, stableUseOptimisticSetter];
  }
  function mapRouteProperties(route) {
    let updates = {
      // Note: this check also occurs in createRoutesFromChildren so update
      // there if you change this -- please and thank you!
      hasErrorBoundary: route.hasErrorBoundary || route.ErrorBoundary != null || route.errorElement != null
    };
    return route.Component && (ENABLE_DEV_WARNINGS && route.element && warning(
      !1,
      "You should not include both `Component` and `element` on your route - `Component` will be used."
    ), Object.assign(updates, {
      element: React3.createElement(route.Component),
      Component: void 0
    })), route.HydrateFallback && (ENABLE_DEV_WARNINGS && route.hydrateFallbackElement && warning(
      !1,
      "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."
    ), Object.assign(updates, {
      hydrateFallbackElement: React3.createElement(route.HydrateFallback),
      HydrateFallback: void 0
    })), route.ErrorBoundary && (ENABLE_DEV_WARNINGS && route.errorElement && warning(
      !1,
      "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."
    ), Object.assign(updates, {
      errorElement: React3.createElement(route.ErrorBoundary),
      ErrorBoundary: void 0
    })), updates;
  }
  var hydrationRouteProperties = [
    "HydrateFallback",
    "hydrateFallbackElement"
  ];
  var Deferred = class {
    constructor() {
      this.status = "pending", this.promise = new Promise((resolve, reject) => {
        this.resolve = (value) => {
          this.status === "pending" && (this.status = "resolved", resolve(value));
        }, this.reject = (reason) => {
          this.status === "pending" && (this.status = "rejected", reject(reason));
        };
      });
    }
  };
  function RouterProvider({
    router,
    flushSync: reactDomFlushSyncImpl,
    onError,
    unstable_useTransitions
  }) {
    unstable_useTransitions = useIsRSCRouterContext() || unstable_useTransitions;
    let [_state, setStateImpl] = React3.useState(router.state), [state, setOptimisticState] = useOptimisticSafe(_state), [pendingState, setPendingState] = React3.useState(), [vtContext, setVtContext] = React3.useState({
      isTransitioning: !1
    }), [renderDfd, setRenderDfd] = React3.useState(), [transition, setTransition] = React3.useState(), [interruption, setInterruption] = React3.useState(), fetcherData = React3.useRef(/* @__PURE__ */ new Map()), setState = React3.useCallback(
      (newState, { deletedFetchers, newErrors, flushSync: flushSync4, viewTransitionOpts }) => {
        newErrors && onError && Object.values(newErrors).forEach(
          (error) => {
            var _a2, _b;
            return onError(error, {
              location: newState.location,
              params: (_b = (_a2 = newState.matches[0]) == null ? void 0 : _a2.params) != null ? _b : {},
              unstable_pattern: getRoutePattern(newState.matches)
            });
          }
        ), newState.fetchers.forEach((fetcher, key) => {
          fetcher.data !== void 0 && fetcherData.current.set(key, fetcher.data);
        }), deletedFetchers.forEach((key) => fetcherData.current.delete(key)), warnOnce(
          flushSync4 === !1 || reactDomFlushSyncImpl != null,
          'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
        );
        let isViewTransitionAvailable = router.window != null && router.window.document != null && typeof router.window.document.startViewTransition == "function";
        if (warnOnce(
          viewTransitionOpts == null || isViewTransitionAvailable,
          "You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
        ), !viewTransitionOpts || !isViewTransitionAvailable) {
          reactDomFlushSyncImpl && flushSync4 ? reactDomFlushSyncImpl(() => setStateImpl(newState)) : unstable_useTransitions === !1 ? setStateImpl(newState) : React3.startTransition(() => {
            unstable_useTransitions === !0 && setOptimisticState((s) => getOptimisticRouterState(s, newState)), setStateImpl(newState);
          });
          return;
        }
        if (reactDomFlushSyncImpl && flushSync4) {
          reactDomFlushSyncImpl(() => {
            transition && (renderDfd == null || renderDfd.resolve(), transition.skipTransition()), setVtContext({
              isTransitioning: !0,
              flushSync: !0,
              currentLocation: viewTransitionOpts.currentLocation,
              nextLocation: viewTransitionOpts.nextLocation
            });
          });
          let t = router.window.document.startViewTransition(() => {
            reactDomFlushSyncImpl(() => setStateImpl(newState));
          });
          t.finished.finally(() => {
            reactDomFlushSyncImpl(() => {
              setRenderDfd(void 0), setTransition(void 0), setPendingState(void 0), setVtContext({ isTransitioning: !1 });
            });
          }), reactDomFlushSyncImpl(() => setTransition(t));
          return;
        }
        transition ? (renderDfd == null || renderDfd.resolve(), transition.skipTransition(), setInterruption({
          state: newState,
          currentLocation: viewTransitionOpts.currentLocation,
          nextLocation: viewTransitionOpts.nextLocation
        })) : (setPendingState(newState), setVtContext({
          isTransitioning: !0,
          flushSync: !1,
          currentLocation: viewTransitionOpts.currentLocation,
          nextLocation: viewTransitionOpts.nextLocation
        }));
      },
      [
        router.window,
        reactDomFlushSyncImpl,
        transition,
        renderDfd,
        unstable_useTransitions,
        setOptimisticState,
        onError
      ]
    );
    React3.useLayoutEffect(() => router.subscribe(setState), [router, setState]), React3.useEffect(() => {
      vtContext.isTransitioning && !vtContext.flushSync && setRenderDfd(new Deferred());
    }, [vtContext]), React3.useEffect(() => {
      if (renderDfd && pendingState && router.window) {
        let newState = pendingState, renderPromise = renderDfd.promise, transition2 = router.window.document.startViewTransition(async () => {
          unstable_useTransitions === !1 ? setStateImpl(newState) : React3.startTransition(() => {
            unstable_useTransitions === !0 && setOptimisticState((s) => getOptimisticRouterState(s, newState)), setStateImpl(newState);
          }), await renderPromise;
        });
        transition2.finished.finally(() => {
          setRenderDfd(void 0), setTransition(void 0), setPendingState(void 0), setVtContext({ isTransitioning: !1 });
        }), setTransition(transition2);
      }
    }, [
      pendingState,
      renderDfd,
      router.window,
      unstable_useTransitions,
      setOptimisticState
    ]), React3.useEffect(() => {
      renderDfd && pendingState && state.location.key === pendingState.location.key && renderDfd.resolve();
    }, [renderDfd, transition, state.location, pendingState]), React3.useEffect(() => {
      !vtContext.isTransitioning && interruption && (setPendingState(interruption.state), setVtContext({
        isTransitioning: !0,
        flushSync: !1,
        currentLocation: interruption.currentLocation,
        nextLocation: interruption.nextLocation
      }), setInterruption(void 0));
    }, [vtContext.isTransitioning, interruption]);
    let navigator2 = React3.useMemo(() => ({
      createHref: router.createHref,
      encodeLocation: router.encodeLocation,
      go: (n) => router.navigate(n),
      push: (to, state2, opts) => router.navigate(to, {
        state: state2,
        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
      }),
      replace: (to, state2, opts) => router.navigate(to, {
        replace: !0,
        state: state2,
        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
      })
    }), [router]), basename = router.basename || "/", dataRouterContext = React3.useMemo(
      () => ({
        router,
        navigator: navigator2,
        static: !1,
        basename,
        onError
      }),
      [router, navigator2, basename, onError]
    );
    return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React3.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React3.createElement(FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React3.createElement(ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React3.createElement(
      Router,
      {
        basename,
        location: state.location,
        navigationType: state.historyAction,
        navigator: navigator2,
        unstable_useTransitions
      },
      /* @__PURE__ */ React3.createElement(
        MemoizedDataRoutes,
        {
          routes: router.routes,
          future: router.future,
          state,
          onError
        }
      )
    ))))), null);
  }
  function getOptimisticRouterState(currentState, newState) {
    return {
      // Don't surface "current location specific" stuff mid-navigation
      // (historyAction, location, matches, loaderData, errors, initialized,
      // restoreScroll, preventScrollReset, blockers, etc.)
      ...currentState,
      // Only surface "pending/in-flight stuff"
      // (navigation, revalidation, actionData, fetchers, )
      navigation: newState.navigation.state !== "idle" ? newState.navigation : currentState.navigation,
      revalidation: newState.revalidation !== "idle" ? newState.revalidation : currentState.revalidation,
      actionData: newState.navigation.state !== "submitting" ? newState.actionData : currentState.actionData,
      fetchers: newState.fetchers
    };
  }
  var MemoizedDataRoutes = React3.memo(DataRoutes);
  function DataRoutes({
    routes,
    future,
    state,
    onError
  }) {
    return useRoutesImpl(routes, void 0, state, onError, future);
  }
  function Navigate({
    to,
    replace: replace2,
    state,
    relative
  }) {
    invariant(
      useInRouterContext(),
      // TODO: This error is probably because they somehow have 2 versions of
      // the router loaded. We can help them understand how to avoid that.
      "<Navigate> may be used only in the context of a <Router> component."
    );
    let { static: isStatic } = React3.useContext(NavigationContext);
    warning(
      !isStatic,
      "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
    );
    let { matches } = React3.useContext(RouteContext), { pathname: locationPathname } = useLocation(), navigate = useNavigate(), path = resolveTo(
      to,
      getResolveToMatches(matches),
      locationPathname,
      relative === "path"
    ), jsonPath = JSON.stringify(path);
    return React3.useEffect(() => {
      navigate(JSON.parse(jsonPath), { replace: replace2, state, relative });
    }, [navigate, jsonPath, relative, replace2, state]), null;
  }
  function Router({
    basename: basenameProp = "/",
    children = null,
    location: locationProp,
    navigationType = "POP",
    navigator: navigator2,
    static: staticProp = !1,
    unstable_useTransitions
  }) {
    invariant(
      !useInRouterContext(),
      "You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
    );
    let basename = basenameProp.replace(/^\/*/, "/"), navigationContext = React3.useMemo(
      () => ({
        basename,
        navigator: navigator2,
        static: staticProp,
        unstable_useTransitions,
        future: {}
      }),
      [basename, navigator2, staticProp, unstable_useTransitions]
    );
    typeof locationProp == "string" && (locationProp = parsePath(locationProp));
    let {
      pathname = "/",
      search = "",
      hash = "",
      state = null,
      key = "default"
    } = locationProp, locationContext = React3.useMemo(() => {
      let trailingPathname = stripBasename(pathname, basename);
      return trailingPathname == null ? null : {
        location: {
          pathname: trailingPathname,
          search,
          hash,
          state,
          key
        },
        navigationType
      };
    }, [basename, pathname, search, hash, state, key, navigationType]);
    return warning(
      locationContext != null,
      `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
    ), locationContext == null ? null : /* @__PURE__ */ React3.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3.createElement(LocationContext.Provider, { children, value: locationContext }));
  }
  var defaultMethod = "get", defaultEncType = "application/x-www-form-urlencoded";
  function isHtmlElement(object) {
    return typeof HTMLElement != "undefined" && object instanceof HTMLElement;
  }
  function isButtonElement(object) {
    return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
  }
  function isFormElement(object) {
    return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
  }
  function isInputElement(object) {
    return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
  }
  function isModifiedEvent(event) {
    return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
  }
  function shouldProcessLinkClick(event, target) {
    return event.button === 0 && // Ignore everything but left clicks
    (!target || target === "_self") && // Let browser handle "target=_blank" etc.
    !isModifiedEvent(event);
  }
  var _formDataSupportsSubmitter = null;
  function isFormDataSubmitterSupported() {
    if (_formDataSupportsSubmitter === null)
      try {
        new FormData(
          document.createElement("form"),
          // @ts-expect-error if FormData supports the submitter parameter, this will throw
          0
        ), _formDataSupportsSubmitter = !1;
      } catch (e) {
        _formDataSupportsSubmitter = !0;
      }
    return _formDataSupportsSubmitter;
  }
  var supportedFormEncTypes = /* @__PURE__ */ new Set([
    "application/x-www-form-urlencoded",
    "multipart/form-data",
    "text/plain"
  ]);
  function getFormEncType(encType) {
    return encType != null && !supportedFormEncTypes.has(encType) ? (warning(
      !1,
      `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
    ), null) : encType;
  }
  function getFormSubmissionInfo(target, basename) {
    let method, action, encType, formData, body;
    if (isFormElement(target)) {
      let attr = target.getAttribute("action");
      action = attr ? stripBasename(attr, basename) : null, method = target.getAttribute("method") || defaultMethod, encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType, formData = new FormData(target);
    } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
      let form = target.form;
      if (form == null)
        throw new Error(
          'Cannot submit a <button> or <input type="submit"> without a <form>'
        );
      let attr = target.getAttribute("formaction") || form.getAttribute("action");
      if (action = attr ? stripBasename(attr, basename) : null, method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod, encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType, formData = new FormData(form, target), !isFormDataSubmitterSupported()) {
        let { name, type, value } = target;
        if (type === "image") {
          let prefix = name ? `${name}.` : "";
          formData.append(`${prefix}x`, "0"), formData.append(`${prefix}y`, "0");
        } else name && formData.append(name, value);
      }
    } else {
      if (isHtmlElement(target))
        throw new Error(
          'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
        );
      method = defaultMethod, action = null, encType = defaultEncType, body = target;
    }
    return formData && encType === "text/plain" && (body = formData, formData = void 0), { action, method: method.toLowerCase(), encType, formData, body };
  }
  var objectProtoNames2 = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
  var ESCAPE_LOOKUP = {
    "&": "\\u0026",
    ">": "\\u003e",
    "<": "\\u003c",
    "\u2028": "\\u2028",
    "\u2029": "\\u2029"
  }, ESCAPE_REGEX = /[&><\u2028\u2029]/g;
  function escapeHtml(html) {
    return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
  }
  function invariant2(value, message) {
    if (value === !1 || value === null || typeof value == "undefined")
      throw new Error(message);
  }
  function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
    let url = typeof reqUrl == "string" ? new URL(
      reqUrl,
      // This can be called during the SSR flow via PrefetchPageLinksImpl so
      // don't assume window is available
      typeof window == "undefined" ? "server://singlefetch/" : window.location.origin
    ) : reqUrl;
    return trailingSlashAware ? url.pathname.endsWith("/") ? url.pathname = `${url.pathname}_.${extension}` : url.pathname = `${url.pathname}.${extension}` : url.pathname === "/" ? url.pathname = `_root.${extension}` : basename && stripBasename(url.pathname, basename) === "/" ? url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}` : url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`, url;
  }
  async function loadRouteModule(route, routeModulesCache) {
    if (route.id in routeModulesCache)
      return routeModulesCache[route.id];
    try {
      let routeModule = await import(
        /* @vite-ignore */
        /* webpackIgnore: true */
        route.module
      );
      return routeModulesCache[route.id] = routeModule, routeModule;
    } catch (error) {
      if (console.error(
        `Error loading route module \`${route.module}\`, reloading page...`
      ), console.error(error), window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error
      import_meta.hot)
        throw error;
      return window.location.reload(), new Promise(() => {
      });
    }
  }
  function isPageLinkDescriptor(object) {
    return object != null && typeof object.page == "string";
  }
  function isHtmlLinkDescriptor(object) {
    return object == null ? !1 : object.href == null ? object.rel === "preload" && typeof object.imageSrcSet == "string" && typeof object.imageSizes == "string" : typeof object.rel == "string" && typeof object.href == "string";
  }
  async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
    let links = await Promise.all(
      matches.map(async (match) => {
        let route = manifest.routes[match.route.id];
        if (route) {
          let mod2 = await loadRouteModule(route, routeModules);
          return mod2.links ? mod2.links() : [];
        }
        return [];
      })
    );
    return dedupeLinkDescriptors(
      links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map(
        (link) => link.rel === "stylesheet" ? { ...link, rel: "prefetch", as: "style" } : { ...link, rel: "prefetch" }
      )
    );
  }
  function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location2, mode) {
    let isNew = (match, index) => currentMatches[index] ? match.route.id !== currentMatches[index].route.id : !0, matchPathChanged = (match, index) => {
      var _a2;
      return (
        // param change, /users/123 -> /users/456
        currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
        // e.g. /files/images/avatar.jpg -> files/finances.xls
        ((_a2 = currentMatches[index].route.path) == null ? void 0 : _a2.endsWith("*")) && currentMatches[index].params["*"] !== match.params["*"]
      );
    };
    return mode === "assets" ? nextMatches.filter(
      (match, index) => isNew(match, index) || matchPathChanged(match, index)
    ) : mode === "data" ? nextMatches.filter((match, index) => {
      var _a2;
      let manifestRoute = manifest.routes[match.route.id];
      if (!manifestRoute || !manifestRoute.hasLoader)
        return !1;
      if (isNew(match, index) || matchPathChanged(match, index))
        return !0;
      if (match.route.shouldRevalidate) {
        let routeChoice = match.route.shouldRevalidate({
          currentUrl: new URL(
            location2.pathname + location2.search + location2.hash,
            window.origin
          ),
          currentParams: ((_a2 = currentMatches[0]) == null ? void 0 : _a2.params) || {},
          nextUrl: new URL(page, window.origin),
          nextParams: match.params,
          defaultShouldRevalidate: !0
        });
        if (typeof routeChoice == "boolean")
          return routeChoice;
      }
      return !0;
    }) : [];
  }
  function getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {
    return dedupeHrefs(
      matches.map((match) => {
        let route = manifest.routes[match.route.id];
        if (!route) return [];
        let hrefs = [route.module];
        return route.clientActionModule && (hrefs = hrefs.concat(route.clientActionModule)), route.clientLoaderModule && (hrefs = hrefs.concat(route.clientLoaderModule)), includeHydrateFallback && route.hydrateFallbackModule && (hrefs = hrefs.concat(route.hydrateFallbackModule)), route.imports && (hrefs = hrefs.concat(route.imports)), hrefs;
      }).flat(1)
    );
  }
  function dedupeHrefs(hrefs) {
    return [...new Set(hrefs)];
  }
  function sortKeys(obj) {
    let sorted = {}, keys = Object.keys(obj).sort();
    for (let key of keys)
      sorted[key] = obj[key];
    return sorted;
  }
  function dedupeLinkDescriptors(descriptors, preloads) {
    let set = /* @__PURE__ */ new Set(), preloadsSet = new Set(preloads);
    return descriptors.reduce((deduped, descriptor) => {
      if (preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === "script" && descriptor.href && preloadsSet.has(descriptor.href))
        return deduped;
      let key = JSON.stringify(sortKeys(descriptor));
      return set.has(key) || (set.add(key), deduped.push({ key, link: descriptor })), deduped;
    }, []);
  }
  function useDataRouterContext2() {
    let context = React8.useContext(DataRouterContext);
    return invariant2(
      context,
      "You must render this element inside a <DataRouterContext.Provider> element"
    ), context;
  }
  function useDataRouterStateContext() {
    let context = React8.useContext(DataRouterStateContext);
    return invariant2(
      context,
      "You must render this element inside a <DataRouterStateContext.Provider> element"
    ), context;
  }
  var FrameworkContext = React8.createContext(void 0);
  FrameworkContext.displayName = "FrameworkContext";
  function useFrameworkContext() {
    let context = React8.useContext(FrameworkContext);
    return invariant2(
      context,
      "You must render this element inside a <HydratedRouter> element"
    ), context;
  }
  function usePrefetchBehavior(prefetch, theirElementProps) {
    let frameworkContext = React8.useContext(FrameworkContext), [maybePrefetch, setMaybePrefetch] = React8.useState(!1), [shouldPrefetch, setShouldPrefetch] = React8.useState(!1), { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps, ref = React8.useRef(null);
    React8.useEffect(() => {
      if (prefetch === "render" && setShouldPrefetch(!0), prefetch === "viewport") {
        let callback = (entries) => {
          entries.forEach((entry) => {
            setShouldPrefetch(entry.isIntersecting);
          });
        }, observer = new IntersectionObserver(callback, { threshold: 0.5 });
        return ref.current && observer.observe(ref.current), () => {
          observer.disconnect();
        };
      }
    }, [prefetch]), React8.useEffect(() => {
      if (maybePrefetch) {
        let id = setTimeout(() => {
          setShouldPrefetch(!0);
        }, 100);
        return () => {
          clearTimeout(id);
        };
      }
    }, [maybePrefetch]);
    let setIntent = () => {
      setMaybePrefetch(!0);
    }, cancelIntent = () => {
      setMaybePrefetch(!1), setShouldPrefetch(!1);
    };
    return frameworkContext ? prefetch !== "intent" ? [shouldPrefetch, ref, {}] : [
      shouldPrefetch,
      ref,
      {
        onFocus: composeEventHandlers(onFocus, setIntent),
        onBlur: composeEventHandlers(onBlur, cancelIntent),
        onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),
        onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),
        onTouchStart: composeEventHandlers(onTouchStart, setIntent)
      }
    ] : [!1, ref, {}];
  }
  function composeEventHandlers(theirHandler, ourHandler) {
    return (event) => {
      theirHandler && theirHandler(event), event.defaultPrevented || ourHandler(event);
    };
  }
  function PrefetchPageLinks({ page, ...linkProps }) {
    let { router } = useDataRouterContext2(), matches = React8.useMemo(
      () => matchRoutes(router.routes, page, router.basename),
      [router.routes, page, router.basename]
    );
    return matches ? /* @__PURE__ */ React8.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps }) : null;
  }
  function useKeyedPrefetchLinks(matches) {
    let { manifest, routeModules } = useFrameworkContext(), [keyedPrefetchLinks, setKeyedPrefetchLinks] = React8.useState([]);
    return React8.useEffect(() => {
      let interrupted = !1;
      return getKeyedPrefetchLinks(matches, manifest, routeModules).then(
        (links) => {
          interrupted || setKeyedPrefetchLinks(links);
        }
      ), () => {
        interrupted = !0;
      };
    }, [matches, manifest, routeModules]), keyedPrefetchLinks;
  }
  function PrefetchPageLinksImpl({
    page,
    matches: nextMatches,
    ...linkProps
  }) {
    let location2 = useLocation(), { future, manifest, routeModules } = useFrameworkContext(), { basename } = useDataRouterContext2(), { loaderData, matches } = useDataRouterStateContext(), newMatchesForData = React8.useMemo(
      () => getNewMatchesForLinks(
        page,
        nextMatches,
        matches,
        manifest,
        location2,
        "data"
      ),
      [page, nextMatches, matches, manifest, location2]
    ), newMatchesForAssets = React8.useMemo(
      () => getNewMatchesForLinks(
        page,
        nextMatches,
        matches,
        manifest,
        location2,
        "assets"
      ),
      [page, nextMatches, matches, manifest, location2]
    ), dataHrefs = React8.useMemo(() => {
      if (page === location2.pathname + location2.search + location2.hash)
        return [];
      let routesParams = /* @__PURE__ */ new Set(), foundOptOutRoute = !1;
      if (nextMatches.forEach((m) => {
        var _a2;
        let manifestRoute = manifest.routes[m.route.id];
        !manifestRoute || !manifestRoute.hasLoader || (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && ((_a2 = routeModules[m.route.id]) != null && _a2.shouldRevalidate) || manifestRoute.hasClientLoader ? foundOptOutRoute = !0 : routesParams.add(m.route.id));
      }), routesParams.size === 0)
        return [];
      let url = singleFetchUrl(
        page,
        basename,
        future.unstable_trailingSlashAwareDataRequests,
        "data"
      );
      return foundOptOutRoute && routesParams.size > 0 && url.searchParams.set(
        "_routes",
        nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(",")
      ), [url.pathname + url.search];
    }, [
      basename,
      future.unstable_trailingSlashAwareDataRequests,
      loaderData,
      location2,
      manifest,
      newMatchesForData,
      nextMatches,
      page,
      routeModules
    ]), moduleHrefs = React8.useMemo(
      () => getModuleLinkHrefs(newMatchesForAssets, manifest),
      [newMatchesForAssets, manifest]
    ), keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
    return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
      // these don't spread `linkProps` because they are full link descriptors
      // already with their own props
      /* @__PURE__ */ React8.createElement("link", { key, nonce: linkProps.nonce, ...link })
    )));
  }
  function mergeRefs(...refs) {
    return (value) => {
      refs.forEach((ref) => {
        typeof ref == "function" ? ref(value) : ref != null && (ref.current = value);
      });
    };
  }
  var isBrowser2 = typeof window != "undefined" && typeof window.document != "undefined" && typeof window.document.createElement != "undefined";
  try {
    isBrowser2 && (window.__reactRouterVersion = // @ts-expect-error
    "7.12.0");
  } catch (e) {
  }
  function createBrowserRouter(routes, opts) {
    return createRouter({
      basename: opts == null ? void 0 : opts.basename,
      getContext: opts == null ? void 0 : opts.getContext,
      future: opts == null ? void 0 : opts.future,
      history: createBrowserHistory({ window: opts == null ? void 0 : opts.window }),
      hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),
      routes,
      mapRouteProperties,
      hydrationRouteProperties,
      dataStrategy: opts == null ? void 0 : opts.dataStrategy,
      patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation,
      window: opts == null ? void 0 : opts.window,
      unstable_instrumentations: opts == null ? void 0 : opts.unstable_instrumentations
    }).initialize();
  }
  function parseHydrationData() {
    let state = window == null ? void 0 : window.__staticRouterHydrationData;
    return state && state.errors && (state = {
      ...state,
      errors: deserializeErrors(state.errors)
    }), state;
  }
  function deserializeErrors(errors) {
    if (!errors) return null;
    let entries = Object.entries(errors), serialized = {};
    for (let [key, val] of entries)
      if (val && val.__type === "RouteErrorResponse")
        serialized[key] = new ErrorResponseImpl(
          val.status,
          val.statusText,
          val.data,
          val.internal === !0
        );
      else if (val && val.__type === "Error") {
        if (val.__subType) {
          let ErrorConstructor = window[val.__subType];
          if (typeof ErrorConstructor == "function")
            try {
              let error = new ErrorConstructor(val.message);
              error.stack = "", serialized[key] = error;
            } catch (e) {
            }
        }
        if (serialized[key] == null) {
          let error = new Error(val.message);
          error.stack = "", serialized[key] = error;
        }
      } else
        serialized[key] = val;
    return serialized;
  }
  function HistoryRouter({
    basename,
    children,
    history,
    unstable_useTransitions
  }) {
    let [state, setStateImpl] = React10.useState({
      action: history.action,
      location: history.location
    }), setState = React10.useCallback(
      (newState) => {
        unstable_useTransitions === !1 ? setStateImpl(newState) : React10.startTransition(() => setStateImpl(newState));
      },
      [unstable_useTransitions]
    );
    return React10.useLayoutEffect(() => history.listen(setState), [history, setState]), /* @__PURE__ */ React10.createElement(
      Router,
      {
        basename,
        children,
        location: state.location,
        navigationType: state.action,
        navigator: history,
        unstable_useTransitions
      }
    );
  }
  HistoryRouter.displayName = "unstable_HistoryRouter";
  var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Link = React10.forwardRef(
    function({
      onClick,
      discover = "render",
      prefetch = "none",
      relative,
      reloadDocument,
      replace: replace2,
      state,
      target,
      to,
      preventScrollReset,
      viewTransition,
      unstable_defaultShouldRevalidate,
      ...rest
    }, forwardedRef) {
      let { basename, unstable_useTransitions } = React10.useContext(NavigationContext), isAbsolute = typeof to == "string" && ABSOLUTE_URL_REGEX2.test(to), parsed = parseToInfo(to, basename);
      to = parsed.to;
      let href = useHref(to, { relative }), [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
        prefetch,
        rest
      ), internalOnClick = useLinkClickHandler(to, {
        replace: replace2,
        state,
        target,
        preventScrollReset,
        relative,
        viewTransition,
        unstable_defaultShouldRevalidate,
        unstable_useTransitions
      });
      function handleClick(event) {
        onClick && onClick(event), event.defaultPrevented || internalOnClick(event);
      }
      let link = (
        // eslint-disable-next-line jsx-a11y/anchor-has-content
        /* @__PURE__ */ React10.createElement(
          "a",
          {
            ...rest,
            ...prefetchHandlers,
            href: parsed.absoluteURL || href,
            onClick: parsed.isExternal || reloadDocument ? onClick : handleClick,
            ref: mergeRefs(forwardedRef, prefetchRef),
            target,
            "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
          }
        )
      );
      return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href })) : link;
    }
  );
  Link.displayName = "Link";
  var NavLink = React10.forwardRef(
    function({
      "aria-current": ariaCurrentProp = "page",
      caseSensitive = !1,
      className: classNameProp = "",
      end = !1,
      style: styleProp,
      to,
      viewTransition,
      children,
      ...rest
    }, ref) {
      let path = useResolvedPath(to, { relative: rest.relative }), location2 = useLocation(), routerState = React10.useContext(DataRouterStateContext), { navigator: navigator2, basename } = React10.useContext(NavigationContext), isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
      // eslint-disable-next-line react-hooks/rules-of-hooks
      useViewTransitionState(path) && viewTransition === !0, toPathname = navigator2.encodeLocation ? navigator2.encodeLocation(path).pathname : path.pathname, locationPathname = location2.pathname, nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
      caseSensitive || (locationPathname = locationPathname.toLowerCase(), nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null, toPathname = toPathname.toLowerCase()), nextLocationPathname && basename && (nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname);
      let endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length, isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/", isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/"), renderProps = {
        isActive,
        isPending,
        isTransitioning
      }, ariaCurrent = isActive ? ariaCurrentProp : void 0, className;
      typeof classNameProp == "function" ? className = classNameProp(renderProps) : className = [
        classNameProp,
        isActive ? "active" : null,
        isPending ? "pending" : null,
        isTransitioning ? "transitioning" : null
      ].filter(Boolean).join(" ");
      let style = typeof styleProp == "function" ? styleProp(renderProps) : styleProp;
      return /* @__PURE__ */ React10.createElement(
        Link,
        {
          ...rest,
          "aria-current": ariaCurrent,
          className,
          ref,
          style,
          to,
          viewTransition
        },
        typeof children == "function" ? children(renderProps) : children
      );
    }
  );
  NavLink.displayName = "NavLink";
  var Form = React10.forwardRef(
    ({
      discover = "render",
      fetcherKey,
      navigate,
      reloadDocument,
      replace: replace2,
      state,
      method = defaultMethod,
      action,
      onSubmit,
      relative,
      preventScrollReset,
      viewTransition,
      unstable_defaultShouldRevalidate,
      ...props
    }, forwardedRef) => {
      let { unstable_useTransitions } = React10.useContext(NavigationContext), submit = useSubmit(), formAction = useFormAction(action, { relative }), formMethod = method.toLowerCase() === "get" ? "get" : "post", isAbsolute = typeof action == "string" && ABSOLUTE_URL_REGEX2.test(action);
      return /* @__PURE__ */ React10.createElement(
        "form",
        {
          ref: forwardedRef,
          method: formMethod,
          action: formAction,
          onSubmit: reloadDocument ? onSubmit : (event) => {
            if (onSubmit && onSubmit(event), event.defaultPrevented) return;
            event.preventDefault();
            let submitter = event.nativeEvent.submitter, submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method, doSubmit = () => submit(submitter || event.currentTarget, {
              fetcherKey,
              method: submitMethod,
              navigate,
              replace: replace2,
              state,
              relative,
              preventScrollReset,
              viewTransition,
              unstable_defaultShouldRevalidate
            });
            unstable_useTransitions && navigate !== !1 ? React10.startTransition(() => doSubmit()) : doSubmit();
          },
          ...props,
          "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
        }
      );
    }
  );
  Form.displayName = "Form";
  function ScrollRestoration({
    getKey,
    storageKey,
    ...props
  }) {
    let remixContext = React10.useContext(FrameworkContext), { basename } = React10.useContext(NavigationContext), location2 = useLocation(), matches = useMatches();
    useScrollRestoration({ getKey, storageKey });
    let ssrKey = React10.useMemo(
      () => {
        if (!remixContext || !getKey) return null;
        let userKey = getScrollRestorationKey(
          location2,
          matches,
          basename,
          getKey
        );
        return userKey !== location2.key ? userKey : null;
      },
      // Nah, we only need this the first time for the SSR render
      // eslint-disable-next-line react-hooks/exhaustive-deps
      []
    );
    if (!remixContext || remixContext.isSpaMode)
      return null;
    let restoreScroll = ((storageKey2, restoreKey) => {
      if (!window.history.state || !window.history.state.key) {
        let key = Math.random().toString(32).slice(2);
        window.history.replaceState({ key }, "");
      }
      try {
        let storedY = JSON.parse(sessionStorage.getItem(storageKey2) || "{}")[restoreKey || window.history.state.key];
        typeof storedY == "number" && window.scrollTo(0, storedY);
      } catch (error) {
        console.error(error), sessionStorage.removeItem(storageKey2);
      }
    }).toString();
    return /* @__PURE__ */ React10.createElement(
      "script",
      {
        ...props,
        suppressHydrationWarning: !0,
        dangerouslySetInnerHTML: {
          __html: `(${restoreScroll})(${escapeHtml(
            JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY)
          )}, ${escapeHtml(JSON.stringify(ssrKey))})`
        }
      }
    );
  }
  ScrollRestoration.displayName = "ScrollRestoration";
  function getDataRouterConsoleError2(hookName) {
    return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;
  }
  function useDataRouterContext3(hookName) {
    let ctx = React10.useContext(DataRouterContext);
    return invariant(ctx, getDataRouterConsoleError2(hookName)), ctx;
  }
  function useDataRouterState2(hookName) {
    let state = React10.useContext(DataRouterStateContext);
    return invariant(state, getDataRouterConsoleError2(hookName)), state;
  }
  function useLinkClickHandler(to, {
    target,
    replace: replaceProp,
    state,
    preventScrollReset,
    relative,
    viewTransition,
    unstable_defaultShouldRevalidate,
    unstable_useTransitions
  } = {}) {
    let navigate = useNavigate(), location2 = useLocation(), path = useResolvedPath(to, { relative });
    return React10.useCallback(
      (event) => {
        if (shouldProcessLinkClick(event, target)) {
          event.preventDefault();
          let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location2) === createPath(path), doNavigate = () => navigate(to, {
            replace: replace2,
            state,
            preventScrollReset,
            relative,
            viewTransition,
            unstable_defaultShouldRevalidate
          });
          unstable_useTransitions ? React10.startTransition(() => doNavigate()) : doNavigate();
        }
      },
      [
        location2,
        navigate,
        path,
        replaceProp,
        state,
        target,
        to,
        preventScrollReset,
        relative,
        viewTransition,
        unstable_defaultShouldRevalidate,
        unstable_useTransitions
      ]
    );
  }
  var fetcherId = 0, getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
  function useSubmit() {
    let { router } = useDataRouterContext3(
      "useSubmit"
      /* UseSubmit */
    ), { basename } = React10.useContext(NavigationContext), currentRouteId = useRouteId(), routerFetch = router.fetch, routerNavigate = router.navigate;
    return React10.useCallback(
      async (target, options = {}) => {
        let { action, method, encType, formData, body } = getFormSubmissionInfo(
          target,
          basename
        );
        if (options.navigate === !1) {
          let key = options.fetcherKey || getUniqueFetcherId();
          await routerFetch(key, currentRouteId, options.action || action, {
            unstable_defaultShouldRevalidate: options.unstable_defaultShouldRevalidate,
            preventScrollReset: options.preventScrollReset,
            formData,
            body,
            formMethod: options.method || method,
            formEncType: options.encType || encType,
            flushSync: options.flushSync
          });
        } else
          await routerNavigate(options.action || action, {
            unstable_defaultShouldRevalidate: options.unstable_defaultShouldRevalidate,
            preventScrollReset: options.preventScrollReset,
            formData,
            body,
            formMethod: options.method || method,
            formEncType: options.encType || encType,
            replace: options.replace,
            state: options.state,
            fromRouteId: currentRouteId,
            flushSync: options.flushSync,
            viewTransition: options.viewTransition
          });
      },
      [routerFetch, routerNavigate, basename, currentRouteId]
    );
  }
  function useFormAction(action, { relative } = {}) {
    let { basename } = React10.useContext(NavigationContext), routeContext = React10.useContext(RouteContext);
    invariant(routeContext, "useFormAction must be used inside a RouteContext");
    let [match] = routeContext.matches.slice(-1), path = { ...useResolvedPath(action || ".", { relative }) }, location2 = useLocation();
    if (action == null) {
      path.search = location2.search;
      let params = new URLSearchParams(path.search), indexValues = params.getAll("index");
      if (indexValues.some((v) => v === "")) {
        params.delete("index"), indexValues.filter((v) => v).forEach((v) => params.append("index", v));
        let qs = params.toString();
        path.search = qs ? `?${qs}` : "";
      }
    }
    return (!action || action === ".") && match.route.index && (path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"), basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), createPath(path);
  }
  var SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions", savedScrollPositions = {};
  function getScrollRestorationKey(location2, matches, basename, getKey) {
    let key = null;
    return getKey && (basename !== "/" ? key = getKey(
      {
        ...location2,
        pathname: stripBasename(location2.pathname, basename) || location2.pathname
      },
      matches
    ) : key = getKey(location2, matches)), key == null && (key = location2.key), key;
  }
  function useScrollRestoration({
    getKey,
    storageKey
  } = {}) {
    let { router } = useDataRouterContext3(
      "useScrollRestoration"
      /* UseScrollRestoration */
    ), { restoreScrollPosition, preventScrollReset } = useDataRouterState2(
      "useScrollRestoration"
      /* UseScrollRestoration */
    ), { basename } = React10.useContext(NavigationContext), location2 = useLocation(), matches = useMatches(), navigation2 = useNavigation();
    React10.useEffect(() => (window.history.scrollRestoration = "manual", () => {
      window.history.scrollRestoration = "auto";
    }), []), usePageHide(
      React10.useCallback(() => {
        if (navigation2.state === "idle") {
          let key = getScrollRestorationKey(location2, matches, basename, getKey);
          savedScrollPositions[key] = window.scrollY;
        }
        try {
          sessionStorage.setItem(
            storageKey || SCROLL_RESTORATION_STORAGE_KEY,
            JSON.stringify(savedScrollPositions)
          );
        } catch (error) {
          warning(
            !1,
            `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
          );
        }
        window.history.scrollRestoration = "auto";
      }, [navigation2.state, getKey, basename, location2, matches, storageKey])
    ), typeof document != "undefined" && (React10.useLayoutEffect(() => {
      try {
        let sessionPositions = sessionStorage.getItem(
          storageKey || SCROLL_RESTORATION_STORAGE_KEY
        );
        sessionPositions && (savedScrollPositions = JSON.parse(sessionPositions));
      } catch (e) {
      }
    }, [storageKey]), React10.useLayoutEffect(() => {
      let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(
        savedScrollPositions,
        () => window.scrollY,
        getKey ? (location22, matches2) => getScrollRestorationKey(location22, matches2, basename, getKey) : void 0
      );
      return () => disableScrollRestoration && disableScrollRestoration();
    }, [router, basename, getKey]), React10.useLayoutEffect(() => {
      if (restoreScrollPosition !== !1) {
        if (typeof restoreScrollPosition == "number") {
          window.scrollTo(0, restoreScrollPosition);
          return;
        }
        try {
          if (location2.hash) {
            let el = document.getElementById(
              decodeURIComponent(location2.hash.slice(1))
            );
            if (el) {
              el.scrollIntoView();
              return;
            }
          }
        } catch (e) {
          warning(
            !1,
            `"${location2.hash.slice(
              1
            )}" is not a decodable element ID. The view will not scroll to it.`
          );
        }
        preventScrollReset !== !0 && window.scrollTo(0, 0);
      }
    }, [location2, restoreScrollPosition, preventScrollReset]));
  }
  function usePageHide(callback, options) {
    let { capture } = options || {};
    React10.useEffect(() => {
      let opts = capture != null ? { capture } : void 0;
      return window.addEventListener("pagehide", callback, opts), () => {
        window.removeEventListener("pagehide", callback, opts);
      };
    }, [callback, capture]);
  }
  function usePrompt({
    when,
    message
  }) {
    let blocker = useBlocker(when);
    React10.useEffect(() => {
      blocker.state === "blocked" && (window.confirm(message) ? setTimeout(blocker.proceed, 0) : blocker.reset());
    }, [blocker, message]), React10.useEffect(() => {
      blocker.state === "blocked" && !when && blocker.reset();
    }, [blocker, when]);
  }
  function useViewTransitionState(to, { relative } = {}) {
    let vtContext = React10.useContext(ViewTransitionContext);
    invariant(
      vtContext != null,
      "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?"
    );
    let { basename } = useDataRouterContext3(
      "useViewTransitionState"
      /* useViewTransitionState */
    ), path = useResolvedPath(to, { relative });
    if (!vtContext.isTransitioning)
      return !1;
    let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname, nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
    return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
  }

  // node_modules/react-router/dist/development/dom-export.mjs
  var React12 = __toESM(require_react(), 1), ReactDOM = __toESM(require_react_dom(), 1), React22 = __toESM(require_react(), 1), React32 = __toESM(require_react(), 1), ReactDOM2 = __toESM(require_react_dom(), 1);
  function RouterProvider2(props) {
    return /* @__PURE__ */ React12.createElement(RouterProvider, { flushSync: ReactDOM.flushSync, ...props });
  }
  var renderedRoutesContext = createContext4();

  // node_modules/react-router/dist/development/index.mjs
  init_define_SVG_ICONS_FONTAWESOME();

  // js/i18n.tsx
  init_define_SVG_ICONS_FONTAWESOME();

  // ../lektor/translations/ca.json
  var ca_default = {
    RETURN_TO_WEBSITE: "Tornar al Lloc Web",
    UNLOAD_ACTIVE_TAB: "Hi ha informaci\xF3 sense desar, est\xE0 segur que vol abandonar aquesta p\xE0gina?",
    EDIT_METADATA: "Editar Metadades",
    EDIT: "Editar",
    DELETE: "Esborrar",
    PREVIEW: "Previsualitzar",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Prim\xE0ria",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "Afegir P\xE0gina",
    ADD_ATTACHMENT: "Afegir Adjunt",
    ATTACHMENT_ACTIONS: "Accions sobre els Adjunts",
    PAGE_ACTIONS: "Accions sobre la P\xE0gina",
    NO_CHILD_PAGES: "Sense Subp\xE0gines",
    CHILD_PAGES: "Subp\xE0gines",
    NO_ATTACHMENTS: "Sense Adjunts",
    ATTACHMENTS: "Adjunts",
    ADD_ATTACHMENT_TO: "Afegir Adjunt a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Pot pujar un nou adjunt aqu\xED.",
    UPLOAD: "Pujar",
    PROGRESS: "Aven\xE7",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No s'ha proporcionat un ID.",
    ERROR_PAGE_ID_DUPLICATE: "Ja existeix una p\xE0gina amb aquest ID (%s).",
    ERROR_INVALID_ID: "ID inv\xE0lid",
    ERROR_INVALID_DATE: "Data inv\xE0lida",
    ERROR_INVALID_NUMBER: "N\xFAmero no v\xE0lid",
    ERROR_INVALID_URL: "URL no v\xE0lida",
    ERROR: "Error",
    ERROR_OCURRED: "Ha ocorregut un Error",
    ERROR_REQUEST_FAILED: "No s'ha pogut enviar la tasca al servidor.  Potser el servidor est\xE0 apagat o \xE9s inaccessible",
    ERROR_SERVER_UNAVAILABLE: "Servidor No Disponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "El servidor no respon.  Ha estat apagat o hi ha hagut un error cr\xEDtic que ha fet que estigui inoperatiu i hagi de ser reiniciat.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Afegir Subp\xE0gina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Pot afegir una nova subp\xE0gina aqu\xED. Tingui en compte que el model o el ID no podr\xE0 ser canviat f\xE0cilment m\xE9s endavant.",
    CREATE_CHILD_PAGE: "Afegir p\xE0gina filla",
    DELETE_ATTACHMENT_PROMPT: "Realment vol esborrar aquest adjunt?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Realment vol esborrar les metadades d'aquest adjunt alternatiu?",
    DELETE_PAGE_PROMPT: "Vol realment esborrar aquesta p\xE0gina?",
    DELETE_PAGE_ALT_PROMPT: "Realment desitja esborrar aquesta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Tamb\xE9 s'esborraran les subp\xE0gines que pengin d'aquesta p\xE0gina.",
    DELETE_RECORD: "Esborrar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Esborrar tamb\xE9 totes les alternatives i fitxers adjunts.",
    DELETE_ALL_ATTACHMENT_ALTS: "Esborrar totes les alternatives de l'annex i el fitxer adjunt.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Esborrar nom\xE9s el registre principal.  Els adjunts, les alternatives i les subp\xE0gines no seran esborrades.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Esborrar nom\xE9s les metadades del registre principal.",
    DELETE_PRIMARY_ALT_INFO: "Com aquest registre \xE9s una alternativa principal, pot ser esborrat per separat o conjuntament a la resta de continguts.",
    CHILD_PAGES_TO_BE_DELETED: "Subp\xE0gines que seran esborrares:",
    ALTS_TO_BE_DELETED: "Alternatives que seran eliminades:",
    ATTACHMENTS_TO_BE_DELETED: "Adjunts que seran eliminats:",
    YES_DELETE: "S\xED, esborrar",
    NO_CANCEL: "No, cancel\xB7lar",
    SYSTEM_FIELDS: "Camps del Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar les Metadades de l'Adjunt \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Desar els canvis",
    BROWSE_FS: "Veure al Sistema de fitxers",
    BROWSE_FS_MAC: "Mostrar al Finder",
    BROWSE_FS_WINDOWS: "Mostrar a l'Explorador",
    ERROR_CANNOT_BROWSE_FS: "Error: el fitxer no existeix encara.",
    REMOVE_FLOWBLOCK_PROMPT: "\xBFRealment vol esborrar aquest block?",
    ADD_FLOWBLOCK: "Afegir Block",
    INVALID_INPUT: "Entrada inv\xE0lida",
    UP: "Amunt",
    DOWN: "Abaix",
    REMOVE: "Esborrar",
    ID: "ID",
    CLOSE: "Tancar",
    CANCEL: "Cancel\xB7lar",
    BACK_TO_OVERVIEW: "Tornar a la Revisi\xF3",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Des d'aqu\xED pot publicar la versi\xF3 actual del lloc web.",
    PUBLISH_SERVER: "Servidor Destinaci\xF3",
    CURRENTLY_PUBLISHING: "Publicannt ...",
    STATE: "Estat",
    PUBLISH_DONE: "Publicat",
    PUBLISH_STATE_BUILDING: "Els canvis s'estan generant ...",
    PUBLISH_STATE_PUBLISH: "Els canvis s'estan publicant ...",
    PUBLISH_STATE_DONE: "Publicaci\xF3 finalitzada.",
    FIND_FILES: "Buscar Fitxers",
    FIND_FILES_PLACEHOLDER: "Introdueixi el nom de la p\xE0gina ...",
    ATTACHMENT_TYPE: "Tipus d'adjunt",
    URL_SLUG: "URL personalitzada",
    TEMPLATE: "Plantilla",
    HIDE_PAGE: "Amagar p\xE0gina",
    HIDE_PAGE_EXPLANATION: "Hauria d'estar oculta aquesta p\xE0gina?",
    PAGE_IS_DISCOVERABLE: "La P\xE0gina \xE9s detectable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si s'habilita, la p\xE0gina pot ser detectada, en cas contrari la URL del contingut ha de ser coneguda.",
    REFRESH_BUILD: "Regenerar Lloc Web",
    REFRESH_BUILD_NOTE: "Aix\xF2 esborra tots els resultats generats i llen\xE7a una nova generaci\xF3 des de zero.  Aix\xF2 \xE9s \xFAtil en algunes situacions on els errors de sincronitzaci\xF3 o a les plantilles han causat un resultat corrupte.",
    CURRENTLY_REFRESHING_BUILD: "Regenerant ...",
    REFRESHING_BUILD_DONE: "Actualitzaci\xF3 finalitzada!",
    FAILED_TO_LAUNCH_LEKTOR: "Ha fallat l'execuci\xF3 de Lektor.",
    PROJECT: "Projecte",
    CLOSE_PROJECT: "Tancar Projecte",
    OPEN_PROJECT: "Obrir Projecte",
    BROWSE_WEBSITE: "Anar al Lloc Web",
    VIEW_ADMIN_PANEL: "Anar al Panell d'Administraci\xF3",
    QUIT: "Sortir",
    FAILED_TO_LOAD_PROJECT: "Ha fallat la c\xE0rrega del projecte :(",
    LOADING_PROJECT: "Carregant projecte ...",
    INITIALIZING_LEKTOR: "Inicialitzant Lektor ...",
    QUIT_LEKTOR: "Sortir de Lektor",
    FILE: "Arxiu",
    UNDO: "Desfer",
    REDO: "Tornar a fer",
    CUT: "Tallar",
    COPY: "Copiar",
    PASTE: "Enganxar",
    SELECT_ALL: "Seleccionar-ho Tot",
    HELP: "Ajuda",
    VISIT_WEBSITE: "Visitar Web",
    INSTALL_SHELL_COMMAND: "Instalar Eina",
    INSTALL_SHELL_COMMAND_QUESTION: "Vol instal\xB7lar la eina 'lektor'? Es requereixen permisos d'administraci\xF3.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Ha fallat la instal\xB7laci\xF3 de l'eina.",
    INSTALL_SHELL_COMMAND_SUCCESS: "L'eina ha estat instal\xB7lada amb \xE8xit.",
    OPERATION_SUCCESS: "Amb \xE8xit",
    YES: "S\xED",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Error al intentar obrir el fitxer de contingut",
    OPEN_OTHER_PROJECT: "Obrir un altre Projecte",
    OPEN_OTHER_PROJECT_QUESTION: "Obrir aquest fitxer implica obrir un altre projecte (%s). El projecte actual ser\xE0 tancat. Vol continuar?"
  };

  // ../lektor/translations/de.json
  var de_default = {
    RETURN_TO_WEBSITE: "Zur Webseite",
    UNLOAD_ACTIVE_TAB: "Du hast ungespeicherte \xC4nderungen, willst du die Seite wirklich verlassen?",
    EDIT_METADATA: "Metadaten bearbeiten",
    EDIT: "Bearbeiten",
    DELETE: "L\xF6schen",
    PREVIEW: "Vorschau",
    ALTS: "Alternativen",
    PRIMARY_ALT: "Prim\xE4r",
    PRIMARY_OVERLAY: "\xDCberlagert",
    ADD_CHILD_PAGE: "Seite hinzuf\xFCgen",
    ADD_ATTACHMENT: "Anhang hinzuf\xFCgen",
    ATTACHMENT_ACTIONS: "Anhang-Aktionen",
    PAGE_ACTIONS: "Seiten-Aktionen",
    NO_CHILD_PAGES: "Keine Unterseiten",
    CHILD_PAGES: "Unterseiten",
    NO_ATTACHMENTS: "Keine Anh\xE4nge",
    ATTACHMENTS: "Anh\xE4nge",
    ADD_ATTACHMENT_TO: "Anhang zu \u201C%s\u201D hinzuf\xFCgen",
    ADD_ATTACHMENT_NOTE: "Hier kannst du neue Anh\xE4nge hochladen.",
    UPLOAD: "Hochladen",
    PROGRESS: "Fortschritt",
    ERROR_PREFIX: "Fehler: ",
    ERROR_NO_ID_PROVIDED: "Es wurde keine ID eingegeben.",
    ERROR_PAGE_ID_DUPLICATE: "Eine Seite mit dieser ID (%s) existiert bereits.",
    ERROR_INVALID_ID: "Ung\xFCltige ID",
    ERROR_INVALID_DATE: "Ung\xFCltiges Datum",
    ERROR_INVALID_NUMBER: "Ung\xFCltige Zahl",
    ERROR_INVALID_URL: "Ung\xFCltige URL",
    ERROR: "Fehler",
    ERROR_OCURRED: "Ein Fehler ist aufgetreten",
    ERROR_REQUEST_FAILED: "Ein Befehl konnte nicht an den Server gesendet werden. Eventuell reagiert der Server nicht oder wurde gestoppt.",
    ERROR_SERVER_UNAVAILABLE: "Server unerreichbar",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Der Server reagiert nicht. Entweder er wurde gestoppt oder ein kritischer Fehler ist aufgetreten und er muss neu gestartet werden.",
    MODEL: "Modell",
    ADD_CHILD_PAGE_TO: "Unterseite zu \u201C%s\u201D hinzuf\xFCgen",
    ADD_CHILD_PAGE_NOTE: "Du kannst hier eine neue Unterseite hinzuf\xFCgen.  Beachte, dass die ID und das Modell sp\xE4ter nicht mehr ver\xE4ndert werden kann.",
    CREATE_CHILD_PAGE: "Unterseite hinzuf\xFCgen",
    DELETE_ATTACHMENT_PROMPT: "Willst du den Anhang wirklich l\xF6schen?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Willst du die Metadaten dieser Anhang-Alternative wirklich l\xF6schen?",
    DELETE_PAGE_PROMPT: "Willst du diese Seite wirklich l\xF6schen?",
    DELETE_PAGE_ALT_PROMPT: "Willst du diese Alternative wirklich l\xF6schen?",
    DELETE_PAGE_CHILDREN_WARNING: "Dies wird auch die Unterseiten der Seite l\xF6schen.",
    DELETE_RECORD: "\u201C%s\u201D L\xF6schen",
    DELETE_ALL_PAGE_ALTS: "Alle Alternativen und angeh\xE4ngten Dateien mitl\xF6schen.",
    DELETE_ALL_ATTACHMENT_ALTS: "Alle Alternativen und die angeh\xE4ngte Datei l\xF6schen.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Nur den Prim\xE4reintrag l\xF6schen. Anh\xE4nge, andere Alternativen und Unterseiten werden nicht gel\xF6scht.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Nur die Metadaten des Prim\xE4reintrages l\xF6schen.",
    DELETE_PRIMARY_ALT_INFO: "Da dieser Eintrag eine Prim\xE4ralternative ist, kann diese auch separat gel\xF6scht werden oder zusammen mit allen anderen Inhalten.",
    CHILD_PAGES_TO_BE_DELETED: "Unterseiten, die gel\xF6scht werden:",
    ALTS_TO_BE_DELETED: "Alternativen, die gel\xF6scht werden:",
    ATTACHMENTS_TO_BE_DELETED: "Anh\xE4nge, die gel\xF6scht werden:",
    YES_DELETE: "Ja, l\xF6schen",
    NO_CANCEL: "Nein, abbrechen",
    SYSTEM_FIELDS: "Systemfelder",
    EDIT_ATTACHMENT_METADATA_OF: "Bearbeite Metadaten von Anhang \u201C%s\u201D",
    EDIT_PAGE_NAME: "Bearbeite \u201C%s\u201D",
    SAVE_CHANGES: "\xC4nderungen speichern",
    BROWSE_FS: "Im Dateisystem \xF6ffnen",
    BROWSE_FS_MAC: "In Finder anzeigen",
    BROWSE_FS_WINDOWS: "Im Explorer \xF6ffnen",
    ERROR_CANNOT_BROWSE_FS: "Fehler: Datei existiert noch nicht",
    REMOVE_FLOWBLOCK_PROMPT: "Willst du diesen Block wirklich entfernen?",
    ADD_FLOWBLOCK: "Block hinzuf\xFCgen",
    INVALID_INPUT: "Ung\xFCltige Eingabe",
    UP: "Nach oben",
    DOWN: "Nach unten",
    REMOVE: "Entfernen",
    ID: "ID",
    CLOSE: "Schlie\xDFen",
    CANCEL: "Abbrechen",
    BACK_TO_OVERVIEW: "\xDCbersicht",
    PUBLISH: "Ver\xF6ffentlichen",
    PUBLISH_NOTE: "Von hier aus kann der aktuelle Stand der Webseite publiziert werden.",
    PUBLISH_SERVER: "Ziel-Server",
    CURRENTLY_PUBLISHING: "Ver\xF6ffentlichung \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Ver\xF6ffentlicht",
    PUBLISH_STATE_BUILDING: "\xC4nderungen werden gebaut ...",
    PUBLISH_STATE_PUBLISH: "\xC4nderungen werden publiziert ...",
    PUBLISH_STATE_DONE: "Ver\xF6ffentlichung fertiggestellt.",
    FIND_FILES: "Seiten Finden",
    FIND_FILES_PLACEHOLDER: "Seitenname eingeben ...",
    ATTACHMENT_TYPE: "Attachment type",
    URL_SLUG: "URL-Slug",
    TEMPLATE: "Vorlage",
    HIDE_PAGE: "Seite verstecken",
    HIDE_PAGE_EXPLANATION: "Soll diese Seite versteckt werden?",
    PAGE_IS_DISCOVERABLE: "Seite ist erkundbar",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Wenn dies aktiviert ist, wird Seite von Vorlagen verlinkt. Ansonsten muss die URL bekannt sein.",
    REFRESH_BUILD: "\xC4nderungen regenerieren",
    REFRESH_BUILD_NOTE: "In machen Situationen kann es n\xFCtzlich sein, alle \xC4nderungen zu regenerieren.  Zum Beispiel k\xF6nnen Synchronisationsfehler und kaputte Vorlagen manchmal dazu f\xFChren, dass Seiten fehlerhaft gebaut wurden.  Dies bringt Lektor dazu, alle Seiten neu zu bauen.",
    CURRENTLY_REFRESHING_BUILD: "\xC4nderungen werden regeneriert ...",
    REFRESHING_BUILD_DONE: "\xC4nderungen wurden regeneriert!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor konnte nicht gestartet werden.",
    PROJECT: "Projekt",
    CLOSE_PROJECT: "Projekt schlie\xDFen",
    OPEN_PROJECT: "Projekt \xF6ffnen",
    BROWSE_WEBSITE: "Webseite anzeigen",
    VIEW_ADMIN_PANEL: "Admin-Panel \xF6ffnen",
    QUIT: "Beenden",
    FAILED_TO_LOAD_PROJECT: "Projekt konnte nicht geladen werden :(",
    LOADING_PROJECT: "Projekt wird ge\xF6ffnet ...",
    INITIALIZING_LEKTOR: "Initialisiere Lektor ...",
    QUIT_LEKTOR: "Lektor beenden",
    FILE: "Datei",
    UNDO: "R\xFCckg\xE4ngig",
    REDO: "Wiederholen",
    CUT: "Ausschneiden",
    COPY: "Kopieren",
    PASTE: "Einf\xFCgen",
    SELECT_ALL: "Alles Markieren",
    HELP: "Hilfe",
    VISIT_WEBSITE: "Webseite \xF6ffnen",
    INSTALL_SHELL_COMMAND: "Shell-Befehl installieren",
    INSTALL_SHELL_COMMAND_QUESTION: "M\xF6chtest du den 'lektor' Shell-Befehl installieren? Dies erfordert Admin-Rechte.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Konnte Shell-Befehl nicht installieren.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell-Befehl wurde erfolgreich installiert.",
    OPERATION_SUCCESS: "Operation erfolgreich",
    YES: "Ja",
    NO: "Nein",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Konnte Datei nicht \xF6ffnen",
    OPEN_OTHER_PROJECT: "Anderes Projekt \xF6ffnen",
    OPEN_OTHER_PROJECT_QUESTION: "Um diese Datei zu \xF6ffnen, muss ein anderes Projekt (%s) ge\xF6ffnet werden. Das aktuelle Projekt wird dadurch geschlossen. Fortfahren?"
  };

  // ../lektor/translations/en.json
  var en_default = {
    RETURN_TO_WEBSITE: "Return to Website",
    UNLOAD_ACTIVE_TAB: "You have unsaved information, are you sure you want to leave this page?",
    EDIT_METADATA: "Edit Metadata",
    EDIT: "Edit",
    DELETE: "Delete",
    PREVIEW: "Preview",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Primary",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "Add Page",
    ADD_ATTACHMENT: "Add Attachment",
    ATTACHMENT_ACTIONS: "Attachment Actions",
    PAGE_ACTIONS: "Page Actions",
    NO_CHILD_PAGES: "No Subpages",
    CHILD_PAGES: "Subpages",
    NO_ATTACHMENTS: "No attachments",
    ATTACHMENTS: "Attachments",
    ADD_ATTACHMENT_TO: "Add Attachment to \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "You can upload a new attachment here.",
    UPLOAD: "Upload",
    PROGRESS: "Progress",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No ID provided.",
    ERROR_PAGE_ID_DUPLICATE: "A page with this ID (%s) exists already.",
    ERROR_INVALID_ID: "Invalid ID",
    ERROR_INVALID_DATE: "Invalid date",
    ERROR_INVALID_NUMBER: "Not a valid number",
    ERROR_INVALID_URL: "Not a valid URL",
    ERROR: "Error",
    ERROR_OCURRED: "An Error ocurred",
    ERROR_REQUEST_FAILED: "Could not send command to server.  Maybe the server was stopped or is unresponsive?",
    ERROR_SERVER_UNAVAILABLE: "Server Unavailable",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "The server is not responding.  Either it was stopped or a critical error made it not operable and it needs to be restarted.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Add Subpage to \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "You can add a new subpage to the page here.  Note that the model or ID cannot be easily changed afterwards.",
    CREATE_CHILD_PAGE: "Add Child Page",
    DELETE_ATTACHMENT_PROMPT: "Do you really want to delete this attachment?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Do you really want to delete the metadata of this attachment alternative?",
    DELETE_PAGE_PROMPT: "Do you really want to delete this page?",
    DELETE_PAGE_ALT_PROMPT: "Do you really want to delete this alternative?",
    DELETE_PAGE_CHILDREN_WARNING: "This will also delete the child subpages of this page.",
    DELETE_RECORD: "Delete \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Also delete all alternatives and attached files.",
    DELETE_ALL_ATTACHMENT_ALTS: "Delete all alternatives and the attached file.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Delete only the primary record.  Attachments, alternatives and subpages will not be deleted.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Only delete the Metadata of the primary record.",
    DELETE_PRIMARY_ALT_INFO: "Because this record is a primary alternative it can be deleted separately or together with all other contents.",
    CHILD_PAGES_TO_BE_DELETED: "Subpages that will be deleted:",
    ALTS_TO_BE_DELETED: "Alternatives that will be deleted:",
    ATTACHMENTS_TO_BE_DELETED: "Attachments that will be deleted:",
    YES_DELETE: "Yes, delete",
    NO_CANCEL: "No, cancel",
    SYSTEM_FIELDS: "System Fields",
    EDIT_ATTACHMENT_METADATA_OF: "Edit Metadata of Attachment \u201C%s\u201D",
    EDIT_PAGE_NAME: "Edit \u201C%s\u201D",
    SAVE_CHANGES: "Save Changes",
    BROWSE_FS: "Browse in Filesystem",
    BROWSE_FS_MAC: "Reveal in Finder",
    BROWSE_FS_WINDOWS: "Open in Explorer",
    ERROR_CANNOT_BROWSE_FS: "Error: File does not exist yet.",
    REMOVE_FLOWBLOCK_PROMPT: "Do you really want to remove this block?",
    ADD_FLOWBLOCK: "Add Block",
    INVALID_INPUT: "Invalid Input",
    UP: "Up",
    DOWN: "Down",
    REMOVE: "Remove",
    ID: "ID",
    CLOSE: "Close",
    CANCEL: "Cancel",
    BACK_TO_OVERVIEW: "Back to Overview",
    PUBLISH: "Publish",
    PUBLISH_NOTE: "From here you can publish the current version of the website.",
    PUBLISH_SERVER: "Target Server",
    CURRENTLY_PUBLISHING: "Publishing \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Published",
    PUBLISH_STATE_BUILDING: "Changes are being built ...",
    PUBLISH_STATE_PUBLISH: "Changes are being published ...",
    PUBLISH_STATE_DONE: "Publishing done.",
    FIND_FILES: "Find Files",
    FIND_FILES_PLACEHOLDER: "Enter page name ...",
    ATTACHMENT_TYPE: "Attachment type",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Hide page",
    HIDE_PAGE_EXPLANATION: "Should this page be hidden?",
    PAGE_IS_DISCOVERABLE: "Page is discoverable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "If this is enabled the page can be discovered, otherwise the URL has to be known.",
    REFRESH_BUILD: "Refresh Build",
    REFRESH_BUILD_NOTE: "This deletes all cached build results which triggers a rebuilt from scratch.  This is useful in certain situations where sync errors or mistakes in templates caused corrupted output.",
    CURRENTLY_REFRESHING_BUILD: "Currently refreshing build ...",
    REFRESHING_BUILD_DONE: "Done refreshing build!",
    FAILED_TO_LAUNCH_LEKTOR: "Failed to launch Lektor.",
    PROJECT: "Project",
    CLOSE_PROJECT: "Close Project",
    OPEN_PROJECT: "Open Project",
    BROWSE_WEBSITE: "Browse Website",
    VIEW_ADMIN_PANEL: "View Admin Panel",
    QUIT: "Quit",
    FAILED_TO_LOAD_PROJECT: "Failed to load the project :(",
    LOADING_PROJECT: "Loading project ...",
    INITIALIZING_LEKTOR: "Initializing Lektor ...",
    QUIT_LEKTOR: "Quit Lektor",
    FILE: "File",
    UNDO: "Undo",
    REDO: "Redo",
    CUT: "Cut",
    COPY: "Copy",
    PASTE: "Paste",
    SELECT_ALL: "Select All",
    HELP: "Help",
    VISIT_WEBSITE: "Visit Website",
    INSTALL_SHELL_COMMAND: "Install Shell Command",
    INSTALL_SHELL_COMMAND_QUESTION: "Do you want to install the 'lektor' shell command? This requires admin rights.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Failed to install shell commands.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell command was successfully installed.",
    OPERATION_SUCCESS: "Success",
    YES: "Yes",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Failed to open content file",
    OPEN_OTHER_PROJECT: "Open other Project",
    OPEN_OTHER_PROJECT_QUESTION: "Opening this file requires opening another project (%s). The current project will be closed. Do you want to continue?",
    COLLAPSE: "Collapse",
    EXPAND: "Expand",
    TRISTATE_CHECKBOX_TOOLTIP: "Tri-state checkbox: use <del> or <backspace> to revert to unset",
    AUTOSIZE_TEXTAREA: "Autosize textarea",
    SHRINK_TEXTAREA: "Shrink textarea",
    PREFERENCES: "Preferences",
    RESET: "Reset",
    RESET_TO_DEFAULTS: "Reset to defaults",
    EDIT_SHORTCUT: "Edit",
    SAVE_SHORTCUT: "Save",
    PREVIEW_SHORTCUT: "(Save &) Preview",
    SEARCH_SHORTCUT: "Search"
  };

  // ../lektor/translations/es.json
  var es_default = {
    RETURN_TO_WEBSITE: "Volver al Sitio Web",
    UNLOAD_ACTIVE_TAB: "Tiene informaci\xF3n sin guardar, est\xE1 seguro de que quiere abandonar esta p\xE1gina?",
    EDIT_METADATA: "Editar Metadatos",
    EDIT: "Editar",
    DELETE: "Borrar",
    PREVIEW: "Previsualizar",
    ALTS: "Alternativas",
    PRIMARY_ALT: "Primaria",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "A\xF1adir P\xE1gina",
    ADD_ATTACHMENT: "A\xF1adir Adjunto",
    ATTACHMENT_ACTIONS: "Acciones de Adjunto",
    PAGE_ACTIONS: "Acciones de P\xE1gina",
    NO_CHILD_PAGES: "Sin Subp\xE1ginas",
    CHILD_PAGES: "Subp\xE1ginas",
    NO_ATTACHMENTS: "Sin Adjuntos",
    ATTACHMENTS: "Adjuntos",
    ADD_ATTACHMENT_TO: "A\xF1adir Adjunto a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Puede cargar un nuevo adjunto aqu\xED.",
    UPLOAD: "Cargar",
    PROGRESS: "Avance",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No se proporcion\xF3 un ID.",
    ERROR_PAGE_ID_DUPLICATE: "Ya existe una p\xE1gina con este ID (%s).",
    ERROR_INVALID_ID: "ID inv\xE1lido",
    ERROR_INVALID_DATE: "Fecha inv\xE1lida",
    ERROR_INVALID_NUMBER: "N\xFAmero no v\xE1lido",
    ERROR_INVALID_URL: "URL no v\xE1lida",
    ERROR: "Error",
    ERROR_OCURRED: "Ocurri\xF3 un Error",
    ERROR_REQUEST_FAILED: "No se pudo enviar el comando al servidor.  \xBFEs posible que el servidor est\xE9 apagado o no responda?",
    ERROR_SERVER_UNAVAILABLE: "Servidor No Disponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "El servidor no responde.  Fue apagado o hubo un error cr\xEDtico que lo hace inoperativo y necesita ser reiniciado.",
    MODEL: "Modelo",
    ADD_CHILD_PAGE_TO: "A\xF1ada Subp\xE1gina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Puede a\xF1adir una nueva subp\xE1gina aqu\xED.  Tenga en cuenta que el modelo o el ID no puede ser cambiado f\xE1cilmente m\xE1s tarde.",
    CREATE_CHILD_PAGE: "A\xF1ada P\xE1gina Hijo",
    DELETE_ATTACHMENT_PROMPT: "\xBFQuiere realmente borrar este anexo?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\xBFQuiere realmente borrar los metadatos de esta alternativa de anexo?",
    DELETE_PAGE_PROMPT: "\xBFQuiere realmente borrar esta p\xE1gina?",
    DELETE_PAGE_ALT_PROMPT: "\xBFQuiere realmente borrar esta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Esto tambi\xE9n borrar\xE1 las subp\xE1ginas hijo de esta p\xE1gina.",
    DELETE_RECORD: "Borrar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Borrar tambi\xE9n todas las alternativas y ficheros adjuntos.",
    DELETE_ALL_ATTACHMENT_ALTS: "Borrar todas las alternativas y el fichero adjunto.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Borra s\xF3lo el registro principal.  Los adjuntos, las alternativas y las subp\xE1ginas no ser\xE1n borradas.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Borra s\xF3lo los metadatos del registro principal.",
    DELETE_PRIMARY_ALT_INFO: "Como este registro es una alternativa principal, puede ser borrado por separado o junto al resto de contenidos.",
    CHILD_PAGES_TO_BE_DELETED: "Subp\xE1ginas que ser\xE1n borradas:",
    ALTS_TO_BE_DELETED: "Alternativas que ser\xE1n borradas:",
    ATTACHMENTS_TO_BE_DELETED: "Adjuntos que ser\xE1n borrados:",
    YES_DELETE: "S\xED, borrar",
    NO_CANCEL: "No, cancelar",
    SYSTEM_FIELDS: "Campos de Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar los Metadatos del Adjunto \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Guardar los cambios",
    BROWSE_FS: "Navegar en el Sistema de ficheros",
    BROWSE_FS_MAC: "Mostrar en el Finder",
    BROWSE_FS_WINDOWS: "Abrir en el Explorador",
    ERROR_CANNOT_BROWSE_FS: "Error: el fichero no existe todav\xEDa.",
    REMOVE_FLOWBLOCK_PROMPT: "\xBFQuiere realmente borrar este bloque?",
    ADD_FLOWBLOCK: "A\xF1adir Bloque",
    INVALID_INPUT: "Entrada inv\xE1lida",
    UP: "Arriba",
    DOWN: "Abajo",
    REMOVE: "Eliminar",
    ID: "ID",
    CLOSE: "Cerrar",
    CANCEL: "Cancelar",
    BACK_TO_OVERVIEW: "Vuelve a Revisi\xF3n",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Desde aqu\xED puede publicar la versi\xF3n actual del sitio web.",
    PUBLISH_SERVER: "Servidor Destino",
    CURRENTLY_PUBLISHING: "Publicando \u2026",
    STATE: "Estado",
    PUBLISH_DONE: "Publicado",
    PUBLISH_STATE_BUILDING: "Los cambios se est\xE1n generando ...",
    PUBLISH_STATE_PUBLISH: "Los cambios est\xE1n siendo publicados ...",
    PUBLISH_STATE_DONE: "Publicaci\xF3n finalizada.",
    FIND_FILES: "Encontrar Ficheros",
    FIND_FILES_PLACEHOLDER: "Introduzca el nombre de la p\xE1gina ...",
    ATTACHMENT_TYPE: "Tipo de adjunto",
    URL_SLUG: "URL personalizada",
    TEMPLATE: "Plantilla",
    HIDE_PAGE: "Ocultar p\xE1gina",
    HIDE_PAGE_EXPLANATION: "\xBFDeber\xEDa estar oculta esta p\xE1gina?",
    PAGE_IS_DISCOVERABLE: "La P\xE1gina es detectable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si esto est\xE1 habilitado la p\xE1gina puede ser detectada, en caso contrario la URL ha de ser conocida.",
    REFRESH_BUILD: "Refrescar la Generaci\xF3n",
    REFRESH_BUILD_NOTE: "Esto borra todos los resultados generados y lanza una nueva generaci\xF3n desde cero. Esto es \xFAtil en ciertas situaciones donde errores de sincronizaci\xF3n o en las plantillas causaron un resultado corrupto.",
    CURRENTLY_REFRESHING_BUILD: "Regenerando ...",
    REFRESHING_BUILD_DONE: "\xA1Acab\xF3 la regeneraci\xF3n!",
    FAILED_TO_LAUNCH_LEKTOR: "Fall\xF3 la ejecuci\xF3n de Lektor.",
    PROJECT: "Proyecto",
    CLOSE_PROJECT: "Cerrar Proyecto",
    OPEN_PROJECT: "Abrir Proyecto",
    BROWSE_WEBSITE: "Navegar Sitio Web",
    VIEW_ADMIN_PANEL: "Ver Panel de Administraci\xF3n",
    QUIT: "Salir",
    FAILED_TO_LOAD_PROJECT: "Fall\xF3 la carga del proyecto :(",
    LOADING_PROJECT: "Cargando proyecto ...",
    INITIALIZING_LEKTOR: "Inicializando Lektor ...",
    QUIT_LEKTOR: "Salir de Lektor",
    FILE: "Archivo",
    UNDO: "Deshacer",
    REDO: "Rehacer",
    CUT: "Cortar",
    COPY: "Copiar",
    PASTE: "Pegar",
    SELECT_ALL: "Seleccionar Todo",
    HELP: "Ayuda",
    VISIT_WEBSITE: "Visitar Web",
    INSTALL_SHELL_COMMAND: "Instalar Comando",
    INSTALL_SHELL_COMMAND_QUESTION: "\xBFQuiere instalar el comando 'lektor'? Son necesarios privilegios de administrador.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Fall\xF3 la instalaci\xF3n de los comandos.",
    INSTALL_SHELL_COMMAND_SUCCESS: "El comando se instal\xF3 con \xE9xito.",
    OPERATION_SUCCESS: "Con \xE9xito",
    YES: "S\xED",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Fall\xF3 al abrir el fichero de contenido",
    OPEN_OTHER_PROJECT: "Abrir otro Proyecto",
    OPEN_OTHER_PROJECT_QUESTION: "Abrir este fichero requiere abrir otro proyecto (%s). El proyecto actual ser\xE1 cerrado. \xBFQuiere continuar?"
  };

  // ../lektor/translations/fr.json
  var fr_default = {
    RETURN_TO_WEBSITE: "Retour au site Web",
    UNLOAD_ACTIVE_TAB: "Des informations ne sont pas enregistr\xE9es, voulez-vous vraiment quitter cette page\xA0?",
    EDIT_METADATA: "Modifier les m\xE9tadonn\xE9es",
    EDIT: "Modifier",
    DELETE: "Supprimer",
    PREVIEW: "Aper\xE7u",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Primaire",
    PRIMARY_OVERLAY: "Superpos\xE9e",
    ADD_CHILD_PAGE: "Ajouter une page",
    ADD_ATTACHMENT: "Joindre un fichier",
    ATTACHMENT_ACTIONS: "Actions sur les fichiers joints",
    PAGE_ACTIONS: "Action sur les pages",
    NO_CHILD_PAGES: "Aucune sous-page",
    CHILD_PAGES: "Sous-pages",
    NO_ATTACHMENTS: "Aucun fichier joint",
    ATTACHMENTS: "Fichiers joints",
    ADD_ATTACHMENT_TO: "Joindre un fichier \xE0 \xAB\xA0%s\xA0\xBB",
    ADD_ATTACHMENT_NOTE: "Vous pouvez t\xE9l\xE9verser un nouveau fichier joint ici.",
    UPLOAD: "T\xE9l\xE9verser",
    PROGRESS: "Progression",
    ERROR_PREFIX: "Erreur\xA0: ",
    ERROR_NO_ID_PROVIDED: "Erreur\xA0: aucun ID fourni.",
    ERROR_PAGE_ID_DUPLICATE: "Une page avec cet ID (%s) existe d\xE9j\xE0.",
    ERROR_INVALID_ID: "ID non valide",
    ERROR_INVALID_DATE: "Date non valide",
    ERROR_INVALID_NUMBER: "Nombre non valide",
    ERROR_INVALID_URL: "URL non valide",
    ERROR: "Erreur",
    ERROR_OCURRED: "Une erreur a \xE9t\xE9 rencontr\xE9e",
    ERROR_REQUEST_FAILED: "La commande n'a pas pu \xEAtre envoy\xE9e au serveur. Le serveur a peut-\xEAtre \xE9t\xE9 arr\xEAt\xE9 ou ne r\xE9pond plus\xA0?",
    ERROR_SERVER_UNAVAILABLE: "Serveur indisponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Le serveur ne r\xE9pond pas. Il a d\xFB \xEAtre arr\xEAt\xE9 ou une erreur critique l'a rendu inop\xE9rant et il doit \xEAtre red\xE9marr\xE9.",
    MODEL: "Mod\xE8le",
    ADD_CHILD_PAGE_TO: "Ajouter une sous-page \xE0 \xAB\xA0%s\xA0\xBB",
    ADD_CHILD_PAGE_NOTE: "Vous pouvez ajouter une nouvelle sous-page \xE0 la page ici. Veuillez noter que le mod\xE8le ou l'ID ne peut pas \xEAtre chang\xE9 facilement ult\xE9rieurement.",
    CREATE_CHILD_PAGE: "Ajouter une sous-page",
    DELETE_ATTACHMENT_PROMPT: "Voulez-vous vraiment supprimer ce fichier joint\xA0?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Voulez-vous vraiment supprimer les m\xE9tadonn\xE9es de ce fichier joint alternatif\xA0?",
    DELETE_PAGE_PROMPT: "Voulez-vous vraiment supprimer cette page\xA0?",
    DELETE_PAGE_ALT_PROMPT: "Voulez-vous vraiment supprimer cette version alternative\xA0?",
    DELETE_PAGE_CHILDREN_WARNING: "Cela supprimera aussi les sous-pages de cette page.",
    DELETE_RECORD: "Supprimer \xAB\xA0%s\xA0\xBB",
    DELETE_ALL_PAGE_ALTS: "Supprimer aussi toutes les versions alternatives et les fichiers joints.",
    DELETE_ALL_ATTACHMENT_ALTS: "Supprimer toutes les versions alternatives et les fichiers joints.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Supprimer seulement le premier enregistrement. Les fichiers joints, versions alternatives et sous-pages ne seront pas supprim\xE9es.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Supprimer seulement les m\xE9tadonn\xE9es de la pi\xE8ce jointe primaire.",
    DELETE_PRIMARY_ALT_INFO: "Cet enregistrement \xE9tant l'alternative primaire, il peut \xEAtre supprim\xE9 s\xE9par\xE9ment ou avec tous les autres contenus.",
    CHILD_PAGES_TO_BE_DELETED: "Les sous-pages qui seront supprim\xE9es\xA0:",
    ALTS_TO_BE_DELETED: "Les versions alternatives qui seront supprim\xE9es\xA0:",
    ATTACHMENTS_TO_BE_DELETED: "Les fichiers joints qui seront supprim\xE9s\xA0:",
    YES_DELETE: "Oui, supprimer",
    NO_CANCEL: "Non, annuler",
    SYSTEM_FIELDS: "Champs syst\xE8me",
    EDIT_ATTACHMENT_METADATA_OF: "Modifier les m\xE9tadonn\xE9es du fichier joint \xAB\xA0%s\xA0\xBB",
    EDIT_PAGE_NAME: "Modifier \xAB\xA0%s\xA0\xBB",
    SAVE_CHANGES: "Enregistrer les changements",
    BROWSE_FS: "Parcourir le syst\xE8me de fichiers",
    BROWSE_FS_MAC: "R\xE9v\xE9ler dans le Finder",
    BROWSE_FS_WINDOWS: "Ouvrir dans l'Explorateur",
    ERROR_CANNOT_BROWSE_FS: "Erreur\xA0: le fichier n'existe pas encore.",
    REMOVE_FLOWBLOCK_PROMPT: "Voulez-vous vraiment supprimer ce bloc\xA0?",
    ADD_FLOWBLOCK: "Ajouter un bloc",
    INVALID_INPUT: "Saisie non valide",
    UP: "Haut",
    DOWN: "Bas",
    REMOVE: "Enlever",
    ID: "ID",
    CLOSE: "Fermer",
    CANCEL: "Annuler",
    BACK_TO_OVERVIEW: "Retour \xE0 l'aper\xE7u",
    PUBLISH: "Publier",
    PUBLISH_NOTE: "\xC0 partir de maintenant, vous pouvez publier la version actuelle de votre site Web.",
    PUBLISH_SERVER: "Serveur cible",
    CURRENTLY_PUBLISHING: "Publication en cours\u2026",
    STATE: "Statut",
    PUBLISH_DONE: "Publi\xE9",
    PUBLISH_STATE_BUILDING: "Les changements sont en cours de construction\u2026",
    PUBLISH_STATE_PUBLISH: "Les changements  sont en cours de publication\u2026",
    PUBLISH_STATE_DONE: "Publication effectu\xE9e.",
    FIND_FILES: "Trouver les fichiers",
    FIND_FILES_PLACEHOLDER: "Saisir le nom de la page\u2026",
    ATTACHMENT_TYPE: "Type de fichier joint",
    URL_SLUG: "Motif d'URL (slug)",
    TEMPLATE: "Mod\xE8le",
    HIDE_PAGE: "Masquer la page",
    HIDE_PAGE_EXPLANATION: "Est-ce que cette page devrait \xEAtre masqu\xE9e\xA0?",
    PAGE_IS_DISCOVERABLE: "La page est \xAB\xA0d\xE9couvrable\xA0\xBB",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si activ\xE9, la page pourra \xEAtre retrouv\xE9e car elle sera index\xE9e, sinon l'URL devra \xEAtre connue pour y acc\xE9der.",
    REFRESH_BUILD: "Actualiser la construction",
    REFRESH_BUILD_NOTE: "Cela supprime tous les r\xE9sultats de la construction et entra\xEEne une reconstruction compl\xE8te. C'est utile dans certaines situations o\xF9 le r\xE9sultat est corrompu suite \xE0 des erreurs de synchronisation ou de mod\xE8les.",
    CURRENTLY_REFRESHING_BUILD: "Actualisation de la construction en cours\u2026",
    REFRESHING_BUILD_DONE: "Actualisation de la construction termin\xE9e",
    FAILED_TO_LAUNCH_LEKTOR: "Impossible de lancer Lektor.",
    PROJECT: "Projet",
    CLOSE_PROJECT: "Fermer le projet",
    OPEN_PROJECT: "Ouvrir le projet",
    BROWSE_WEBSITE: "Ouvrir le site Web",
    VIEW_ADMIN_PANEL: "Voir le panneau administrateur",
    QUIT: "Quitter",
    FAILED_TO_LOAD_PROJECT: "Impossible de charger le projet :(",
    LOADING_PROJECT: "Chargement du projet\u2026",
    INITIALIZING_LEKTOR: "Initialisation de Lektor\u2026",
    QUIT_LEKTOR: "Quitter Lektor",
    FILE: "Fichier",
    UNDO: "Annuler",
    REDO: "R\xE9tablir",
    CUT: "Couper",
    COPY: "Copier",
    PASTE: "Coller",
    SELECT_ALL: "S\xE9lectionner tout",
    HELP: "Aide",
    VISIT_WEBSITE: "Visiter le site Web",
    INSTALL_SHELL_COMMAND: "Installer la commande shell",
    INSTALL_SHELL_COMMAND_QUESTION: "Voulez-vous installer la commande shell \xAB\xA0lektor\xA0\xBB\xA0? Cela n\xE9cessite des droits administrateurs.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Impossible d'installer les commandes shell.",
    INSTALL_SHELL_COMMAND_SUCCESS: "La commande shell  a \xE9t\xE9 correctement install\xE9e.",
    OPERATION_SUCCESS: "Succ\xE8s",
    YES: "Oui",
    NO: "Non",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Impossible d'ouvir le contenu du fichier",
    OPEN_OTHER_PROJECT: "Ouvrir un autre projet",
    OPEN_OTHER_PROJECT_QUESTION: "Ouvrir ce fichier n\xE9cessite d'ouvrir un autre projet (%s). Le projet actuel sera ferm\xE9. Voulez-vous vraiment continuer\xA0?"
  };

  // ../lektor/translations/it.json
  var it_default = {
    RETURN_TO_WEBSITE: "Torna al sito web",
    UNLOAD_ACTIVE_TAB: "Hai informazioni non salvate, sei sicuro di voler abbandonare questa pagina?",
    EDIT_METADATA: "Modifica metadati",
    EDIT: "Modifica",
    DELETE: "Cancella",
    PREVIEW: "Anteprima",
    ALTS: "Alternative",
    PRIMARY_ALT: "Primaria",
    PRIMARY_OVERLAY: "Sovrascritta",
    ADD_CHILD_PAGE: "Aggiungi pagina",
    ADD_ATTACHMENT: "Aggiungi allegato",
    ATTACHMENT_ACTIONS: "Azioni sull'allegato",
    PAGE_ACTIONS: "Azioni sulla pagina",
    NO_CHILD_PAGES: "Nessuna sottopagina",
    CHILD_PAGES: "Sottopagine",
    NO_ATTACHMENTS: "Nessun alleagto",
    ATTACHMENTS: "Allegati",
    ADD_ATTACHMENT_TO: "Aggiungi allegato a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Puoi caricare un allegato qui.",
    UPLOAD: "Carica",
    PROGRESS: "Avanzamento",
    ERROR_PREFIX: "Errore: ",
    ERROR_NO_ID_PROVIDED: "Nessun ID fornito.",
    ERROR_PAGE_ID_DUPLICATE: "Una pagina con questo ID (%s) esiste gi\xE0.",
    ERROR_INVALID_ID: "ID non valido",
    ERROR_INVALID_DATE: "Data non valida",
    ERROR_INVALID_NUMBER: "Non \xE8 un numero valido",
    ERROR_INVALID_URL: "Non \xE8 un indirizzo valido",
    ERROR: "Errore",
    ERROR_OCURRED: "\xC8 capitato un errore",
    ERROR_REQUEST_FAILED: "Impossibile inviare comandi al server.  Magari il server \xE8 stato spento o \xE8 sovraccarico?",
    ERROR_SERVER_UNAVAILABLE: "Server non disponibile",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Il server non risponde.  Pu\xF2 essere spento o un errore critico l'ha reso non operativo ed \xE8 necessario riavviarlo.",
    MODEL: "Modello",
    ADD_CHILD_PAGE_TO: "Aggiungi sottopagina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Puoi aggiungere una nuova sottopagina qui.  Tieni presente che il modello o l'ID non potranno essere cambiati facilmente in futuro.",
    CREATE_CHILD_PAGE: "Aggiungi sottopagina",
    DELETE_ATTACHMENT_PROMPT: "Vuoi veramente cancellare questo allegato?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Vuoi veramente cancellare i metadati di questa alternativa all'allegato?",
    DELETE_PAGE_PROMPT: "Vuoi veramente cancellare questa pagina?",
    DELETE_PAGE_ALT_PROMPT: "Vuoi veramente cancellare questa alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Questo canceller\xE0 anche le sottopagine di questa pagina.",
    DELETE_RECORD: "Cancella \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Cancella anche tutte le alternative ed i file allegati.",
    DELETE_ALL_ATTACHMENT_ALTS: "Cancella tutte le alternative ed il file allegato.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Cancella solo la pagina principale. Allegati, alternative e sottopagine nnon verranno cancellate.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Cancella solo i metadati dell'allegato principale.",
    DELETE_PRIMARY_ALT_INFO: "Dato che questo oggetto \xE8 l'alternativa primaria, pu\xF2 essere cancellato separatamente o insieme al resto del contenuto.",
    CHILD_PAGES_TO_BE_DELETED: "Sottopagine che verranno cancellate:",
    ALTS_TO_BE_DELETED: "Alternative che verranno cancellate:",
    ATTACHMENTS_TO_BE_DELETED: "Allegati che verranno cancellati:",
    YES_DELETE: "Si, cancella",
    NO_CANCEL: "No, annulla",
    SYSTEM_FIELDS: "Campi di sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Modifica i metadati dell'allegato \u201C%s\u201D",
    EDIT_PAGE_NAME: "Modifica \u201C%s\u201D",
    SAVE_CHANGES: "Salva modifiche",
    BROWSE_FS: "Apri nel filesystem",
    BROWSE_FS_MAC: "Apri in Finder",
    BROWSE_FS_WINDOWS: "Apri in Esplora risorse",
    ERROR_CANNOT_BROWSE_FS: "Errore: il file non esiste.",
    REMOVE_FLOWBLOCK_PROMPT: "Vuoi davvero cancellare questo blocco?",
    ADD_FLOWBLOCK: "Aggiungi blocco",
    INVALID_INPUT: "Input invalido",
    UP: "Su",
    DOWN: "Gi\xF9",
    REMOVE: "Rimuovi",
    ID: "ID",
    CLOSE: "Chiudi",
    CANCEL: "Annulla",
    BACK_TO_OVERVIEW: "Torna alla panoramica",
    PUBLISH: "Pubblica",
    PUBLISH_NOTE: "Da qui puoi pubblicare la versione corrente del sito web.",
    PUBLISH_SERVER: "Server di destinazione",
    CURRENTLY_PUBLISHING: "Pubblicazione in corso...",
    STATE: "Stato",
    PUBLISH_DONE: "Pubblicato",
    PUBLISH_STATE_BUILDING: "Costruendo le pagine modificate...",
    PUBLISH_STATE_PUBLISH: "Pubblicando le pagine modificate...",
    PUBLISH_STATE_DONE: "Pubblicazione completata.",
    FIND_FILES: "Trova i file",
    FIND_FILES_PLACEHOLDER: "Inserisci il nome della pagina...",
    ATTACHMENT_TYPE: "Tipo dell'allegato",
    URL_SLUG: "Alias della pagina",
    TEMPLATE: "Template",
    HIDE_PAGE: "Nascondi pagina",
    HIDE_PAGE_EXPLANATION: "Questa pagina deve essere nascosta?",
    PAGE_IS_DISCOVERABLE: "La pagina pu\xF2 essere scoperta?",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Se \xE8 abilitato la pagina pu\xF2 essere scoperta, altrimenti l'indirizzo deve essere noto.",
    REFRESH_BUILD: "Esegui build completa",
    REFRESH_BUILD_NOTE: "Questo cancella tutti i risultati precedenti, eseguendo una build completa.  Questo \xE8 utile in casi in cui errori di sincronizzazione o errori nei template rendono il risultato corrotto.",
    CURRENTLY_REFRESHING_BUILD: "Eseguendo build completa...",
    REFRESHING_BUILD_DONE: "Build completa eseguita!",
    FAILED_TO_LAUNCH_LEKTOR: "Impossibile eseguire Lektor.",
    PROJECT: "Progetto",
    CLOSE_PROJECT: "Chiudi progetto",
    OPEN_PROJECT: "Apri progetto",
    BROWSE_WEBSITE: "Naviga nel sito web",
    VIEW_ADMIN_PANEL: "Mostra pannello di amministrazione",
    QUIT: "Esci",
    FAILED_TO_LOAD_PROJECT: "Impossibile caricare il progetto :(",
    LOADING_PROJECT: "Caricamento del progetto...",
    INITIALIZING_LEKTOR: "Preparazione di Lektor...",
    QUIT_LEKTOR: "Esci da Lektor",
    FILE: "File",
    UNDO: "Annulla",
    REDO: "Ripeti",
    CUT: "Taglia",
    COPY: "Copia",
    PASTE: "Incolla",
    SELECT_ALL: "Seleziona tutto",
    HELP: "Aiuto",
    VISIT_WEBSITE: "Visita il sito web",
    INSTALL_SHELL_COMMAND: "Installa comando shell",
    INSTALL_SHELL_COMMAND_QUESTION: "Vuoi installare il comando shell 'lektor'? Questo richiede privilegi di amministrazione.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Impossibile installare il comando shell.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Il comando shell \xE8 stato installato con successo.",
    OPERATION_SUCCESS: "Successo",
    YES: "Si",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Impossibile aprire il file di contenuto",
    OPEN_OTHER_PROJECT: "Apri un altro progetto",
    OPEN_OTHER_PROJECT_QUESTION: "Aprire questo file richiede l'apertura di un altro progetto (%s). Il progetto corrente verr\xE0 chiuso. Vuoi proseguire?"
  };

  // ../lektor/translations/ja.json
  var ja_default = {
    RETURN_TO_WEBSITE: "Website\u306B\u623B\u308B",
    UNLOAD_ACTIVE_TAB: "\u4FDD\u5B58\u3057\u3066\u3044\u306A\u3044\u7DE8\u96C6\u304C\u3042\u308A\u307E\u3059\u3001\u672C\u5F53\u306B\u30DA\u30FC\u30B8\u3092\u96E2\u308C\u307E\u3059\u304B?",
    EDIT_METADATA: "\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u7DE8\u96C6",
    EDIT: "\u7DE8\u96C6",
    DELETE: "\u524A\u9664",
    PREVIEW: "\u30D7\u30EC\u30D3\u30E5\u30FC",
    ALTS: "\u4EE3\u66FF",
    PRIMARY_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30FC",
    PRIMARY_OVERLAY: "\u4E0A\u66F8\u304D",
    ADD_CHILD_PAGE: "\u30DA\u30FC\u30B8\u306E\u8FFD\u52A0",
    ADD_ATTACHMENT: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306E\u8FFD\u52A0",
    ATTACHMENT_ACTIONS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306E\u30A2\u30AF\u30B7\u30E7\u30F3",
    PAGE_ACTIONS: "\u30DA\u30FC\u30B8\u30A2\u30AF\u30B7\u30E7\u30F3",
    NO_CHILD_PAGES: "\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u3042\u308A\u307E\u305B\u3093",
    CHILD_PAGES: "\u30B5\u30D6\u30DA\u30FC\u30B8",
    NO_ATTACHMENTS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093",
    ATTACHMENTS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8",
    ADD_ATTACHMENT_TO: "\u201C%s\u201D\u306B\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3059\u308B",
    ADD_ATTACHMENT_NOTE: "\u3053\u3053\u306B\u65B0\u3057\u3044\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u3059",
    UPLOAD: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
    PROGRESS: "\u30D7\u30ED\u30B0\u30EC\u30B9",
    ERROR_PREFIX: "\u30A8\u30E9\u30FC: ",
    ERROR_NO_ID_PROVIDED: "ID\u304C\u3042\u308A\u307E\u305B\u3093",
    ERROR_PAGE_ID_DUPLICATE: "\u3053\u306EID (%s) \u306E\u30DA\u30FC\u30B8\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059",
    ERROR_INVALID_ID: "ID\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR_INVALID_DATE: "\u65E5\u4ED8\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR_INVALID_NUMBER: "\u4E0D\u6B63\u306A\u756A\u53F7\u3067\u3059",
    ERROR_INVALID_URL: "URL\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR: "\u30A8\u30E9\u30FC",
    ERROR_OCURRED: "\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F",
    ERROR_REQUEST_FAILED: "\u30B5\u30FC\u30D0\u30FC\u306B\u30B3\u30DE\u30F3\u30C9\u304C\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3001\u30B5\u30FC\u30D0\u30FC\u304C\u6B62\u307E\u3063\u3066\u3044\u308B\u304B\u5FDC\u7B54\u304C\u306A\u3044\u306E\u304B\u3082\u3057\u308C\u307E\u305B\u3093",
    ERROR_SERVER_UNAVAILABLE: "\u30B5\u30FC\u30D0\u30FC\u30A2\u30F3\u30A2\u30D9\u30A4\u30E9\u30D6\u30EB",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u30B5\u30FC\u30D0\u30FC\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3001\u4E2D\u65AD\u3055\u308C\u305F\u304B\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u305F\u305F\u3081\u30AA\u30DA\u30EC\u30FC\u30B7\u30E7\u30F3\u304C\u5B8C\u4E86\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u30EA\u30B9\u30BF\u30FC\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002",
    MODEL: "\u30E2\u30C7\u30EB",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D\u306B\u30B5\u30D6\u30DA\u30FC\u30B8\u3092\u8FFD\u52A0\u3059\u308B",
    ADD_CHILD_PAGE_NOTE: "\u3053\u306E\u30DA\u30FC\u30B8\u306B\u30B5\u30D6\u30DA\u30FC\u30B8\u304C\u4F5C\u308C\u307E\u3059\u3002\u6CE8\u610F: \u30E2\u30C7\u30EB\u307E\u305F\u306FID\u306F\u305D\u306E\u5F8C\u7C21\u5358\u306B\u306F\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002",
    CREATE_CHILD_PAGE: "\u30C1\u30E3\u30A4\u30EB\u30C9\u30DA\u30FC\u30B8\u3092\u4F5C\u308B",
    DELETE_ATTACHMENT_PROMPT: "\u672C\u5F53\u306B\u3053\u306E\u6DFB\u4ED8\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u672C\u5F53\u306B\u3053\u306E\u6DFB\u4ED8\u4EE3\u66FF\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_PAGE_PROMPT: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u672C\u5F53\u306B\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_PAGE_ALT_PROMPT: "\u3053\u306E\u4EE3\u66FF\u3092\u672C\u80FD\u306B\u524A\u9664\u3057\u307E\u3059\u304B?",
    DELETE_PAGE_CHILDREN_WARNING: "\u3053\u306E\u30DA\u30FC\u30B8\u306E\u30B5\u30D6\u30DA\u30FC\u30B8\u3082\u524A\u9664\u3055\u308C\u307E\u3059",
    DELETE_RECORD: "\u201C%s\u201D\u3092\u524A\u9664",
    DELETE_ALL_PAGE_ALTS: "\u3059\u3079\u3066\u306E\u4EE3\u66FF\u3068\u6DFB\u4ED8\u3082\u524A\u9664",
    DELETE_ALL_ATTACHMENT_ALTS: "\u3059\u3079\u3066\u306E\u4EE3\u66FF\u3068\u6DFB\u4ED8\u3092\u524A\u9664",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30EC\u30B3\u30FC\u30C9\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u307F\u524A\u9664\u3002\u6DFB\u4ED8\u3001\u4EE3\u66FF\u3001\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u524A\u9664\u3055\u308C\u307E\u305B\u3093\u3002",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30EC\u30B3\u30FC\u30C9\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u307F\u524A\u9664",
    DELETE_PRIMARY_ALT_INFO: "\u3053\u306E\u30EC\u30B3\u30FC\u30C9\u306F\u30D7\u30E9\u30A4\u30DE\u30EA\u306E\u4EE3\u66FF\u306E\u305F\u3081\u3001\u5225\u306B\u524A\u9664\u3059\u308B\u3053\u3068\u3082\u3001\u4ED6\u306E\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3068\u3082\u306B\u524A\u9664\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002",
    CHILD_PAGES_TO_BE_DELETED: "\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    ALTS_TO_BE_DELETED: "\u4EE3\u66FF\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    ATTACHMENTS_TO_BE_DELETED: "\u6DFB\u4ED8\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    YES_DELETE: "\u306F\u3044\u3001\u524A\u9664\u3057\u307E\u3059",
    NO_CANCEL: "\u3044\u3044\u3048\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059",
    SYSTEM_FIELDS: "\u30B7\u30B9\u30C6\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9",
    EDIT_ATTACHMENT_METADATA_OF: "\u6DFB\u4ED8 \u201C%s\u201D\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u7DE8\u96C6",
    EDIT_PAGE_NAME: "\u201C%s\u201D\u3092\u7DE8\u96C6",
    SAVE_CHANGES: "\u7DE8\u96C6\u3092\u4FDD\u5B58",
    BROWSE_FS: "\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u3067\u95B2\u89A7\u3059\u308B",
    BROWSE_FS_MAC: "\u30D5\u30A1\u30A4\u30F3\u30C0\u30FC\u3067\u958B\u304F",
    BROWSE_FS_WINDOWS: "\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u3067\u958B\u304F",
    ERROR_CANNOT_BROWSE_FS: "\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u306F\u5B58\u5728\u3057\u307E\u305B\u3093",
    REMOVE_FLOWBLOCK_PROMPT: "\u3053\u306E\u30D6\u30ED\u30C3\u30AF\u3092\u672C\u5F53\u306B\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    ADD_FLOWBLOCK: "\u30D6\u30ED\u30C3\u30AF\u3092\u8FFD\u52A0",
    INVALID_INPUT: "\u4E0D\u6B63\u306A\u5165\u529B",
    UP: "\u30A2\u30C3\u30D7",
    DOWN: "\u30C0\u30A6\u30F3",
    REMOVE: "\u53D6\u308A\u9664\u304F",
    ID: "ID",
    CLOSE: "\u9589\u3058\u308B",
    CANCEL: "\u30AD\u30E3\u30F3\u30BB\u30EB",
    BACK_TO_OVERVIEW: "\u30AA\u30FC\u30D0\u30FC\u30D3\u30E5\u30FC\u306B\u623B\u308B",
    PUBLISH: "\u516C\u958B",
    PUBLISH_NOTE: "\u3053\u3053\u304B\u3089\u73FE\u884C\u306E\u30A6\u30A7\u30D6\u30B5\u30A4\u30C8\u3092\u516C\u958B\u3067\u304D\u307E\u3059\u3002",
    PUBLISH_SERVER: "\u30BF\u30FC\u30B2\u30C3\u30C8\u30B5\u30FC\u30D0\u30FC",
    CURRENTLY_PUBLISHING: "\u516C\u958B \u2026",
    STATE: "\u72B6\u614B",
    PUBLISH_DONE: "\u516C\u958B\u4E2D",
    PUBLISH_STATE_BUILDING: "\u5909\u66F4\u304C\u3092\u30D3\u30EB\u30C9\u3057\u3066\u3044\u307E\u3059...",
    PUBLISH_STATE_PUBLISH: "\u5909\u66F4\u304C\u516C\u958B\u3055\u308C\u307E\u3057\u305F ...",
    PUBLISH_STATE_DONE: "\u516C\u958B\u5B8C\u4E86",
    FIND_FILES: "\u30D5\u30A1\u30A4\u30EB\u3092\u898B\u3064\u3051\u308B",
    FIND_FILES_PLACEHOLDER: "\u30DA\u30FC\u30B8\u540D\u3092\u5165\u529B...",
    ATTACHMENT_TYPE: "\u6DFB\u4ED8\u30BF\u30A4\u30D7",
    URL_SLUG: "URL\u30B9\u30C8\u30EA\u30F3\u30B0",
    TEMPLATE: "\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8",
    HIDE_PAGE: "\u30D8\u30FC\u30B8\u3092\u96A0\u3059",
    HIDE_PAGE_EXPLANATION: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u975E\u8868\u793A\u306B\u3057\u307E\u3059\u304B?",
    PAGE_IS_DISCOVERABLE: "\u3053\u306E\u30DA\u30FC\u30B8\u306F\u5916\u90E8\u304B\u3089\u898B\u308B\u3053\u3068\u304C\u53EF\u80FD\u3067\u3059",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\u6709\u52B9\u306B\u3059\u308B\u3053\u3068\u3067\u3001\u30DA\u30FC\u30B8\u306F\u767A\u898B\u53EF\u80FD\u306B\u306A\u308A\u307E\u3059\u3001\u305D\u3046\u3057\u306A\u3044\u5834\u5408\u306F\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306E\u306B\u305D\u306EURL\u3092\u77E5\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",
    REFRESH_BUILD: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0",
    REFRESH_BUILD_NOTE: "\u3053\u308C\u306F\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u6E08\u307F\u306E\u30D3\u30EB\u30C9\u7D50\u679C\u3092\u3059\u3079\u3066\u524A\u9664\u3057\u3001\u6700\u521D\u304B\u3089\u306E\u69CB\u7BC9\u3092\u958B\u59CB\u3057\u307E\u3059\u3002\u540C\u671F\u306E\u30A8\u30E9\u30FC\u3084\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u5185\u306E\u30DF\u30B9\u306B\u3088\u308A\u51FA\u529B\u304C\u4E0D\u6B63\u306A\u5834\u5408\u306B\u6709\u52B9\u3067\u3059\u3002",
    CURRENTLY_REFRESHING_BUILD: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0\u4E2D...",
    REFRESHING_BUILD_DONE: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor\u3092\u958B\u3051\u308B\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
    PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",
    CLOSE_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u9589\u3058\u308B",
    OPEN_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u958B\u3051\u308B",
    BROWSE_WEBSITE: "\u30D6\u30E9\u30A6\u30B6\u3067\u958B\u304F",
    VIEW_ADMIN_PANEL: "\u30A2\u30C9\u30DF\u30F3\u30D1\u30CD\u30EB\u3092\u958B\u304F",
    QUIT: "\u7D42\u4E86",
    FAILED_TO_LOAD_PROJECT: "Failed to load the project :(",
    LOADING_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059 ...",
    INITIALIZING_LEKTOR: "Lektor\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059 ...",
    QUIT_LEKTOR: "Lektor\u3092\u7D42\u4E86\u3059\u308B",
    FILE: "\u30D5\u30A1\u30A4\u30EB",
    UNDO: "\u30A2\u30F3\u30C9\u30A5\u30FC",
    REDO: "\u30EA\u30C9\u30A5\u30FC",
    CUT: "\u30AB\u30C3\u30C8",
    COPY: "\u30B3\u30D4\u30FC",
    PASTE: "\u30DA\u30FC\u30B9\u30C8",
    SELECT_ALL: "\u5168\u3066\u3092\u9078\u629E",
    HELP: "\u30D8\u30EB\u30D7",
    VISIT_WEBSITE: "Website\u3092\u8A2A\u306D\u308B",
    INSTALL_SHELL_COMMAND: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",
    INSTALL_SHELL_COMMAND_QUESTION: "\u300Clektor\u300D\u306E\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u304B\uFF1F\u3002\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u306B\u306F\u7BA1\u7406\u6A29\u9650\u304C\u5FC5\u8981\u3067\u3059\u3002",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u6210\u529F\u3057\u307E\u3057\u305F\u3002",
    OPERATION_SUCCESS: "\u6210\u529F",
    YES: "\u306F\u3044",
    NO: "\u3044\u3044\u3048",
    OK: "\u4E86\u89E3",
    FAILED_TO_OPEN_CONTENT_FILE: "\u30B3\u30F3\u30C6\u30F3\u30C4\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
    OPEN_OTHER_PROJECT: "\u4ED6\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u958B\u304F",
    OPEN_OTHER_PROJECT_QUESTION: "\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u306B\u306F\u3001\u4ED6\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8(%s)\u3092\u958B\u304F\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u73FE\u5728\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306F\u9589\u3058\u3089\u308C\u307E\u3059\u3001\u51E6\u7406\u3092\u7D99\u7D9A\u3057\u307E\u3059\u304B?"
  };

  // ../lektor/translations/ko.json
  var ko_default = {
    RETURN_TO_WEBSITE: "\uC0AC\uC774\uD2B8\uB85C \uB418\uB3CC\uC544\uAC00\uAE30",
    UNLOAD_ACTIVE_TAB: "\uC800\uC7A5\uB418\uC9C0 \uC54A\uC740 \uC815\uBCF4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uD398\uC774\uC9C0\uB97C \uB5A0\uB098\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
    EDIT_METADATA: "\uBA54\uD0C0\uB370\uC774\uD130 \uC218\uC815",
    EDIT: "\uC218\uC815",
    DELETE: "\uC0AD\uC81C",
    PREVIEW: "\uBBF8\uB9AC\uBCF4\uAE30",
    ALTS: "\uB2E4\uB978 \uC5B8\uC5B4",
    PRIMARY_ALT: "\uAE30\uBCF8",
    PRIMARY_OVERLAY: "\uACB9\uCE5C",
    ADD_CHILD_PAGE: "\uD398\uC774\uC9C0 \uCD94\uAC00",
    ADD_ATTACHMENT: "\uCCA8\uBD80 \uD30C\uC77C \uCD94\uAC00",
    ATTACHMENT_ACTIONS: "\uCCA8\uBD80 \uD30C\uC77C \uC791\uC5C5",
    PAGE_ACTIONS: "\uD398\uC774\uC9C0 \uC791\uC5C5",
    NO_CHILD_PAGES: "\uD558\uC704 \uD398\uC774\uC9C0 \uC5C6\uC74C",
    CHILD_PAGES: "\uD558\uC704 \uD398\uC774\uC9C0",
    NO_ATTACHMENTS: "\uCCA8\uBD80 \uD30C\uC77C \uC5C6\uC74C",
    ATTACHMENTS: "\uCCA8\uBD80 \uD30C\uC77C",
    ADD_ATTACHMENT_TO: "\u201C%s\u201C\uC5D0\uC11C \uCCA8\uBD80 \uD30C\uC77C \uCD94\uAC00",
    ADD_ATTACHMENT_NOTE: "\uC5EC\uAE30\uC11C \uC0C8\uB85C\uC6B4 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    UPLOAD: "\uC5C5\uB85C\uB4DC",
    PROGRESS: "\uC9C4\uD589",
    ERROR_PREFIX: "\uC5D0\uB7EC: ",
    ERROR_NO_ID_PROVIDED: "\uC81C\uACF5\uB41C ID\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
    ERROR_PAGE_ID_DUPLICATE: "\uC774 ID (%s) \uD398\uC774\uC9C0\uB294 \uC774\uBBF8 \uC874\uC7AC\uD569\uB2C8\uB2E4.",
    ERROR_INVALID_ID: "\uC798\uBABB\uB41C ID",
    ERROR_INVALID_DATE: "\uC798\uBABB\uB41C \uB0A0\uC9DC",
    ERROR_INVALID_NUMBER: "\uC720\uD6A8\uD55C \uC22B\uC790 \uC544\uB2D8",
    ERROR_INVALID_URL: "\uC720\uD6A8\uD55C URL \uC544\uB2D8",
    ERROR: "\uC5D0\uB7EC",
    ERROR_OCURRED: "\uC624\uB958 \uBC1C\uC0DD",
    ERROR_REQUEST_FAILED: "\uC11C\uBC84\uC5D0 \uBA85\uB839\uC744 \uBCF4\uB0B4\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC11C\uBC84\uAC00 \uC911\uC9C0\uB418\uC5C8\uAC70\uB098 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC744 \uC218\uB3C4 \uC788\uB124\uC694?",
    ERROR_SERVER_UNAVAILABLE: "\uC11C\uBC84\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\uC11C\uBC84\uAC00 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC11C\uBC84\uAC00 \uC911\uC9C0\uB418\uC5C8\uAC70\uB098, \uC7AC\uC2DC\uC791\uC744 \uD544\uC694\uB85C \uD558\uB294 \uCE58\uBA85\uC801\uC778 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.",
    MODEL: "\uBAA8\uB378",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D\uC5D0 \uD558\uC704 \uD398\uC774\uC9C0 \uCD94\uAC00",
    ADD_CHILD_PAGE_NOTE: "\uC774 \uD398\uC774\uC9C0\uC5D0\uC11C \uC0C8\uB85C\uC6B4 \uD558\uC704 \uD398\uC774\uC9C0\uB97C \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.  \uC911\uC694, \uB098\uC911\uC5D0 \uBAA8\uB378\uC774\uB098 ID\uB97C \uBCC0\uACBD\uD558\uAE30 \uC5B4\uB835\uC2B5\uB2C8\uB2E4.",
    CREATE_CHILD_PAGE: "\uD558\uC704 \uD398\uC774\uC9C0 \uCD94\uAC00",
    DELETE_ATTACHMENT_PROMPT: "\uC815\uB9D0\uB85C \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\uC815\uB9D0\uB85C \uCCA8\uBD80 \uD30C\uC77C\uC758 \uB2E4\uB978 \uC5B8\uC5B4\uC5D0 \uB300\uD55C \uBA54\uD0C0\uB370\uC774\uD130\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_PROMPT: "\uC815\uB9D0\uB85C \uC774 \uD398\uC774\uC9C0\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_ALT_PROMPT: "\uC815\uB9D0\uB85C \uC774 \uB2E4\uB978 \uC5B8\uC5B4\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_CHILDREN_WARNING: "\uC774 \uD398\uC774\uC9C0\uC758 \uD558\uC704 \uD398\uC774\uC9C0 \uB610\uD55C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",
    DELETE_RECORD: "\u201C%s\u201D \uC0AD\uC81C",
    DELETE_ALL_PAGE_ALTS: "\uB610\uD55C, \uBAA8\uB4E0 \uB2E4\uB978 \uC5B8\uC5B4\uC640 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
    DELETE_ALL_ATTACHMENT_ALTS: "\uBAA8\uB4E0 \uB2E4\uB978 \uC5B8\uC5B4\uC640 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\uC624\uC9C1 \uC8FC \uB808\uCF54\uB4DC\uB9CC \uC0AD\uC81C\uB429\uB2C8\uB2E4. \uCCA8\uBD80 \uD30C\uC77C, \uB2E4\uB978 \uC5B8\uC5B4, \uD558\uC704 \uD398\uC774\uC9C0\uB294 \uC0AD\uC81C\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\uC624\uC9C1 \uC8FC \uB808\uCF54\uB4DC\uC758 \uBA54\uD0C0\uB370\uC774\uD130\uB9CC \uC0AD\uC81C\uB429\uB2C8\uB2E4.",
    DELETE_PRIMARY_ALT_INFO: "\uC774 \uB808\uCF54\uB4DC\uB294 \uAE30\uBCF8 \uC5B8\uC5B4\uC774\uAE30 \uB54C\uBB38\uC5D0 \uBCC4\uB3C4\uB85C \uC0AD\uC81C\uD558\uAC70\uB098 \uB2E4\uB978 \uCF58\uD150\uCE20 \uC804\uBD80\uC640 \uAC19\uC774 \uC0AD\uC81C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    CHILD_PAGES_TO_BE_DELETED: "\uD558\uC704 \uD398\uC774\uC9C0\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    ALTS_TO_BE_DELETED: "\uB2E4\uB978 \uC5B8\uC5B4\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    ATTACHMENTS_TO_BE_DELETED: "\uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    YES_DELETE: "\uB124, \uC0AD\uC81C",
    NO_CANCEL: "\uC544\uB2C8\uC694, \uCDE8\uC18C",
    SYSTEM_FIELDS: "\uC2DC\uC2A4\uD15C \uD544\uB4DC",
    EDIT_ATTACHMENT_METADATA_OF: "\uCCA8\uBD80 \uD30C\uC77C \u201C%s\u201D\uC758 \uBA54\uD0C0\uB370\uC774\uD130 \uC218\uC815",
    EDIT_PAGE_NAME: "\u201C%s\u201D \uC218\uC815",
    SAVE_CHANGES: "\uBCC0\uACBD \uC800\uC7A5",
    BROWSE_FS: "\uD30C\uC77C \uC2DC\uC2A4\uD15C \uAC80\uC0C9",
    BROWSE_FS_MAC: "\uD30C\uC778\uB354\uC5D0\uC11C \uAC80\uC0C9",
    BROWSE_FS_WINDOWS: "\uD0D0\uC0C9\uAE30\uC5D0\uC11C \uC5F4\uAE30",
    ERROR_CANNOT_BROWSE_FS: "\uC624\uB958: \uD30C\uC77C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
    REMOVE_FLOWBLOCK_PROMPT: "\uC774 \uBE14\uB85D\uC744 \uC81C\uAC70\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
    ADD_FLOWBLOCK: "\uBE14\uB85D \uCD94\uAC00",
    INVALID_INPUT: "\uC798\uBABB\uB41C \uC785\uB825",
    UP: "\uC704\uB85C",
    DOWN: "\uC544\uB798\uB85C",
    REMOVE: "\uC81C\uAC70",
    ID: "ID",
    CLOSE: "\uB2EB\uAE30",
    CANCEL: "\uCDE8\uC18C",
    BACK_TO_OVERVIEW: "\uAC1C\uC694\uB85C \uB418\uB3CC\uC544\uAC00\uAE30",
    PUBLISH: "\uBC1C\uD589",
    PUBLISH_NOTE: "\uC5EC\uAE30\uC11C \uC6F9\uC0AC\uC774\uD2B8 \uD604\uC7AC \uBC84\uC804\uC744 \uBC1C\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    PUBLISH_SERVER: "\uB300\uC0C1 \uC11C\uBC84",
    CURRENTLY_PUBLISHING: "\uBC1C\uD589 \uC911 ...",
    STATE: "\uC0C1\uD0DC",
    PUBLISH_DONE: "\uBC1C\uD589\uB428",
    PUBLISH_STATE_BUILDING: "\uBCC0\uACBD \uC0AC\uD56D \uBE4C\uB4DC \uC911 ...",
    PUBLISH_STATE_PUBLISH: "\uBCC0\uACBD \uC0AC\uD56D \uBC1C\uD589 \uC911 ...",
    PUBLISH_STATE_DONE: "\uBC1C\uD589 \uC644\uB8CC.",
    FIND_FILES: "\uD30C\uC77C \uCC3E\uAE30",
    FIND_FILES_PLACEHOLDER: "\uD398\uC774\uC9C0 \uC774\uB984 \uC785\uB825 ...",
    ATTACHMENT_TYPE: "\uCCA8\uBD80 \uD30C\uC77C \uD615\uC2DD",
    URL_SLUG: "URL slug",
    TEMPLATE: "\uD15C\uD50C\uB9BF",
    HIDE_PAGE: "\uD398\uC774\uC9C0 \uC228\uAE30\uAE30",
    HIDE_PAGE_EXPLANATION: "\uC774 \uD398\uC774\uC9C0\uB97C \uC228\uAE38\uAE4C\uC694?",
    PAGE_IS_DISCOVERABLE: "\uD398\uC774\uC9C0 \uB2E4\uC2DC\uBCF4\uC774\uAE30",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\uC774 \uC124\uC815\uC774 \uD65C\uC131\uD654\uB418\uC5B4\uC788\uC73C\uBA74 \uD398\uC774\uC9C0\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 URL\uB9CC \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    REFRESH_BUILD: "\uC0C8\uB85C\uC6B4 \uBE4C\uB4DC",
    REFRESH_BUILD_NOTE: "\uC774 \uD2B8\uB9AC\uAC70\uB294 \uCC98\uC74C\uBD80\uD130 \uB2E4\uC2DC \uBE4C\uB4DC\uD569\uB2C8\uB2E4. \uADF8\uB7EC\uBA74\uC11C \uC774\uC804 \uBE4C\uB4DC\uD558\uBA74\uC11C \uCE90\uC2DC\uB41C \uACB0\uACFC\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uC774 \uAE30\uB2A5\uC740 \uB3D9\uAE30\uD654 \uC624\uB958\uB098 \uD15C\uD50C\uB9BF\uC5D0\uC11C \uC798\uBABB\uB41C \uC124\uC815\uC73C\uB85C \uCD9C\uB825\uBB3C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC744 \uB54C \uC720\uC6A9\uD569\uB2C8\uB2E4.",
    CURRENTLY_REFRESHING_BUILD: "\uC9C0\uAE08 \uC0C8\uB86D\uAC8C \uBE4C\uB4DC \uC911 ...",
    REFRESHING_BUILD_DONE: "\uC0C8\uB85C\uC6B4 \uBE4C\uB4DC\uB97C \uC644\uB8CC\uD558\uC600\uC2B5\uB2C8\uB2E4!",
    FAILED_TO_LAUNCH_LEKTOR: "\uC2E4\uD589\uD558\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    PROJECT: "\uD504\uB85C\uC81D\uD2B8",
    CLOSE_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uB2EB\uAE30",
    OPEN_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uC5F4\uAE30",
    BROWSE_WEBSITE: "\uC6F9\uC0AC\uC774\uD2B8 \uCC3E\uC544\uBCF4\uAE30",
    VIEW_ADMIN_PANEL: "\uAD00\uB9AC\uC790 \uD310\uB12C \uBCF4\uAE30",
    QUIT: "\uB098\uAC00\uAE30",
    FAILED_TO_LOAD_PROJECT: "\uD504\uB85C\uC81D\uD2B8\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4. :(",
    LOADING_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uBD88\uB7EC\uC624\uB294 \uC911 ...",
    INITIALIZING_LEKTOR: "Lektor \uCD08\uAE30\uD654 \uC911 ...",
    QUIT_LEKTOR: "Lektor \uB098\uAC00\uAE30",
    FILE: "\uD30C\uC77C",
    UNDO: "\uC2E4\uD589 \uCDE8\uC18C",
    REDO: "\uB2E4\uC2DC \uC2E4\uD589",
    CUT: "\uC798\uB77C\uB0B4\uAE30",
    COPY: "\uBCF5\uC0AC",
    PASTE: "\uBD99\uC5EC\uB123\uAE30",
    SELECT_ALL: "\uC804\uBD80 \uC120\uD0DD",
    HELP: "\uB3C4\uC6C0\uB9D0",
    VISIT_WEBSITE: "\uC6F9\uC0AC\uC774\uD2B8 \uBC29\uBB38",
    INSTALL_SHELL_COMMAND: "\uC258 \uCEE4\uBA58\uB4DC \uC124\uCE58",
    INSTALL_SHELL_COMMAND_QUESTION: "'lektor' \uC258 \uBA85\uB839\uC744 \uC124\uCE58\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uAD00\uB9AC\uC790 \uAD8C\uD55C\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\uC258 \uBA85\uB839\uC744 \uC124\uCE58\uD558\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    INSTALL_SHELL_COMMAND_SUCCESS: "\uC258 \uBA85\uB839\uC774 \uC131\uACF5\uC801\uC73C\uB85C \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
    OPERATION_SUCCESS: "\uC644\uB8CC",
    YES: "\uC608",
    NO: "\uC544\uB2C8\uC624",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "\uD604\uC7AC \uD30C\uC77C\uC744 \uC5F4\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    OPEN_OTHER_PROJECT: "\uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8 \uC5F4\uAE30",
    OPEN_OTHER_PROJECT_QUESTION: "\uC5F4\uB824\uB294 \uD30C\uC77C\uC740 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8 (%s)\uB97C \uC5F4\uC5B4\uC57C\uD569\uB2C8\uB2E4. \uD604\uC7AC \uD504\uB85C\uC81D\uD2B8\uB294 \uC885\uB8CC\uB429\uB2C8\uB2E4. \uACC4\uC18D \uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"
  };

  // ../lektor/translations/nl.json
  var nl_default = {
    RETURN_TO_WEBSITE: "Terug naar Website",
    UNLOAD_ACTIVE_TAB: "U hebt niet-opgeslagen data, weet je zeker dat je deze pagina wil verlaten?",
    EDIT_METADATA: "Bewerk Metadata",
    EDIT: "Bewerken",
    DELETE: "Verwijderen",
    PREVIEW: "Voorbeeld",
    ALTS: "Alternatieven",
    PRIMARY_ALT: "Primair",
    PRIMARY_OVERLAY: "Overlapt",
    ADD_CHILD_PAGE: "Pagina toevoegen",
    ADD_ATTACHMENT: "Bijlage toevoegen",
    ATTACHMENT_ACTIONS: "Bijlage Acties",
    PAGE_ACTIONS: "Pagina Acties",
    NO_CHILD_PAGES: "Geen Subpagina's",
    CHILD_PAGES: "Subpagina's",
    NO_ATTACHMENTS: "Geen bijlages",
    ATTACHMENTS: "Bijlages",
    ADD_ATTACHMENT_TO: "Voeg bijlage toe aan \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Je kan hier een nieuwe bijlage uploaden.",
    UPLOAD: "Upload",
    PROGRESS: "Vooruitgang",
    ERROR_PREFIX: "Fout: ",
    ERROR_NO_ID_PROVIDED: "Geen ID gegeven.",
    ERROR_PAGE_ID_DUPLICATE: "Een pagina met deze ID (%s) bestaat al.",
    ERROR_INVALID_ID: "Ongeldige ID",
    ERROR_INVALID_DATE: "Ongeldige datum",
    ERROR_INVALID_NUMBER: "Geen geldig getal",
    ERROR_INVALID_URL: "Geen geldige URL",
    ERROR: "Fout",
    ERROR_OCURRED: "Er is een fout opgetreden",
    ERROR_REQUEST_FAILED: "Kon het commando niet naar de server sturen. Misschien is de server gestopt of reageert deze niet?",
    ERROR_SERVER_UNAVAILABLE: "Server niet beschikbaar",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "De server reageert niet. Deze was gestopt of door een kritieke fout niet langer operationeel en moet worden herstart.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Voeg Subpagina toe aan \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "U kan hier een nieuwe subpagina toevoegen. Merk op dat het model of de ID achteraf niet makkelijk gewijzigd kunnen worden.",
    CREATE_CHILD_PAGE: "Subpagina Toevoegen",
    DELETE_ATTACHMENT_PROMPT: "Weet je zeker dat je deze bijlage wilt verwijderen?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Weet je zeker dat je de metadata van dit bijlage alternatief wilt verwijderen?",
    DELETE_PAGE_PROMPT: "Weet je zeker dat je deze pagina wilt verwijderen?",
    DELETE_PAGE_ALT_PROMPT: "Weet je zeker dat je dit alternatief wilt verwijderen?",
    DELETE_PAGE_CHILDREN_WARNING: "Dit zal ook de subpagina's van deze pagina verwijderen.",
    DELETE_RECORD: "Verwijder \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Verwijder ook de alternatieven en bijlages.",
    DELETE_ALL_ATTACHMENT_ALTS: "Verwijder alle alternatieven en bijlages.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Verwijder enkel de primaire record. Bijlages, alternatieven en subpagina's zullen niet verwijderd worden.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Verwijder enkel de metadata van de primaire record.",
    DELETE_PRIMARY_ALT_INFO: "Omdat dit record een primair alternatief is, kan het apart verwijderd worden of samen met alle andere inhoud.",
    CHILD_PAGES_TO_BE_DELETED: "Subpagina's die verwijderd zullen worden:",
    ALTS_TO_BE_DELETED: "Alternatieven die verwijderd zullen worden:",
    ATTACHMENTS_TO_BE_DELETED: "Bijlages die verwijderd zullen worden:",
    YES_DELETE: "Ja, verwijder",
    NO_CANCEL: "Nee, annuleer",
    SYSTEM_FIELDS: "Systeem Velden",
    EDIT_ATTACHMENT_METADATA_OF: "Bewerk Metadata van Bijlage \u201C%s\u201D",
    EDIT_PAGE_NAME: "Bewerk \u201C%s\u201D",
    SAVE_CHANGES: "Wijzigingen opslaan",
    BROWSE_FS: "Blader in Bestandsysteem",
    BROWSE_FS_MAC: "Bekijk in Finder",
    BROWSE_FS_WINDOWS: "Open in Explorer",
    ERROR_CANNOT_BROWSE_FS: "Fout: Bestand bestaat nog niet.",
    REMOVE_FLOWBLOCK_PROMPT: "Weet je zeker dat je dit blok wilt verwijderen?",
    ADD_FLOWBLOCK: "Blok Toevoegen",
    INVALID_INPUT: "Ongeldige Invoer",
    UP: "Omhoog",
    DOWN: "Omlaag",
    REMOVE: "Verwijderen",
    ID: "ID",
    CLOSE: "Sluiten",
    CANCEL: "Annuleren",
    BACK_TO_OVERVIEW: "Terug naar Overzicht",
    PUBLISH: "Publiceren",
    PUBLISH_NOTE: "Van hieruit kan je de huidige versie van je website publiceren.",
    PUBLISH_SERVER: "Doelserver",
    CURRENTLY_PUBLISHING: "Publiceren \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Gepubliceerd",
    PUBLISH_STATE_BUILDING: "De wijzigingen worden gebouwd ...",
    PUBLISH_STATE_PUBLISH: "De wijzigingen worden gepuliceerd ...",
    PUBLISH_STATE_DONE: "Klaar met publiceren.",
    FIND_FILES: "Zoek bestanden",
    FIND_FILES_PLACEHOLDER: "Vul paginanaam in ...",
    ATTACHMENT_TYPE: "Type Bijlage",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Verberg pagina",
    HIDE_PAGE_EXPLANATION: "Moet deze pagina verborgen zijn?",
    PAGE_IS_DISCOVERABLE: "Deze pagina is vindbaar",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Als dit ingeschakeld is, is de pagina vindbaar. Anders moet de URL bekend zijn.",
    REFRESH_BUILD: "Ververs Build",
    REFRESH_BUILD_NOTE: "Dit verwijdert alle buildresultaten in de cache en veroorzaakt een volledige rebuild. Dit is nuttig in bepaalde situaties waar synchonisatiefouten of fouten in de templates de uitvoer corrupt hebben gemaakt.",
    CURRENTLY_REFRESHING_BUILD: "Bezig met verversen van de build ...",
    REFRESHING_BUILD_DONE: "Klaar met de build te verversen!",
    FAILED_TO_LAUNCH_LEKTOR: "Het starten van Lektor is mislukt.",
    PROJECT: "Project",
    CLOSE_PROJECT: "Sluit Project",
    OPEN_PROJECT: "Open Project",
    BROWSE_WEBSITE: "Bekijk Website",
    VIEW_ADMIN_PANEL: "Bekijk Admin Paneel",
    QUIT: "Afsluiten",
    FAILED_TO_LOAD_PROJECT: "Laden van het project is mislukt :(",
    LOADING_PROJECT: "Project laden ...",
    INITIALIZING_LEKTOR: "Lektor Initializeren ...",
    QUIT_LEKTOR: "Lektor Afsluiten",
    FILE: "Bestand",
    UNDO: "Ongedaan maken",
    REDO: "Opnieuw",
    CUT: "Knippen",
    COPY: "Kopi\xEBren",
    PASTE: "Plakken",
    SELECT_ALL: "Selecteer alles",
    HELP: "Help",
    VISIT_WEBSITE: "Bezoek Website",
    INSTALL_SHELL_COMMAND: "Installeer Shell Commando",
    INSTALL_SHELL_COMMAND_QUESTION: "Weet je zeker dat je het 'lektor' shell commando wil installeren? Dit vereist admin rechten.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Installeren van de shell commando's mislukt.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell commando's zijn ge\xEFnstalleerd.",
    OPERATION_SUCCESS: "Success",
    YES: "Ja",
    NO: "Nee",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Kon het inhoudbestand niet openen",
    OPEN_OTHER_PROJECT: "Open ander Project",
    OPEN_OTHER_PROJECT_QUESTION: "Om deze file te openen moet een ander project geopend worden (%s). Het huidige project zal gesloten worden. Wil je verdergaan?"
  };

  // ../lektor/translations/pl.json
  var pl_default = {
    RETURN_TO_WEBSITE: "Wr\xF3\u0107 do strony",
    UNLOAD_ACTIVE_TAB: "Masz niezapisane dane, czy na pewno chcesz opu\u015Bci\u0107 t\u0105 stron\u0119 ?",
    EDIT_METADATA: "Edytuj dane",
    EDIT: "Edytuj",
    DELETE: "Usu\u0144",
    PREVIEW: "Podgl\u0105d",
    ALTS: "Wersje j\u0119zykowe",
    PRIMARY_ALT: "Podstawowy j\u0119zyk",
    PRIMARY_OVERLAY: "(Na\u0142o\u017Cony)",
    ADD_CHILD_PAGE: "Dodaj podstron\u0119",
    ADD_ATTACHMENT: "Dodaj za\u0142\u0105cznik",
    ATTACHMENT_ACTIONS: "Operacje na za\u0142\u0105cznikach",
    PAGE_ACTIONS: "Operacje na stronach",
    NO_CHILD_PAGES: "Brak podstron",
    CHILD_PAGES: "Podstrony",
    NO_ATTACHMENTS: "Brak za\u0142\u0105cznik\xF3w",
    ATTACHMENTS: "Za\u0142\u0105czniki",
    ADD_ATTACHMENT_TO: "Dodaj za\u0142\u0105cznik do \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Mo\u017Cesz wgra\u0107 nowy za\u0142\u0105cznik tutaj.",
    UPLOAD: "Wgraj",
    PROGRESS: "Post\u0119p",
    ERROR_PREFIX: "B\u0142\u0105d: ",
    ERROR_NO_ID_PROVIDED: "Nie podano ID.",
    ERROR_PAGE_ID_DUPLICATE: "Strona z ID: (%s) ju\u017C istnieje.",
    ERROR_INVALID_ID: "B\u0142\u0119dny ID",
    ERROR_INVALID_DATE: "B\u0142\u0119dna data",
    ERROR_INVALID_NUMBER: "B\u0142\u0119dny numer",
    ERROR_INVALID_URL: "B\u0142\u0119dny adres URL",
    ERROR: "B\u0142\u0105d",
    ERROR_OCURRED: "Wyst\u0105pi\u0142 b\u0142\u0105d",
    ERROR_REQUEST_FAILED: "Nie mo\u017Cna wys\u0142a\u0107 \u017C\u0105dania do serwera. Mo\u017Ce zosta\u0142 zatrzymany, albo nie odpowiada?",
    ERROR_SERVER_UNAVAILABLE: "Serwer niedost\u0119pny",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Serwer nie odpowiada. Zosta\u0142 zatrzymany, albo wyst\u0105pi\u0142 b\u0142\u0105d krytyczny, kt\xF3ry spowodowa\u0142 brak dzia\u0142ania. By\u0107 mo\u017Ce musi zosta\u0107 zrestartowany.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Dodaj podstron\u0119 do \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Mo\u017Cesz doda\u0107 podstron\u0119 tutaj. Pami\u0119taj, \u017Ce Model oraz ID nie mog\u0105 by\u0107 zmienione p\xF3\u017Aniej w prosty spos\xF3b.",
    CREATE_CHILD_PAGE: "Dodaj podstron\u0119",
    DELETE_ATTACHMENT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten za\u0142\u0105cznik?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 dane za\u0142\u0105cznika dla tego j\u0119zyka?",
    DELETE_PAGE_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 t\u0105 stron\u0119?",
    DELETE_PAGE_ALT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten j\u0119zyk?",
    DELETE_PAGE_CHILDREN_WARNING: "To spowoduje tak\u017Ce usuni\u0119cie wszystkich podstron.",
    DELETE_RECORD: "Skasuj \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Usu\u0144 r\xF3wnie\u017C wszystkie wersje j\u0119zykowe oraz za\u0142\u0105czniki.",
    DELETE_ALL_ATTACHMENT_ALTS: "Usu\u0144 wszystkie wersje j\u0119zykowe oraz za\u0142\u0105czony plik.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Usu\u0144 tylko podstawowy rekord.  Za\u0142\u0105czniki, wersje j\u0119zykowe oraz podstrony nie b\u0119d\u0119 usuni\u0119te.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Usu\u0144 tylko dane podstawowego rekordu.",
    DELETE_PRIMARY_ALT_INFO: "Poniewa\u017C ten rekord zawiera podstawow\u0105 wersj\u0119 j\u0119zykow\u0105 mo\u017Ce zosta\u0107 usuni\u0119ty osobno jak i razem z pozosta\u0142\u0105 zawarto\u015Bci\u0105.",
    CHILD_PAGES_TO_BE_DELETED: "Podstrony, kt\xF3re zostan\u0105 usuni\u0119te:",
    ALTS_TO_BE_DELETED: "Wersje j\u0119zykowe, kt\xF3re zostan\u0105 usuni\u0119te:",
    ATTACHMENTS_TO_BE_DELETED: "Za\u0142\u0105czniki, kt\xF3re zostan\u0105 usuni\u0119te:",
    YES_DELETE: "Tak, usu\u0144",
    NO_CANCEL: "Nie, anuluj",
    SYSTEM_FIELDS: "Pola Systemowe",
    EDIT_ATTACHMENT_METADATA_OF: "Edytuj dane za\u0142\u0105cznika \u201C%s\u201D",
    EDIT_PAGE_NAME: "Edytuj \u201C%s\u201D",
    SAVE_CHANGES: "Zapisz zmiany",
    BROWSE_FS: "Otw\xF3rz w przegl\u0105darce plik\xF3w",
    BROWSE_FS_MAC: "Otw\xF3rz w Finderze",
    BROWSE_FS_WINDOWS: "Otw\xF3rz w eksploratorze plik\xF3w",
    ERROR_CANNOT_BROWSE_FS: "B\u0142\u0105d: Plik jeszcze nie istnieje.",
    REMOVE_FLOWBLOCK_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten blok ?",
    ADD_FLOWBLOCK: "Dodaj blok",
    INVALID_INPUT: "B\u0142\u0119dne dane wej\u015Bciowe",
    UP: "W g\xF3r\u0119",
    DOWN: "W d\xF3\u0142",
    REMOVE: "Usu\u0144",
    ID: "ID",
    CLOSE: "Zamknij",
    CANCEL: "Anuluj",
    BACK_TO_OVERVIEW: "Powr\xF3t do przegl\u0105du",
    PUBLISH: "Publikuj",
    PUBLISH_NOTE: "St\u0105d mo\u017Cesz opublikowa\u0107 aktualn\u0105 wersj\u0119 strony.",
    PUBLISH_SERVER: "Serwer Docelowy",
    CURRENTLY_PUBLISHING: "Publikowanie \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Opublikowany",
    PUBLISH_STATE_BUILDING: "Zmiany s\u0105 wprowadzane ...",
    PUBLISH_STATE_PUBLISH: "Zmiany s\u0105 publikowane ...",
    PUBLISH_STATE_DONE: "Publikowanie zako\u0144czone.",
    FIND_FILES: "Znad\u017A Pliki",
    FIND_FILES_PLACEHOLDER: "Podaj nazw\u0119 strony ...",
    ATTACHMENT_TYPE: "Typ za\u0142\u0105cznika",
    URL_SLUG: "Przyjazny URL",
    TEMPLATE: "Szablon",
    HIDE_PAGE: "Ukryj stron\u0119",
    HIDE_PAGE_EXPLANATION: "Czy ta strona powinna by\u0107 ukryta?",
    PAGE_IS_DISCOVERABLE: "Strona jest 'widoczna'",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Je\u015Bli w\u0142\u0105czone, strona jest widoczna na li\u015Bcie stron oraz w listingu dla danego rekordu. W przeciwnym razie, adres URL musi by\u0107 znany",
    REFRESH_BUILD: "Zbuduj od\u015Bwie\u017Con\u0105 wersj\u0119",
    REFRESH_BUILD_NOTE: "To spowoduje usuni\u0119cie pami\u0119ci podr\u0119cznej i stworzenie wersji ko\u0144cowej od nowa. Ta opcja jest przydatna w sytuacjach, gdzie b\u0142\u0119dy albo pomy\u0142ki synchronizacji w szablonach spowodowa\u0142y uszkodzenie danych wyj\u015Bciowych.",
    CURRENTLY_REFRESHING_BUILD: "Aktualnie od\u015Bwie\u017Cam pakiet wyj\u015Bciowy ...",
    REFRESHING_BUILD_DONE: "Zako\u0144czono od\u015Bwie\u017Canie pakietu wyj\u015Bciowego!",
    FAILED_TO_LAUNCH_LEKTOR: "Nie uda\u0142o si\u0119 uruchomi\u0107 Lektor.",
    PROJECT: "Projekt",
    CLOSE_PROJECT: "Zamknij projekt",
    OPEN_PROJECT: "Otw\xF3rz projekt",
    BROWSE_WEBSITE: "Przegl\u0105daj stron\u0119",
    VIEW_ADMIN_PANEL: "Przejd\u017A do panelu administracyjnego",
    QUIT: "Wyjd\u017A",
    FAILED_TO_LOAD_PROJECT: "Nie uda\u0142o si\u0119 za\u0142adowa\u0107 projektu :(",
    LOADING_PROJECT: "\u0141adowanie projektu ...",
    INITIALIZING_LEKTOR: "Inicjalizacja Lektor ...",
    QUIT_LEKTOR: "Opu\u015B\u0107 Lektor",
    FILE: "Plik",
    UNDO: "Cofnij",
    REDO: "Pon\xF3w",
    CUT: "Wytnij",
    COPY: "Kopiuj",
    PASTE: "Wklej",
    SELECT_ALL: "Zaznacz wszystko",
    HELP: "Pomoc",
    VISIT_WEBSITE: "Odwied\u017A stron\u0119",
    INSTALL_SHELL_COMMAND: "Zainstaluj komend\u0119 pow\u0142oki",
    INSTALL_SHELL_COMMAND_QUESTION: "Czy chcesz zainstalowa\u0107 komend\u0119 'lektor' w pow\u0142oce systemowej? Wygamane s\u0105 uprawnienia administracyjne.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Nie uda\u0142o si\u0119 zainstalowa\u0107 komend w pow\u0142oce systemowej.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Komenda zosta\u0142a pomy\u015Blnie zainstalowana w pow\u0142oce systemowej.",
    OPERATION_SUCCESS: "Sukces",
    YES: "Tak",
    NO: "Nie",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Nie uda\u0142o si\u0119 otworzy\u0107 zawarto\u015Bci pliku",
    OPEN_OTHER_PROJECT: "Otw\xF3rz inny projekt",
    OPEN_OTHER_PROJECT_QUESTION: "Otwarcie tego pliku wymaga otwarcia kolejnego projektu (%s). Obecny projekt zostanie zamkni\u0119ty. Czy chcesz kontynuowa\u0107?"
  };

  // ../lektor/translations/pt.json
  var pt_default = {
    RETURN_TO_WEBSITE: "Retornar ao Site",
    UNLOAD_ACTIVE_TAB: "Voc\xEA tem modifica\xE7\xF5es n\xE3o salvas, tem certeza que deseja deixar a p\xE1gina?",
    EDIT_METADATA: "Editar Metadado",
    EDIT: "Editar",
    DELETE: "Deletar",
    PREVIEW: "Pr\xE9-visualizar",
    ALTS: "Alternativas",
    PRIMARY_ALT: "Prim\xE1ria",
    PRIMARY_OVERLAY: "Revestida",
    ADD_CHILD_PAGE: "Add P\xE1gina",
    ADD_ATTACHMENT: "Add Anexo",
    ATTACHMENT_ACTIONS: "A\xE7\xF5es de Anexos",
    PAGE_ACTIONS: "A\xE7\xF5es de P\xE1ginas",
    NO_CHILD_PAGES: "Sem sub-p\xE1ginas",
    CHILD_PAGES: "Sub-p\xE1ginas",
    NO_ATTACHMENTS: "Sem anexos",
    ATTACHMENTS: "Anexos",
    ADD_ATTACHMENT_TO: "Add anexo para \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Voc\xEA pode subir um novo anexo aqui.",
    UPLOAD: "Upload",
    PROGRESS: "Progresso",
    ERROR_PREFIX: "Erro: ",
    ERROR_NO_ID_PROVIDED: "Nenhuma ID fornecida.",
    ERROR_PAGE_ID_DUPLICATE: "Uma p\xE1gina com este ID (%s) j\xE1 existe.",
    ERROR_INVALID_ID: "ID inv\xE1lido",
    ERROR_INVALID_DATE: "Data inv\xE1lida",
    ERROR_INVALID_NUMBER: "N\xE3o \xE9 um n\xFAmero v\xE1lido",
    ERROR_INVALID_URL: "N\xE3o \xE9 uma URL v\xE1lida",
    ERROR: "Erro",
    ERROR_OCURRED: "Ocorreu um Erro",
    ERROR_REQUEST_FAILED: "N\xE3o foi poss\xEDvel enviar o comando ao servidor.  Talvez o servidor foi parado ou n\xE3o est\xE1 respondendo",
    ERROR_SERVER_UNAVAILABLE: "Servidor N\xE3o Dispon\xEDvel",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "O servidor n\xE3o est\xE1 respondendo.  Ou foi parado ou um erro s\xE9rio o fez parar e precisa ser reiniciado.",
    MODEL: "Modelo",
    ADD_CHILD_PAGE_TO: "Add Sub-p\xE1gina para \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Voc\xEA pode adicionar uma nova sub-p\xE1gina aqui.  Note que o modelo ou o ID n\xE3o podem ser mudados facilmente depois.",
    CREATE_CHILD_PAGE: "Add P\xE1gina Filha",
    DELETE_ATTACHMENT_PROMPT: "Voc\xEA tem certeza que deseja deletar este anexo?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Voc\xEA tem certeza que deseja deletar o metadado deste anexo alternativo?",
    DELETE_PAGE_PROMPT: "Voc\xEA tem certeza que deseja deletar esta p\xE1gina",
    DELETE_PAGE_ALT_PROMPT: "Voc\xEA tem certeza que deseja deletar esta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Isto tamb\xE9m deletar\xE1 as sub-p\xE1ginas filhas desta p\xE1gina.",
    DELETE_RECORD: "Deletar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Tamb\xE9m delete todas alternativas e arquivos de anexo.",
    DELETE_ALL_ATTACHMENT_ALTS: "Delete todas alternativas e arquivo de anexo",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Delete somente o registro prim\xE1rio.  Anexos, alternativas e sub-p\xE1ginas n\xE3o ser\xE3o deletadas.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Delete somente o Metadado do registro prim\xE1rio.",
    DELETE_PRIMARY_ALT_INFO: "Porque este registro \xE9 uma alternativa prim\xE1ria ele pode ser deletado separadamente ou junto com todos os outros conte\xFAdos.",
    CHILD_PAGES_TO_BE_DELETED: "Sub-p\xE1ginas que ser\xE3o deletadas:",
    ALTS_TO_BE_DELETED: "Alternativas que ser\xE3o deletadas:",
    ATTACHMENTS_TO_BE_DELETED: "Anexos que ser\xE3o deletados:",
    YES_DELETE: "Sim, deletar",
    NO_CANCEL: "N\xE3o, cancelar",
    SYSTEM_FIELDS: "Campos do Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar Metadado do Anexo \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Salvar Altera\xE7\xF5es",
    BROWSE_FS: "Navegar no Sistema",
    BROWSE_FS_MAC: "Mostrar no Finder",
    BROWSE_FS_WINDOWS: "Abrir no Explorer",
    ERROR_CANNOT_BROWSE_FS: "Erro: Arquivo n\xE3o existe ainda.",
    REMOVE_FLOWBLOCK_PROMPT: "Voc\xEA realmente deseja remover este bloco?",
    ADD_FLOWBLOCK: "Add Bloco",
    INVALID_INPUT: "Entrada Inv\xE1lida",
    UP: "Cima",
    DOWN: "Baixo",
    REMOVE: "Remover",
    ID: "ID",
    CLOSE: "Fechar",
    CANCEL: "Cancelar",
    BACK_TO_OVERVIEW: "Voltar para Overview",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Daqui voc\xEA pode publicar a vers\xE3o atual do website.",
    PUBLISH_SERVER: "Servidor Alvo",
    CURRENTLY_PUBLISHING: "Publicando \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Publicado",
    PUBLISH_STATE_BUILDING: "Mudan\xE7as est\xE3o sendo constru\xEDdas ...",
    PUBLISH_STATE_PUBLISH: "Mudan\xE7as est\xE3o sendo publicadas ...",
    PUBLISH_STATE_DONE: "Publica\xE7\xE3o feita.",
    FIND_FILES: "Procurar Arquivos",
    FIND_FILES_PLACEHOLDER: "Entrar com o nome da p\xE1gina ...",
    ATTACHMENT_TYPE: "Tipo de anexo",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Esconder p\xE1gina",
    HIDE_PAGE_EXPLANATION: "Isto deveria ser escondido?",
    PAGE_IS_DISCOVERABLE: "P\xE1gina \xE9 descobr\xEDvel",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Se isto estiver ativo a p\xE1gina pode ser descoberta, caso contr\xE1rio ser\xE1 necess\xE1rio saber a URL.",
    REFRESH_BUILD: "Atualizar Build",
    REFRESH_BUILD_NOTE: "Isto deleta todos os resultados de builds em cache ativando uma build do zero.  Isto \xE9 \xFAtil em situa\xE7\xF5es onde erros de sincroniza\xE7\xE3o ou erros no template causam sa\xEDdas corrompidas.",
    CURRENTLY_REFRESHING_BUILD: "No momento atualizando a build ...",
    REFRESHING_BUILD_DONE: "Atualiza\xE7\xE3o da build feita!",
    FAILED_TO_LAUNCH_LEKTOR: "Falha ao iniciar o Lektor.",
    PROJECT: "Projeto",
    CLOSE_PROJECT: "Fechar Projeto",
    OPEN_PROJECT: "Abrir Projeto",
    BROWSE_WEBSITE: "Navegar no Website",
    VIEW_ADMIN_PANEL: "Ver Admin Painel",
    QUIT: "Sair",
    FAILED_TO_LOAD_PROJECT: "Falha ao carregar o projeto :(",
    LOADING_PROJECT: "Carregando o projeto ...",
    INITIALIZING_LEKTOR: "Iniciando o Lektor ...",
    QUIT_LEKTOR: "Sair do Lektor",
    FILE: "Arquivo",
    UNDO: "Desfazer",
    REDO: "Refazer",
    CUT: "Cortar",
    COPY: "Copiar",
    PASTE: "Colar",
    SELECT_ALL: "Selecionar Todos",
    HELP: "Ajuda",
    VISIT_WEBSITE: "Visitar Website",
    INSTALL_SHELL_COMMAND: "Instalar Shell Command",
    INSTALL_SHELL_COMMAND_QUESTION: "Voc\xEA deseja instalar 'lektor' shell command? Isto requer permiss\xF5es de administrador.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Falha ao instalar shell commands.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell command foi instalado com sucesso.",
    OPERATION_SUCCESS: "Sucesso",
    YES: "Sim",
    NO: "N\xE3o",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Falha ao abrir o conte\xFAdo do arquivo",
    OPEN_OTHER_PROJECT: "Abrir outro Projeto",
    OPEN_OTHER_PROJECT_QUESTION: "Abrir este arquivo requer abrir outro projeto (%s). O projeto atual ser\xE1 fechado. Deseja continuar?"
  };

  // ../lektor/translations/ru.json
  var ru_default = {
    RETURN_TO_WEBSITE: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    UNLOAD_ACTIVE_TAB: "\u0412\u0430\u0448\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B. \u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u043E\u043A\u0438\u043D\u0443\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    EDIT_METADATA: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435",
    EDIT: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
    DELETE: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
    PREVIEW: "\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",
    ALTS: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",
    PRIMARY_ALT: "\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439",
    PRIMARY_OVERLAY: "\u041E\u0432\u0435\u0440\u043B\u0435\u0439",
    ADD_CHILD_PAGE: "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    ADD_ATTACHMENT: "\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B",
    ATTACHMENT_ACTIONS: "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C",
    PAGE_ACTIONS: "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435\u0439",
    NO_CHILD_PAGES: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442",
    CHILD_PAGES: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",
    NO_ATTACHMENTS: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442",
    ATTACHMENTS: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B",
    ADD_ATTACHMENT_TO: "\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B.",
    UPLOAD: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",
    PROGRESS: "\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",
    ERROR_PREFIX: "\u041E\u0448\u0438\u0431\u043A\u0430: ",
    ERROR_NO_ID_PROVIDED: "\u041E\u0448\u0438\u0431\u043A\u0430: \u041E\u0442\u0441\u0443\u0442\u0441\u0443\u0435\u0442 ID.",
    ERROR_PAGE_ID_DUPLICATE: "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0441 ID (%s) \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",
    ERROR_INVALID_ID: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 ID",
    ERROR_INVALID_DATE: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u0434\u0430\u0442\u0430",
    ERROR_INVALID_NUMBER: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E",
    ERROR_INVALID_URL: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 URL",
    ERROR: "\u041E\u0448\u0438\u0431\u043A\u0430",
    ERROR_OCURRED: "\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430",
    ERROR_REQUEST_FAILED: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.  \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0438\u043B\u0438 \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442.",
    ERROR_SERVER_UNAVAILABLE: "\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442. \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0438\u043B\u0438 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440.",
    MODEL: "\u041C\u043E\u0434\u0435\u043B\u044C",
    ADD_CHILD_PAGE_TO: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443. \u0418\u043C\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043E \u0432\u044B \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u0442\u0435 \u043B\u0435\u0433\u043A\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C \u0438 ID \u043F\u043E\u0441\u043B\u0435 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",
    CREATE_CHILD_PAGE: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    DELETE_ATTACHMENT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F?",
    DELETE_PAGE_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    DELETE_PAGE_ALT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B?",
    DELETE_PAGE_CHILDREN_WARNING: "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u0430 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441\u043E \u0432\u0441\u0435\u043C\u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u043C\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u043C\u0438.",
    DELETE_RECORD: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B.",
    DELETE_ALL_ATTACHMENT_ALTS: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E.  \u0412\u043B\u043E\u0436\u0435\u043D\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B, \u0444\u0430\u0439\u043B\u044B \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E.",
    DELETE_PRIMARY_ALT_INFO: "\u0414\u0430\u043D\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0430 \u043A\u0430\u043A \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E, \u0442\u0430\u043A \u0438 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441\u043E \u0432\u0441\u0435\u043C \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u044B\u043C.",
    CHILD_PAGES_TO_BE_DELETED: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    ALTS_TO_BE_DELETED: "\u0412\u0435\u0440\u0441\u0438\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    ATTACHMENTS_TO_BE_DELETED: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    YES_DELETE: "\u0414\u0430, \u0443\u0434\u0430\u043B\u0438\u0442\u044C",
    NO_CANCEL: "\u041E\u0442\u043C\u0435\u043D\u0430",
    SYSTEM_FIELDS: "\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u043F\u043E\u043B\u044F",
    EDIT_ATTACHMENT_METADATA_OF: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u201C%s\u201D",
    EDIT_PAGE_NAME: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u201C%s\u201D",
    SAVE_CHANGES: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F",
    BROWSE_FS: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0432 \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u0435",
    BROWSE_FS_MAC: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 Finder",
    BROWSE_FS_WINDOWS: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u041E\u0431\u043E\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043B\u0435",
    ERROR_CANNOT_BROWSE_FS: "\u041E\u0448\u0438\u0431\u043A\u0430: \u0424\u0430\u0439\u043B \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",
    REMOVE_FLOWBLOCK_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0431\u043B\u043E\u043A?",
    ADD_FLOWBLOCK: "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u043B\u043E\u043A",
    INVALID_INPUT: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0432\u0432\u043E\u0434",
    UP: "\u0412\u0432\u0435\u0440\u0445",
    DOWN: "\u0412\u043D\u0438\u0437",
    REMOVE: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
    ID: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 (ID)",
    CLOSE: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
    CANCEL: "\u041E\u0442\u043C\u0435\u043D\u0430",
    BACK_TO_OVERVIEW: "\u041D\u0430 \u0441\u0442\u0430\u0440\u0442\u043E\u0432\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    PUBLISH: "\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C",
    PUBLISH_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430.",
    PUBLISH_SERVER: "\u0421\u0435\u0440\u0432\u0435\u0440",
    CURRENTLY_PUBLISHING: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u2026",
    STATE: "\u0421\u0442\u0430\u0442\u0443\u0441",
    PUBLISH_DONE: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",
    PUBLISH_STATE_BUILDING: "\u0421\u0431\u043E\u0440\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ...",
    PUBLISH_STATE_PUBLISH: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ...",
    PUBLISH_STATE_DONE: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430.",
    FIND_FILES: "\u041F\u043E\u0438\u0441\u043A \u0444\u0430\u0439\u043B\u0430",
    FIND_FILES_PLACEHOLDER: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B ...",
    ATTACHMENT_TYPE: "\u0422\u0438\u043F \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F",
    URL_SLUG: "\u041A\u0440\u0430\u0442\u043A\u0438\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0434\u043B\u044F URL",
    TEMPLATE: "\u0428\u0430\u0431\u043B\u043E\u043D",
    HIDE_PAGE: "\u0421\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    HIDE_PAGE_EXPLANATION: "\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    REFRESH_BUILD: "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0431\u043E\u0440\u043A\u0443",
    REFRESH_BUILD_NOTE: "\u0412 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044F\u0445 \u0431\u044B\u0432\u0430\u0435\u0442 \u043F\u043E\u043B\u0435\u0437\u043D\u043E \u0437\u0430\u043D\u043E\u0432\u043E \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430: \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u0451\u043B \u0441\u0431\u043E\u0439 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u043E\u0448\u0438\u0431\u043A\u0430 \u0432 \u0448\u0430\u0431\u043B\u043E\u043D\u0435 \u043F\u0440\u0438\u0432\u0435\u043B\u0430 \u043A \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u043C\u0443 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044E \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430.",
    CURRENTLY_REFRESHING_BUILD: "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u043E\u0440\u043A\u0438 ...",
    REFRESHING_BUILD_DONE: "\u0421\u0431\u043E\u0440\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430!",
    FAILED_TO_LAUNCH_LEKTOR: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C Lektor.",
    PROJECT: "\u041F\u0440\u043E\u0435\u043A\u0442",
    CLOSE_PROJECT: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442",
    OPEN_PROJECT: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442",
    BROWSE_WEBSITE: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    VIEW_ADMIN_PANEL: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0430\u0434\u043C\u0438\u043D-\u043F\u0430\u043D\u0435\u043B\u044C",
    QUIT: "\u0412\u044B\u0439\u0442\u0438",
    FAILED_TO_LOAD_PROJECT: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442 :(",
    LOADING_PROJECT: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 ...",
    INITIALIZING_LEKTOR: "\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F Lektor ...",
    QUIT_LEKTOR: "\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 Lektor",
    FILE: "\u0424\u0430\u0439\u043B",
    UNDO: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",
    REDO: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",
    CUT: "\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C",
    COPY: "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
    PASTE: "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C",
    SELECT_ALL: "\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0432\u0441\u0451",
    HELP: "\u041F\u043E\u043C\u043E\u0449\u044C",
    VISIT_WEBSITE: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    INSTALL_SHELL_COMMAND: "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430",
    INSTALL_SHELL_COMMAND_QUESTION: "\u0412\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 'lektor' \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430? \u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B \u043F\u0440\u0430\u0432\u0430 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430.",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430 \u0431\u044B\u043B\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430.",
    OPERATION_SUCCESS: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E",
    YES: "\u0414\u0430",
    NO: "\u041D\u0435\u0442",
    OK: "\u041E\u041A"
  };

  // ../lektor/translations/tr.json
  var tr_default = {
    RETURN_TO_WEBSITE: "Web sitesine d\xF6n",
    UNLOAD_ACTIVE_TAB: "Kaydedilmemi\u015F bilgileriniz var, bu sayfadan \xE7\u0131kmak istedi\u011Finize emin misiniz?",
    EDIT_METADATA: "Metadatay\u0131 d\xFCzenle",
    EDIT: "D\xFCzenle",
    DELETE: "Sil",
    PREVIEW: "G\xF6r\xFCnt\xFCle",
    ALTS: "Alternatifler",
    PRIMARY_ALT: "Birincil",
    PRIMARY_OVERLAY: "\xD6rten",
    ADD_CHILD_PAGE: "Sayfa ekle",
    ADD_ATTACHMENT: "Ek ekle",
    ATTACHMENT_ACTIONS: "Ek \u0130\u015Flemleri",
    PAGE_ACTIONS: "Sayfa \u0130\u015Flemleri",
    NO_CHILD_PAGES: "Altsayfa yok",
    CHILD_PAGES: "Altsayfalar",
    NO_ATTACHMENTS: "Ek yok",
    ATTACHMENTS: "Ekler",
    ADD_ATTACHMENT_TO: "\u201C%s\u201D i\xE7eri\u011Fine ek ekle",
    ADD_ATTACHMENT_NOTE: "Buraya yeni bir ek y\xFCkleyebilirsiniz.",
    UPLOAD: "Y\xFCkle",
    PROGRESS: "\u0130lerleme",
    ERROR_PREFIX: "Hata: ",
    ERROR_NO_ID_PROVIDED: "\u0130sim verilmemi\u015F.",
    ERROR_PAGE_ID_DUPLICATE: "Bu isme (%s) sahip bir i\xE7erik zaten var.",
    ERROR_INVALID_ID: "Ge\xE7ersiz isim",
    ERROR_INVALID_DATE: "Ge\xE7ersiz tarih",
    ERROR_INVALID_NUMBER: "Ge\xE7ersiz say\u0131",
    ERROR_INVALID_URL: "Ge\xE7ersiz URL",
    ERROR: "Hata",
    ERROR_OCURRED: "Bir hata olu\u015Ftu",
    ERROR_REQUEST_FAILED: "Sunucuya komut g\xF6nderilemedi.  Sunucunuz durmu\u015F ya da tak\u0131lm\u0131\u015F olabilir mi?",
    ERROR_SERVER_UNAVAILABLE: "Sunucuya eri\u015Filemiyor",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Sunucu yan\u0131t vermiyor.  Sunucu ya durmu\u015F ya da kritik bir hata nedeniyle i\u015Flemiyor ve yeniden ba\u015Flat\u0131lmas\u0131 gerekiyor.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D i\xE7eri\u011Fine altsayfa ekle",
    ADD_CHILD_PAGE_NOTE: "Burada sayfaya bir altsayfa ekleyebilirsiniz.  Modeli ve ismi sonradan de\u011Fi\u015Ftirmenin kolay olmayaca\u011F\u0131n\u0131 akl\u0131n\u0131zda bulundurun.",
    CREATE_CHILD_PAGE: "\xC7ocuk sayfa ekle",
    DELETE_ATTACHMENT_PROMPT: "Bu eki silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Bu ek alternatifinin metadatas\u0131n\u0131 silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_PROMPT: "Bu sayfay\u0131 silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_ALT_PROMPT: "Bu alternatifi silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_CHILDREN_WARNING: "Bu i\u015Flem bu sayfan\u0131n altsayfalar\u0131n\u0131 da silecek.",
    DELETE_RECORD: "\u201C%s\u201D i\xE7eri\u011Fini sil",
    DELETE_ALL_PAGE_ALTS: "B\xFCt\xFCn alternatifleri ve eklenmi\u015F dosyalar\u0131 da sil.",
    DELETE_ALL_ATTACHMENT_ALTS: "B\xFCt\xFCn alternatifleri ve eklenmi\u015F dosyay\u0131 sil.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Yaln\u0131zca birincil kayd\u0131 sil.  Ekler, alternatifler ve altsayfalar silinmeyecek.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Only delete the Metadata of the primary record.",
    DELETE_PRIMARY_ALT_INFO: "Bu kay\u0131t birincil alternatif oldu\u011Fundan b\xFCt\xFCn di\u011Fer i\xE7eriklerden ayr\u0131 ya da onlarla beraber silinebilir.",
    CHILD_PAGES_TO_BE_DELETED: "Silinecek altsayfalar:",
    ALTS_TO_BE_DELETED: "Silinecek alternatifler:",
    ATTACHMENTS_TO_BE_DELETED: "Silinecek ekler:",
    YES_DELETE: "Evet, sil",
    NO_CANCEL: "Hay\u0131r, vazge\xE7",
    SYSTEM_FIELDS: "Sistem Alanlar\u0131",
    EDIT_ATTACHMENT_METADATA_OF: "\u201C%s\u201D ekinini metadatas\u0131n\u0131 d\xFCzenle",
    EDIT_PAGE_NAME: "\u201C%s\u201D i\xE7eri\u011Fini d\xFCzenle",
    SAVE_CHANGES: "De\u011Fi\u015Fiklikleri kaydet",
    BROWSE_FS: "Dosya sisteminde g\xF6z at",
    BROWSE_FS_MAC: "Finder uygulamas\u0131nda g\xF6ster",
    BROWSE_FS_WINDOWS: "Explorer uygulamas\u0131nda a\xE7",
    ERROR_CANNOT_BROWSE_FS: "Hata: Dosya hen\xFCz yok.",
    REMOVE_FLOWBLOCK_PROMPT: "Bu blo\u011Fu silmeyi ger\xE7ekten istiyor musunuz?",
    ADD_FLOWBLOCK: "Blok ekle",
    INVALID_INPUT: "Ge\xE7ersiz girdi",
    UP: "Yukar\u0131",
    DOWN: "A\u015Fa\u011F\u0131",
    REMOVE: "Kald\u0131r",
    ID: "\u0130sim",
    CLOSE: "Kapat",
    CANCEL: "Vazge\xE7",
    BACK_TO_OVERVIEW: "Genel bak\u0131\u015Fa geri d\xF6n",
    PUBLISH: "Yay\u0131mla",
    PUBLISH_NOTE: "Buradan web sitesinin \u015Fu anki halini yay\u0131mlayabilirsiniz.",
    PUBLISH_SERVER: "Hedef Sunucu",
    CURRENTLY_PUBLISHING: "Yay\u0131mlan\u0131yor\u2026",
    STATE: "Durum",
    PUBLISH_DONE: "Yay\u0131mland\u0131",
    PUBLISH_STATE_BUILDING: "\xC7\u0131kt\u0131 de\u011Fi\u015Fiklikleri uygulan\u0131yor...",
    PUBLISH_STATE_PUBLISH: "De\u011Fi\u015Fiklikler yay\u0131mlan\u0131yor...",
    PUBLISH_STATE_DONE: "Yay\u0131mlanma bitti.",
    FIND_FILES: "Dosya bul",
    FIND_FILES_PLACEHOLDER: "Sayfa ad\u0131 yaz\u0131n...",
    ATTACHMENT_TYPE: "Ek tipi",
    URL_SLUG: "URL ismi",
    TEMPLATE: "\u015Eablon",
    HIDE_PAGE: "Sayfay\u0131 gizle",
    HIDE_PAGE_EXPLANATION: "Bu sayfa gizlensin mi?",
    PAGE_IS_DISCOVERABLE: "Sayfa sorgularda listelenir",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Bu se\xE7iliyse sayfa sorguyla bulunabilir; aksi halde URL adresinin bilinmesi gerekir.",
    REFRESH_BUILD: "\xC7\u0131kt\u0131y\u0131 tazele",
    REFRESH_BUILD_NOTE: "Bu i\u015Flem \xFCretilmi\u015F b\xFCt\xFCn \xE7\u0131kt\u0131y\u0131 siler ve s\u0131f\u0131rdan yeni \xE7\u0131kt\u0131 \xFCretilmesini tetikler.  Senkronizasyon sorunlar\u0131 ve \u015Fablonlardaki hatalar gibi nedenlerle \xE7\u0131kt\u0131n\u0131n bozulmas\u0131 durumlar\u0131nda yararl\u0131 olur.",
    CURRENTLY_REFRESHING_BUILD: "\xC7\u0131kt\u0131 tazeleniyor...",
    REFRESHING_BUILD_DONE: "\xC7\u0131kt\u0131n\u0131n tazelenmesi bitti!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor ba\u015Flat\u0131lamad\u0131.",
    PROJECT: "Proje",
    CLOSE_PROJECT: "Projeyi kapa",
    OPEN_PROJECT: "Projeyi a\xE7",
    BROWSE_WEBSITE: "Siteye g\xF6z at",
    VIEW_ADMIN_PANEL: "Y\xF6netim panelini g\xF6ster",
    QUIT: "\xC7\u0131k",
    FAILED_TO_LOAD_PROJECT: "Proje y\xFCklenemedi :(",
    LOADING_PROJECT: "Proje y\xFCkleniyor...",
    INITIALIZING_LEKTOR: "Lektor ba\u015Flat\u0131l\u0131yor...",
    QUIT_LEKTOR: "Lektor'dan \xE7\u0131k",
    FILE: "Dosya",
    UNDO: "Yinele",
    REDO: "Geri al",
    CUT: "Kes",
    COPY: "Kopyala",
    PASTE: "Yap\u0131\u015Ft\u0131r",
    SELECT_ALL: "Hepsini se\xE7",
    HELP: "Yard\u0131m",
    VISIT_WEBSITE: "Siteye git",
    INSTALL_SHELL_COMMAND: "Shell komutunu kur",
    INSTALL_SHELL_COMMAND_QUESTION: "'lektor' shell komutunu kurmak istiyor musunuz? Bu i\u015Flem y\xF6netici yetkisi gerektirir.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Shell komutu kurulamad\u0131.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell komutu ba\u015Far\u0131yla kuruldu.",
    OPERATION_SUCCESS: "Ba\u015Far\u0131l\u0131",
    YES: "Evet",
    NO: "Hay\u0131r",
    OK: "Tamam",
    FAILED_TO_OPEN_CONTENT_FILE: "\u0130\xE7erik dosyas\u0131 a\xE7\u0131lamad\u0131",
    OPEN_OTHER_PROJECT: "Ba\u015Fka proje a\xE7",
    OPEN_OTHER_PROJECT_QUESTION: "Bu dosyan\u0131n a\xE7\u0131lmas\u0131 ba\u015Fka bir projenin (%s) a\xE7\u0131lmas\u0131n\u0131 gerektiriyor. \u015Eu anki proje kapat\u0131lacak. Devam etmek istiyor musunuz?",
    COLLAPSE: "Daralt",
    EXPAND: "Geni\u015Flet",
    TRISTATE_CHECKBOX_TOOLTIP: "\xDC\xE7 durumlu kutucuk: ayarlanmam\u0131\u015F durumuna d\xF6nd\xFCrmek i\xE7in <del> ya da <backspace> tu\u015Flar\u0131na bas\u0131n",
    AUTOSIZE_TEXTAREA: "Metin alan\u0131 boyutlar\u0131n\u0131 otomatik ayarla",
    SHRINK_TEXTAREA: "Metin alan\u0131n\u0131 ufalt",
    PREFERENCES: "Tercihler",
    RESET: "Ba\u015Ftan al",
    RESET_TO_DEFAULTS: "Varsay\u0131lan de\u011Ferlerine d\xF6nd\xFCr",
    EDIT_SHORTCUT: "D\xFCzenle",
    SAVE_SHORTCUT: "Kaydet",
    PREVIEW_SHORTCUT: "(Kaydet ve) G\xF6r\xFCnt\xFCle",
    SEARCH_SHORTCUT: "Ara"
  };

  // ../lektor/translations/zh.json
  var zh_default = {
    RETURN_TO_WEBSITE: "\u56DE\u5230\u7DB2\u9801",
    UNLOAD_ACTIVE_TAB: "\u4F60\u9084\u6709\u672A\u5132\u5B58\u7684\u8CC7\u8A0A\uFF0C\u78BA\u5B9A\u8981\u96E2\u958B\u9019\u500B\u9801\u9762\uFF1F",
    EDIT_METADATA: "\u7DE8\u8F2F\u5143\u8CC7\u6599",
    EDIT: "\u7DE8\u8F2F",
    DELETE: "\u522A\u9664",
    PREVIEW: "\u9810\u89BD",
    ALTS: "\u526F\u8A9E",
    PRIMARY_ALT: "\u4E3B\u8A9E",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "\u65B0\u589E\u9801\u9762",
    ADD_ATTACHMENT: "\u65B0\u589E\u9644\u4EF6",
    ATTACHMENT_ACTIONS: "\u9644\u4EF6\u884C\u70BA",
    PAGE_ACTIONS: "\u9801\u9762\u884C\u70BA",
    NO_CHILD_PAGES: "\u6C92\u6709\u9644\u4EF6",
    CHILD_PAGES: "\u5B50\u9801\u9762",
    NO_ATTACHMENTS: "\u6C92\u6709\u9644\u4EF6",
    ATTACHMENTS: "\u9644\u4EF6",
    ADD_ATTACHMENT_TO: "\u65B0\u589E\u9644\u4EF6\u5230\u300C%s\u300D",
    ADD_ATTACHMENT_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u4E0A\u50B3\u65B0\u7684\u9644\u4EF6\u3002",
    UPLOAD: "\u4E0A\u50B3",
    PROGRESS: "\u9032\u5EA6",
    ERROR_PREFIX: "\u932F\u8AA4\uFF1A",
    ERROR_NO_ID_PROVIDED: "\u932F\u8AA4\uFF1A\u6C92\u6709\u63D0\u4F9BID\u3002",
    ERROR_PAGE_ID_DUPLICATE: "\u5DF2\u7D93\u6709\u9801\u9762\u7684ID\u8DDF\u9019\u500BID\uFF08%s\uFF09\u4E00\u6A23\u4E86\u3002",
    ERROR_INVALID_ID: "\u7121\u6548\u7684ID",
    ERROR_INVALID_DATE: "\u7121\u6548\u7684\u65E5\u671F",
    ERROR_INVALID_NUMBER: "\u7121\u6548\u7684\u6578\u5B57",
    ERROR_INVALID_URL: "\u7121\u6548\u7684URL",
    ERROR: "\u932F\u8AA4",
    ERROR_OCURRED: "\u767C\u751F\u932F\u8AA4",
    ERROR_REQUEST_FAILED: "\u7121\u6CD5\u50B3\u9001\u6307\u4EE4\u5230\u4F3A\u670D\u5668\uFF0C\u53EF\u80FD\u5B83\u88AB\u95DC\u4E86\u6216\u6C92\u56DE\u61C9\uFF1F",
    ERROR_SERVER_UNAVAILABLE: "\u4F3A\u670D\u5668\u639B\u6389\u4E86",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u4F3A\u670D\u5668\u76EE\u524D\u6C92\u56DE\u61C9\uFF0C\u5B83\u53EF\u80FD\u5DF2\u88AB\u95DC\u9589\u6216\u662F\u9047\u5230\u56B4\u91CD\u932F\u8AA4\u5C0E\u81F4\u7121\u6CD5\u904B\u4F5C\uFF0C\u4F3A\u670D\u5668\u9700\u8981\u91CD\u65B0\u555F\u52D5\u3002",
    MODEL: "\u6A21\u578B",
    ADD_CHILD_PAGE_TO: "\u65B0\u589E\u5B50\u9762\u9801\u5230 \u300C%s\u300D",
    ADD_CHILD_PAGE_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u52A0\u5165\u65B0\u7684\u5B50\u9801\u9762\uFF0C\u6CE8\u610F\u6A21\u578B\u53CAID\u4E4B\u5F8C\u7121\u6CD5\u8F15\u6613\u66F4\u6539\u3002",
    CREATE_CHILD_PAGE: "\u65B0\u589E\u5B50\u9801\u9762",
    DELETE_ATTACHMENT_PROMPT: "\u771F\u7684\u8981\u522A\u9664\u9019\u500B\u9644\u4EF6\uFF1F",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u4F60\u771F\u7684\u60F3\u522A\u9664\u9019\u500B\u526F\u8A9E\u9644\u4EF6\u7684\u5143\u8CC7\u6599\u55CE\uFF1F",
    DELETE_PAGE_PROMPT: "\u771F\u7684\u8981\u522A\u9664\u9019\u500B\u9801\u9762\uFF1F",
    DELETE_PAGE_ALT_PROMPT: "\u4F60\u771F\u7684\u60F3\u522A\u9664\u9019\u500B\u5206\u652F\u55CE\uFF1F",
    DELETE_PAGE_CHILDREN_WARNING: "\u9019\u4E5F\u6703\u628A\u9019\u500B\u9801\u9762\u7684\u5B50\u9801\u9762\u522A\u9664\u3002",
    DELETE_RECORD: "\u522A\u9664\u300C%s\u300D",
    DELETE_ALL_PAGE_ALTS: "\u9806\u4FBF\u522A\u9664\u6240\u6709\u526F\u8A9E\u53CA\u9644\u52A0\u6A94\u6848\u3002",
    DELETE_ALL_ATTACHMENT_ALTS: "\u522A\u9664\u6240\u6709\u526F\u8A9E\u53CA\u9644\u52A0\u6A94\u6848\u3002",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u53EA\u522A\u9664\u4E3B\u8A9E\u7684\u7D00\u9304\uFF0C\u9644\u4EF6\u3001\u526F\u8A9E\u3001\u53CA\u5B50\u9801\u9762\u4E0D\u6703\u88AB\u522A\u9664\u3002",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u53EA\u522A\u9664\u4E3B\u8A9E\u7D00\u9304\u7684\u5143\u8CC7\u6599\u3002",
    DELETE_PRIMARY_ALT_INFO: "\u4E3B\u8A9E\u53EF\u4EE5\u88AB\u55AE\u7368\u522A\u9664\uFF0C\u6216\u662F\u9023\u540C\u526F\u8A9E\u4E00\u8D77\u522A\u9664\u3002",
    CHILD_PAGES_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u5B50\u9801\u9762\uFF1A",
    ALTS_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u526F\u8A9E\uFF1A",
    ATTACHMENTS_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u9644\u4EF6\uFF1A",
    YES_DELETE: "\u5C0D\uFF0C\u5C31\u662F\u8981\u628A\u5B83\u522A\u6389\uFF01",
    NO_CANCEL: "\u9084\u662F\u4E0D\u8981\u597D\u4E86...",
    SYSTEM_FIELDS: "\u7CFB\u7D71\u6B04\u4F4D",
    EDIT_ATTACHMENT_METADATA_OF: "\u7DE8\u8F2F\u9644\u4EF6\u300C%s\u300D\u7684\u5143\u8CC7\u6599",
    EDIT_PAGE_NAME: "\u7DE8\u8F2F\u300C%s\u300D",
    SAVE_CHANGES: "\u5132\u5B58\u8B8A\u66F4",
    BROWSE_FS: "\u7528\u6587\u4EF6\u7CFB\u7D71\u958B\u555F",
    BROWSE_FS_MAC: "\u7528Finder\u958B\u555F",
    BROWSE_FS_WINDOWS: "\u7528\u6A94\u6848\u7E3D\u7BA1\u958B\u555F",
    ERROR_CANNOT_BROWSE_FS: "\u932F\u8AA4\uFF1A\u6A94\u6848\u9084\u6C92\u6709\u5B58\u5728\u3002",
    REMOVE_FLOWBLOCK_PROMPT: "\u4F60\u771F\u7684\u8981\u522A\u6389\u9019\u500B\u5340\u584A\uFF1F",
    ADD_FLOWBLOCK: "\u65B0\u589E\u5340\u584A",
    INVALID_INPUT: "\u7121\u6548\u7684\u8F38\u5165",
    UP: "\u4E0A",
    DOWN: "\u4E0B",
    REMOVE: "\u79FB\u9664",
    ID: "ID",
    CLOSE: "\u95DC\u9589",
    CANCEL: "\u53D6\u6D88",
    BACK_TO_OVERVIEW: "\u56DE\u5230\u7E3D\u89BD",
    PUBLISH: "\u767C\u4F48",
    PUBLISH_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u767C\u4F48\u7DB2\u7AD9\u76EE\u524D\u7684\u7248\u672C\u3002",
    PUBLISH_SERVER: "\u76EE\u6A19\u4F3A\u670D\u5668",
    CURRENTLY_PUBLISHING: "\u767C\u4F48\u4E2D...",
    STATE: "\u72C0\u614B",
    PUBLISH_DONE: "\u5DF2\u767C\u4F48",
    PUBLISH_STATE_BUILDING: "\u6B63\u5728\u5EFA\u7F6E\u8B8A\u66F4...",
    PUBLISH_STATE_PUBLISH: "\u6B63\u5728\u767C\u4F48\u8B8A\u66F4...",
    PUBLISH_STATE_DONE: "\u767C\u4F48\u5B8C\u6210\u3002",
    FIND_FILES: "\u641C\u5C0B\u6A94\u6848",
    FIND_FILES_PLACEHOLDER: "\u8F38\u5165\u9801\u9762\u540D\u7A31...",
    ATTACHMENT_TYPE: "\u9644\u4EF6\u985E\u578B",
    URL_SLUG: "URL\u7E2E\u7565\u540D",
    TEMPLATE: "\u6A21\u677F",
    HIDE_PAGE: "\u96B1\u85CF\u9801\u9762",
    HIDE_PAGE_EXPLANATION: "\u8981\u96B1\u85CF\u9019\u500B\u9801\u9762\u55CE\uFF1F",
    PAGE_IS_DISCOVERABLE: "\u7DB2\u9801\u53EF\u4EE5\u88AB\u767C\u73FE",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\u82E5\u555F\u7528\u5247\u9019\u500B\u9801\u9762\u53EF\u4EE5\u88AB\u767C\u73FE\uFF0C\u5426\u5247\u5FC5\u9808\u77E5\u9053URL\u624D\u80FD\u9023\u7D50\u5230\u9019\u88E1\u3002",
    REFRESH_BUILD: "\u91CD\u65B0\u6574\u7406\u5EFA\u7F6E",
    REFRESH_BUILD_NOTE: "\u9019\u6703\u522A\u6389\u6240\u6709\u7DE9\u5B58\u7684\u5EFA\u7F6E\u7D50\u679C\u4E26\u5C0E\u81F4\u91CD\u65B0\u7F6E\u5EFA\u3002\u9019\u5728\u7279\u6B8A\u60C5\u6CC1\uFF08\u5982\u540C\u6B65\u932F\u8AA4\u3001\u6A21\u677F\u51FA\u932F\u7B49\uFF09\u4E0B\u6703\u6709\u7528\u3002",
    CURRENTLY_REFRESHING_BUILD: "\u5237\u65B0\u5EFA\u7F6E\u4E2D...",
    REFRESHING_BUILD_DONE: "\u5B8C\u6210\u5237\u65B0\u5EFA\u7F6E\uFF01",
    FAILED_TO_LAUNCH_LEKTOR: "\u555F\u52D5Lektor\u5931\u6557\u3002",
    PROJECT: "\u5C08\u6848",
    CLOSE_PROJECT: "\u95DC\u9589\u5C08\u6848",
    OPEN_PROJECT: "\u958B\u555F\u5C08\u6848",
    BROWSE_WEBSITE: "\u700F\u89BD\u7DB2\u7AD9",
    VIEW_ADMIN_PANEL: "\u67E5\u770B\u7BA1\u7406\u54E1\u9762\u677F",
    QUIT: "\u96E2\u958B",
    FAILED_TO_LOAD_PROJECT: "\u8B80\u53D6\u5C08\u6848\u5931\u6557 QAQ",
    LOADING_PROJECT: "\u8B80\u53D6\u5C08\u6848\u4E2D...",
    INITIALIZING_LEKTOR: "\u521D\u59CB\u5316Lektor\u4E2D...",
    QUIT_LEKTOR: "\u96E2\u958BLektor",
    FILE: "\u6A94\u6848",
    UNDO: "\u5FA9\u539F",
    REDO: "\u91CD\u505A",
    CUT: "\u526A\u4E0B",
    COPY: "\u8907\u88FD",
    PASTE: "\u8CBC\u4E0A",
    SELECT_ALL: "\u5168\u9078",
    HELP: "\u8AAA\u660E",
    VISIT_WEBSITE: "\u53C3\u89C0\u7DB2\u7AD9",
    INSTALL_SHELL_COMMAND: "\u5B89\u88DD\u547D\u4EE4\u5217\u6A21\u5F0F",
    INSTALL_SHELL_COMMAND_QUESTION: "\u4F60\u60F3\u5B89\u88DDlektor\u547D\u4EE4\u5217\u6A21\u5F0F\u55CE\uFF1F \u9019\u9700\u8981\u7BA1\u7406\u54E1\u6B0A\u9650\u3002",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u5B89\u88DD\u547D\u4EE4\u5217\u6A21\u5F0F\u5931\u6557\u3002",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u547D\u4EE4\u5217\u6A21\u5F0F\u5B89\u88DD\u6210\u529F",
    OPERATION_SUCCESS: "\u6210\u529F",
    YES: "\u662F",
    NO: "\u5426",
    OK: "\u597D",
    FAILED_TO_OPEN_CONTENT_FILE: "\u958B\u555F\u6A94\u6848\u5931\u6557",
    OPEN_OTHER_PROJECT: "\u958B\u555F\u5176\u5B83\u5C08\u6848",
    OPEN_OTHER_PROJECT_QUESTION: "\u958B\u555F\u9019\u4EFD\u6A94\u6848\u9700\u8981\u9023\u540C\u958B\u555F\u53E6\u4E00\u500B\u5C08\u6848\uFF08%s\uFF09\uFF0C\u76EE\u524D\u7684\u5C08\u6848\u5C07\u6703\u88AB\u95DC\u9589\uFF0C\u78BA\u5B9A\u8981\u7E7C\u7E8C\uFF1F"
  };

  // js/i18n.tsx
  var translations = {
    ca: ca_default,
    de: de_default,
    en: en_default,
    es: es_default,
    fr: fr_default,
    it: it_default,
    ja: ja_default,
    ko: ko_default,
    nl: nl_default,
    pl: pl_default,
    pt: pt_default,
    ru: ru_default,
    tr: tr_default,
    zh: zh_default
  }, currentLanguage = "en", _a, currentTranslations = (_a = translations[currentLanguage]) != null ? _a : {};
  function setCurrentLanguage(lang) {
    currentLanguage = lang, currentTranslations = translations[currentLanguage];
  }
  function getCurrentLanguge() {
    return currentLanguage;
  }
  function trans(key) {
    var _a2;
    return (_a2 = currentTranslations[key]) != null ? _a2 : key;
  }
  function trans_obj(translation_object) {
    var _a2, _b;
    return (_b = (_a2 = translation_object[currentLanguage]) != null ? _a2 : translation_object.en) != null ? _b : "";
  }
  function trans_fallback(translation_object, fallback) {
    return translation_object && trans_obj(translation_object) || fallback;
  }
  function trans_format(key, replacement) {
    return trans(key).replace("%s", replacement);
  }

  // js/context/record-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react = __toESM(require_react()), RecordContext = (0, import_react.createContext)({
    path: "/",
    alt: "_primary"
  });
  function useRecord() {
    return (0, import_react.useContext)(RecordContext);
  }
  function useRecordAlt() {
    return useRecord().alt;
  }
  function useRecordPath() {
    return useRecord().path;
  }

  // js/views/App.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react58 = __toESM(require_react());

  // js/header/Header.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react7 = __toESM(require_react());

  // js/header/BreadCrumbs.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react5 = __toESM(require_react());

  // js/fetch.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var FetchError = class extends Error {
    constructor(code) {
      super();
      this.code = code;
    }
  };
  function handleJSON(response) {
    if (!response.ok)
      throw new FetchError("REQUEST_FAILED");
    return response.json();
  }
  var credentials = "same-origin", headers = { "Content-Type": "application/json" };
  function fetchJSON(input, method, json) {
    let init = json === void 0 ? { credentials, method } : { credentials, method, headers, body: JSON.stringify(json) };
    return fetch(input, init).then(handleJSON);
  }
  function apiUrl(endpoint, params) {
    let url = `${$LEKTOR_CONFIG.admin_root}/api${endpoint}`;
    if (params) {
      let urlParams = new URLSearchParams();
      return Object.entries(params).forEach(([key, value]) => {
        urlParams.set(key, value);
      }), `${url}?${urlParams.toString()}`;
    }
    return url;
  }
  function get(endpoint, params) {
    let url = apiUrl(endpoint, params);
    return fetchJSON(url, "GET");
  }
  function post(endpoint, params, json) {
    let url = apiUrl(endpoint, params);
    return fetchJSON(url, "POST", json);
  }
  function put(endpoint, json) {
    let url = apiUrl(endpoint);
    return fetchJSON(url, "PUT", json);
  }

  // js/error-dialog.ts
  init_define_SVG_ICONS_FONTAWESOME();

  // js/events.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function dispatch(type, detail) {
    document.dispatchEvent(new CustomEvent(type, { detail }));
  }
  function subscribe(type, handler) {
    document.addEventListener(type, handler);
  }
  function unsubscribe(type, handler) {
    document.removeEventListener(type, handler);
  }

  // js/error-dialog.ts
  function showErrorDialog(error) {
    throw error instanceof FetchError ? dispatch("lektor-error", error) : console.error("unknown error:", error), error;
  }

  // js/components/AdminLink.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react3 = __toESM(require_react());

  // js/components/use-go-to-admin-page.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react2 = __toESM(require_react());
  function adminPath(page, path, alt) {
    let params = new URLSearchParams({ path });
    return alt !== "_primary" && params.set("alt", alt), `/${page}?${params.toString()}`;
  }
  function useGoToAdminPage() {
    let navigate = useNavigate();
    return (0, import_react2.useCallback)(
      (name, path, alt) => {
        navigate(adminPath(name, path, alt));
      },
      [navigate]
    );
  }

  // js/components/AdminLink.tsx
  function AdminLink({
    page,
    path,
    alt,
    children,
    ...otherProps
  }) {
    let current = useRecord(), recordMatches = path === current.path && alt === current.alt;
    return /* @__PURE__ */ import_react3.default.createElement(
      NavLink,
      {
        to: adminPath(page, path, alt),
        className: ({ isActive }) => isActive && recordMatches ? "active" : void 0,
        ...otherProps
      },
      children
    );
  }
  var AdminLink_default = (0, import_react3.memo)(AdminLink);

  // js/context/page-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react4 = __toESM(require_react()), PAGE_NAMES = [
    "edit",
    "delete",
    "preview",
    "add-child",
    "upload"
  ];
  function isPageName(p) {
    return PAGE_NAMES.includes(p);
  }
  var PageContext = (0, import_react4.createContext)("edit");

  // js/header/BreadCrumbs.tsx
  function Crumb({
    alt,
    item,
    targetPage
  }) {
    let { path, exists } = item, label = exists ? trans_fallback(item.label_i18n, item.label) : item.id;
    return /* @__PURE__ */ import_react5.default.createElement("li", { className: exists ? "breadcrumb-item" : "breadcrumb-item missing-record-crumb" }, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: targetPage, path, alt }, label));
  }
  function AddNewPage({
    alt,
    item
  }) {
    return item.can_have_children ? /* @__PURE__ */ import_react5.default.createElement("li", { className: "new-record-crumb" }, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: "add-child", path: item.path, alt }, "+")) : null;
  }
  function BreadCrumbs() {
    let page = (0, import_react5.useContext)(PageContext), { path, alt } = useRecord(), [segments, setSegments] = (0, import_react5.useState)(
      null
    );
    if ((0, import_react5.useEffect)(() => {
      let ignore = !1;
      return get("/pathinfo", { path }).then((resp) => {
        ignore || setSegments(resp.segments);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]), !segments)
      return /* @__PURE__ */ import_react5.default.createElement("ul", { className: "breadcrumb" }, /* @__PURE__ */ import_react5.default.createElement("li", null, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: "edit", path: "/", alt: "_primary" }, trans("BACK_TO_OVERVIEW"))));
    let target = page === "preview" ? "preview" : "edit", lastItem = segments[segments.length - 1];
    return /* @__PURE__ */ import_react5.default.createElement("ul", { className: "breadcrumb" }, segments.map((item) => /* @__PURE__ */ import_react5.default.createElement(Crumb, { key: item.path, item, alt, targetPage: target })), /* @__PURE__ */ import_react5.default.createElement(AddNewPage, { item: lastItem, alt }));
  }
  var BreadCrumbs_default = BreadCrumbs;

  // js/header/GlobalActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react6 = __toESM(require_react());

  // js/utils.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function isValidUrl(url) {
    return !!url.match(/^([a-z0-9+.-]+):(\/\/)?[^/]\S+$/);
  }
  function trimLeadingSlashes(string) {
    let match = /^\/*(.*?)$/.exec(string);
    return match ? match[1] : "";
  }
  function trimTrailingSlashes(string) {
    let match = /^(.*?)\/*$/.exec(string);
    return match ? match[1] : "";
  }
  function trimSlashes(string) {
    let match = /^\/*(.*?)\/*$/.exec(string);
    return match ? match[1] : "";
  }
  function getCanonicalUrl(localPath) {
    return `${trimTrailingSlashes($LEKTOR_CONFIG.site_root)}/${trimLeadingSlashes(localPath)}`;
  }
  function getPlatform() {
    try {
      let appVersion = navigator.appVersion;
      return appVersion.match(/Win/) ? "windows" : appVersion.match(/\bMac/) ? "mac" : appVersion.match(/\b(X11|Linux)/) ? "linux" : null;
    } catch (e) {
      return null;
    }
  }
  function getParentPath(path) {
    let match = /^(\/.*)\/[^/]*$/.exec(path);
    return match ? match[1] : null;
  }

  // js/shortcut-keys.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var shortcutKeyRegexp = new RegExp(
    [
      "^",
      "(?:Meta\\+)?(?:Control\\+)?(?:Alt\\+)?(?:Shift\\+)?",
      "(?<=\\+)[A-Z]\\w*",
      "$"
    ].join("")
  );
  function isValidShortcutKey(value) {
    return typeof value == "string" && shortcutKeyRegexp.test(value);
  }
  function mod(key) {
    return `${getPlatform() === "mac" ? "Meta" : "Control"}+${key}`;
  }
  var defaultShortcutKeyMap = /* @__PURE__ */ new Map([
    ["EDIT_SHORTCUT" /* Edit */, mod("E")],
    ["PREVIEW_SHORTCUT" /* Preview */, mod("S")],
    ["SAVE_SHORTCUT" /* Save */, null],
    ["SEARCH_SHORTCUT" /* Search */, mod("G")]
  ]), ignoredKeys = /* @__PURE__ */ new Set([
    "Unidentified",
    // Modifier Keys
    "Alt",
    "AltGraph",
    "CapsLock",
    "Control",
    "Fn",
    "FnLock",
    "Meta",
    "NumLock",
    "ScrollLock",
    "Shift",
    "Symbol",
    "SymbolLock",
    "Hyper",
    "Super",
    // Legacy Modifier Keys
    "Hyper",
    "Super"
  ]), eraseHotkeyKeys = /* @__PURE__ */ new Set([
    "Backspace",
    "Delete",
    " "
    // space key
  ]);
  function isPrintingKey(key) {
    return key.length === 1 || key == "Enter" || key == "Tab";
  }
  var modifierKeys = ["Meta", "Control", "Alt", "Shift"];
  function getShortcutKey(event) {
    if ((event instanceof Event ? event : event.nativeEvent).isComposing || ignoredKeys.has(event.key))
      return null;
    let activeMods = modifierKeys.filter((mod2) => event.getModifierState(mod2));
    if (activeMods.length === 0 && eraseHotkeyKeys.has(event.key) || isPrintingKey(event.key) && !activeMods.some((mod2) => mod2 != "Shift"))
      return null;
    let key = event.key.length == 1 ? event.key.toUpperCase() : event.key;
    return [...activeMods, key].join("+");
  }
  var shortcutHandlers = /* @__PURE__ */ new Map();
  function setShortcutHandler(action, handler) {
    let prevHandler = shortcutHandlers.get(action);
    return shortcutHandlers.set(action, handler), () => prevHandler ? shortcutHandlers.set(action, prevHandler) : shortcutHandlers.delete(action);
  }
  function dispatchShortcut(action) {
    let handler = shortcutHandlers.get(action);
    handler && handler();
  }
  function installShortcutKeyListener(keymap) {
    let actionForKey = new Map(
      Array.from(keymap.entries()).filter(([, key]) => key).map(([action, key]) => [key, action])
    ), keydownListener = (event) => {
      let key = getShortcutKey(event), action = key && actionForKey.get(key);
      action && (event.preventDefault(), event.stopPropagation(), dispatchShortcut(action));
    };
    return window.addEventListener("keydown", keydownListener), () => {
      window.removeEventListener("keydown", keydownListener);
    };
  }
  function serializeShortcutKeyMap(keymap) {
    return Object.fromEntries(
      Array.from(keymap.entries()).filter(([, key]) => key)
    );
  }
  function deserializeShortcutKeyMap(obj) {
    let data2 = obj;
    return new Map(
      Array.from(defaultShortcutKeyMap.keys(), (action) => {
        var _a2;
        let key = (_a2 = data2[action]) != null ? _a2 : null;
        if (key !== null && !isValidShortcutKey(key))
          throw new Error("Invalid value for ShortcutKey in serialized keymap");
        return [action, key];
      })
    );
  }

  // js/header/GlobalActions.tsx
  var findFiles = () => {
    dispatch("lektor-dialog", { type: "find-files" });
  }, refresh = () => {
    dispatch("lektor-dialog", { type: "refresh" });
  }, publish = () => {
    dispatch("lektor-dialog", { type: "publish" });
  }, preferences = () => {
    dispatch("lektor-dialog", { type: "preferences" });
  };
  function GlobalActions() {
    let record = useRecord(), [previewUrl, setPreviewUrl] = (0, import_react6.useState)(), fetchPreviewUrl = (0, import_react6.useMemo)(
      () => get("/previewinfo", record).then((response) => response.url).then((url) => getCanonicalUrl(url != null ? url : "/")).then((canonicalUrl) => (setPreviewUrl(canonicalUrl), canonicalUrl)).catch(showErrorDialog),
      [record]
    );
    (0, import_react6.useEffect)(() => setShortcutHandler("SEARCH_SHORTCUT" /* Search */, findFiles), []);
    let returnToWebsite = (0, import_react6.useCallback)(() => {
      previewUrl === null && fetchPreviewUrl.then((href) => {
        window.location.href = href;
      }).catch(showErrorDialog);
    }, [previewUrl, fetchPreviewUrl]);
    return /* @__PURE__ */ import_react6.default.createElement("div", { className: "btn-group" }, /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: findFiles,
        title: trans("FIND_FILES")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-search fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: publish,
        title: trans("PUBLISH")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-cloud-upload fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: refresh,
        title: trans("REFRESH_BUILD")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-refresh fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "a",
      {
        href: previewUrl,
        className: "btn btn-secondary border",
        title: trans("RETURN_TO_WEBSITE"),
        onClick: returnToWebsite
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-eye fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: preferences,
        title: trans("PREFERENCES")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-gear fa-fw" })
    ));
  }

  // js/header/Header.tsx
  function Header({
    sidebarIsActive,
    toggleSidebar
  }) {
    return /* @__PURE__ */ import_react7.default.createElement("header", null, /* @__PURE__ */ import_react7.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react7.default.createElement(
      "button",
      {
        type: "button",
        className: sidebarIsActive ? "fa fa-bars navbar-toggle active" : "fa fa-bars navbar-toggle",
        onClick: toggleSidebar,
        "aria-label": "Toggle navigation"
      }
    ), /* @__PURE__ */ import_react7.default.createElement("div", { className: "d-flex justify-content-between" }, /* @__PURE__ */ import_react7.default.createElement(BreadCrumbs_default, null), /* @__PURE__ */ import_react7.default.createElement("div", null, /* @__PURE__ */ import_react7.default.createElement(GlobalActions, null)))));
  }

  // js/sidebar/Sidebar.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react13 = __toESM(require_react());

  // js/sidebar/PageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react8 = __toESM(require_react());
  var getBrowseButtonTitle = () => {
    let platform = getPlatform();
    return platform === "mac" ? trans("BROWSE_FS_MAC") : platform === "windows" ? trans("BROWSE_FS_WINDOWS") : trans("BROWSE_FS");
  };
  function BrowseFSLink() {
    let record = useRecord(), fsOpen = (0, import_react8.useCallback)(
      (ev) => {
        ev.preventDefault(), post("/browsefs", record).then(({ okay }) => {
          okay || alert(trans("ERROR_CANNOT_BROWSE_FS"));
        }, showErrorDialog);
      },
      [record]
    );
    return /* @__PURE__ */ import_react8.default.createElement("a", { href: "#", onClick: fsOpen }, getBrowseButtonTitle());
  }
  function PageActions({ recordInfo }) {
    let { path, alt } = useRecord();
    return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("h3", null, recordInfo.is_attachment ? trans("ATTACHMENT_ACTIONS") : trans("PAGE_ACTIONS")), /* @__PURE__ */ import_react8.default.createElement("ul", { className: "nav" }, /* @__PURE__ */ import_react8.default.createElement("li", { key: "edit" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "edit", path, alt }, recordInfo.is_attachment ? trans("EDIT_METADATA") : trans("EDIT"))), recordInfo.can_be_deleted && /* @__PURE__ */ import_react8.default.createElement("li", { key: "delete" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "delete", path, alt }, trans("DELETE"))), /* @__PURE__ */ import_react8.default.createElement("li", { key: "preview" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "preview", path, alt }, trans("PREVIEW"))), recordInfo.exists && /* @__PURE__ */ import_react8.default.createElement("li", { key: "fs-open" }, /* @__PURE__ */ import_react8.default.createElement(BrowseFSLink, null)), recordInfo.can_have_children && /* @__PURE__ */ import_react8.default.createElement("li", { key: "add-child" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "add-child", path, alt }, trans("ADD_CHILD_PAGE"))), recordInfo.can_have_attachments && /* @__PURE__ */ import_react8.default.createElement("li", { key: "add-attachment" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "upload", path, alt }, trans("ADD_ATTACHMENT")))));
  }
  var PageActions_default = (0, import_react8.memo)(PageActions);

  // js/sidebar/Alternatives.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react9 = __toESM(require_react());
  function Alternatives({ alts }) {
    let page = (0, import_react9.useContext)(PageContext), path = useRecordPath();
    if (alts.length < 2)
      return null;
    let items = alts.map((item) => {
      let title = trans_obj(item.name_i18n);
      item.is_primary ? title += ` (${trans("PRIMARY_ALT")})` : item.primary_overlay && (title += ` (${trans("PRIMARY_OVERLAY")})`);
      let className = item.exists ? "alt" : "alt alt-missing";
      return /* @__PURE__ */ import_react9.default.createElement("li", { key: item.alt, className }, /* @__PURE__ */ import_react9.default.createElement(AdminLink_default, { page, path, alt: item.alt }, title));
    });
    return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("h3", null, trans("ALTS")), /* @__PURE__ */ import_react9.default.createElement("ul", { className: "nav" }, items));
  }
  var Alternatives_default = (0, import_react9.memo)(Alternatives);

  // js/sidebar/AttachmentActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react10 = __toESM(require_react());
  function AttachmentActions({ recordInfo }) {
    let alt = useRecordAlt(), attachments = recordInfo.attachments;
    return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("h3", null, trans("ATTACHMENTS")), /* @__PURE__ */ import_react10.default.createElement("ul", { className: "nav" }, attachments.length > 0 ? attachments.map((atch) => /* @__PURE__ */ import_react10.default.createElement("li", { key: atch.id }, /* @__PURE__ */ import_react10.default.createElement(AdminLink_default, { page: "edit", path: atch.path, alt }, atch.id, " (", atch.type, ")"))) : /* @__PURE__ */ import_react10.default.createElement("li", { key: "_missing" }, /* @__PURE__ */ import_react10.default.createElement("em", null, trans("NO_ATTACHMENTS")))));
  }
  var AttachmentActions_default = (0, import_react10.memo)(AttachmentActions);

  // js/sidebar/constants.ts
  init_define_SVG_ICONS_FONTAWESOME();

  // js/sidebar/ChildActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react12 = __toESM(require_react());

  // js/sidebar/ChildPagination.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react11 = __toESM(require_react());
  function ChildPagination({
    page,
    numberOfChildren,
    setPage
  }) {
    let pages = Math.ceil(numberOfChildren / 15);
    return pages <= 1 ? null : /* @__PURE__ */ import_react11.default.createElement("li", { className: "pagination" }, page > 1 ? /* @__PURE__ */ import_react11.default.createElement(
      "a",
      {
        href: "#",
        onClick: (ev) => {
          ev.preventDefault(), setPage(page - 1);
        }
      },
      "\xAB"
    ) : /* @__PURE__ */ import_react11.default.createElement("em", null, "\xAB"), /* @__PURE__ */ import_react11.default.createElement("span", { className: "page" }, `${page} / ${pages}`), page < pages ? /* @__PURE__ */ import_react11.default.createElement(
      "a",
      {
        href: "#",
        onClick: (ev) => {
          ev.preventDefault(), setPage(page + 1);
        }
      },
      "\xBB"
    ) : /* @__PURE__ */ import_react11.default.createElement("em", null, "\xBB"));
  }

  // js/sidebar/ChildActions.tsx
  function ChildActions({
    targetPage,
    allChildren,
    page,
    setPage
  }) {
    let alt = useRecordAlt(), shownChildren = allChildren.slice(
      (page - 1) * 15,
      page * 15
    );
    return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("h3", null, trans("CHILD_PAGES")), /* @__PURE__ */ import_react12.default.createElement("ul", { className: "nav" }, /* @__PURE__ */ import_react12.default.createElement(
      ChildPagination,
      {
        numberOfChildren: allChildren.length,
        page,
        setPage
      }
    ), shownChildren.length > 0 ? shownChildren.map((child) => /* @__PURE__ */ import_react12.default.createElement("li", { key: child.id }, /* @__PURE__ */ import_react12.default.createElement(AdminLink_default, { page: targetPage, path: child.path, alt }, trans_obj(child.label_i18n)))) : /* @__PURE__ */ import_react12.default.createElement("li", { key: "_missing" }, /* @__PURE__ */ import_react12.default.createElement("em", null, trans("NO_CHILD_PAGES")))));
  }

  // js/sidebar/Sidebar.tsx
  var ChildPosCache = class {
    constructor() {
      this.memo = [];
    }
    /** Remember the page for a record. */
    rememberPosition(record, page) {
      this.memo = this.memo.filter(([r]) => r !== record), this.memo.unshift([record, page]), this.memo.length > 5 && (this.memo.length = 5);
    }
    getPosition(record, childCount) {
      var _a2;
      let page = (_a2 = this.memo.find(([r]) => r === record)) == null ? void 0 : _a2[1];
      return page ? Math.min(page, Math.ceil(childCount / 15)) : 1;
    }
  }, compareAlternatives = (a, b) => {
    let nameA = (a.is_primary ? "A" : "B") + trans_obj(a.name_i18n), nameB = (b.is_primary ? "A" : "B") + trans_obj(b.name_i18n);
    return nameA === nameB ? 0 : nameA < nameB ? -1 : 1;
  };
  function Sidebar() {
    let page = (0, import_react13.useContext)(PageContext), path = useRecordPath(), [recordInfo, setRecordInfo] = (0, import_react13.useState)(null), [childrenPage, setChildrenPage] = (0, import_react13.useState)(1), [childPosCache] = (0, import_react13.useState)(() => new ChildPosCache()), [updateForced, forceUpdate] = (0, import_react13.useReducer)((x) => x + 1, 0);
    return (0, import_react13.useEffect)(() => {
      let handler = ({ detail }) => {
        detail === path && forceUpdate();
      };
      return subscribe("lektor-attachments-changed", handler), () => {
        unsubscribe("lektor-attachments-changed", handler);
      };
    }, [path]), (0, import_react13.useEffect)(() => {
      let ignore = !1;
      return get("/recordinfo", { path }).then((resp) => {
        ignore || (setRecordInfo({ ...resp, alts: resp.alts.sort(compareAlternatives) }), setChildrenPage(childPosCache.getPosition(path, resp.children.length)));
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path, childPosCache, updateForced]), recordInfo ? /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(PageActions_default, { recordInfo }), /* @__PURE__ */ import_react13.default.createElement(Alternatives_default, { alts: recordInfo.alts }), recordInfo.can_have_children && /* @__PURE__ */ import_react13.default.createElement(
      ChildActions,
      {
        targetPage: page === "preview" ? "preview" : "edit",
        allChildren: recordInfo.children,
        page: childrenPage,
        setPage: (page2) => {
          childPosCache.rememberPosition(path, page2), setChildrenPage(page2);
        }
      }
    ), recordInfo.can_have_attachments && /* @__PURE__ */ import_react13.default.createElement(AttachmentActions_default, { recordInfo })) : null;
  }
  var Sidebar_default = Sidebar;

  // js/components/DialogSlot.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react21 = __toESM(require_react());

  // js/dialogs/find-files/FindFiles.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react16 = __toESM(require_react());

  // js/components/SlideDialog.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react14 = __toESM(require_react());
  function SlideDialog({
    title,
    hasCloseButton,
    dismiss,
    children
  }) {
    return (0, import_react14.useEffect)(() => {
      let handler = (ev) => {
        ev.key === "Escape" && (ev.preventDefault(), dismiss());
      };
      return window.addEventListener("keydown", handler), () => {
        window.removeEventListener("keydown", handler);
      };
    }, [dismiss]), (0, import_react14.useEffect)(() => {
      window.scrollTo(0, 0);
    }, []), /* @__PURE__ */ import_react14.default.createElement("div", { className: "dialog-slot" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "sliding-panel col-md-6 offset-md-3" }, hasCloseButton && /* @__PURE__ */ import_react14.default.createElement(
      "a",
      {
        href: "#",
        className: "close-btn",
        onClick: (ev) => {
          ev.preventDefault(), dismiss();
        }
      },
      trans("CLOSE")
    ), /* @__PURE__ */ import_react14.default.createElement("h3", null, title), children)), /* @__PURE__ */ import_react14.default.createElement("div", { className: "interface-protector" }));
  }

  // js/dialogs/find-files/ResultRow.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react15 = __toESM(require_react());
  function ResultRow({
    result,
    isActive,
    dismiss,
    alt,
    target
  }) {
    return /* @__PURE__ */ import_react15.default.createElement("li", { className: isActive ? "active" : "" }, /* @__PURE__ */ import_react15.default.createElement(AdminLink_default, { page: target, path: result.path, alt, onClick: dismiss }, result.parents.map((item) => /* @__PURE__ */ import_react15.default.createElement("span", { key: item.title }, item.title)), /* @__PURE__ */ import_react15.default.createElement("strong", null, result.title)));
  }

  // js/dialogs/find-files/FindFiles.tsx
  function FindFiles({ dismiss }) {
    let alt = useRecordAlt(), page = (0, import_react16.useContext)(PageContext), [query, setQuery] = (0, import_react16.useState)(""), [results, setResults] = (0, import_react16.useState)([]), [selected, setSelected] = (0, import_react16.useState)(-1), goToAdminPage = useGoToAdminPage(), target = page === "preview" ? "preview" : "edit";
    (0, import_react16.useEffect)(() => {
      if (!query) {
        setResults([]), setSelected(-1);
        return;
      }
      let ignore = !1;
      return post("/find", { q: query, alt, lang: getCurrentLanguge() }).then(
        ({ results: results2 }) => {
          ignore || (setResults(results2), setSelected((selected2) => Math.min(selected2, results2.length - 1)));
        },
        showErrorDialog
      ), () => {
        ignore = !0;
      };
    }, [alt, query]);
    let onInputKey = (0, import_react16.useCallback)(
      (event) => {
        if (event.key === "ArrowDown")
          event.preventDefault(), setSelected((selected2) => (selected2 + 1) % results.length);
        else if (event.key === "ArrowUp")
          event.preventDefault(), setSelected(
            (selected2) => (selected2 - 1 + results.length) % results.length
          );
        else if (event.key === "Enter") {
          let item = results[selected];
          item && (dismiss(), goToAdminPage(target, item.path, alt));
        }
      },
      [alt, dismiss, goToAdminPage, results, selected, target]
    );
    return /* @__PURE__ */ import_react16.default.createElement(SlideDialog, { dismiss, hasCloseButton: !0, title: trans("FIND_FILES") }, /* @__PURE__ */ import_react16.default.createElement(
      "input",
      {
        type: "text",
        autoFocus: !0,
        className: "form-control",
        value: query,
        onChange: (ev) => {
          setQuery(ev.target.value);
        },
        onKeyDown: onInputKey,
        placeholder: trans("FIND_FILES_PLACEHOLDER")
      }
    ), /* @__PURE__ */ import_react16.default.createElement("ul", { className: "search-results" }, results.map((result, idx) => /* @__PURE__ */ import_react16.default.createElement(
      ResultRow,
      {
        key: result.path,
        result,
        isActive: idx === selected,
        dismiss,
        alt,
        target
      }
    ))));
  }
  var FindFiles_default = FindFiles;

  // js/dialogs/Preferences.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react18 = __toESM(require_react());

  // js/context/appsettings-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react17 = __toESM(require_react());
  var defaultAppSettings = {
    shortcutKeyMap: defaultShortcutKeyMap
  }, AppSettingsContext = (0, import_react17.createContext)(defaultAppSettings);
  function useAppSettings() {
    return (0, import_react17.useContext)(AppSettingsContext);
  }
  function serializeAppSettings(settings) {
    return {
      shortcutKeyMap: serializeShortcutKeyMap(settings.shortcutKeyMap)
    };
  }
  function hasAttribute(obj, attr) {
    return typeof obj == "object" && obj !== null && attr in obj;
  }
  function deserializeAppSettings(obj) {
    if (!hasAttribute(obj, "shortcutKeyMap"))
      throw new Error("Bad stored value for AppSettings");
    return {
      shortcutKeyMap: deserializeShortcutKeyMap(obj.shortcutKeyMap)
    };
  }
  var appSettingsKey = "com.getlektor--appsettings";
  function loadAppSettings() {
    try {
      let saved = localStorage.getItem(appSettingsKey);
      if (saved)
        return deserializeAppSettings(JSON.parse(saved));
    } catch (e) {
      console.log("Failed to load AppSettings from localStorage", e);
    }
    return defaultAppSettings;
  }
  function saveAppSettings(settings) {
    localStorage.setItem(
      appSettingsKey,
      JSON.stringify(serializeAppSettings(settings))
    );
  }

  // js/dialogs/Preferences.tsx
  function Preferences({
    setAppSettings,
    dismiss
  }) {
    let appSettings = useAppSettings(), [state, setState] = (0, import_react18.useState)(appSettings), save = () => {
      setAppSettings(state), dismiss();
    }, setKeyMap = (0, import_react18.useCallback)((action) => {
      setState((state2) => ({
        ...state2,
        shortcutKeyMap: typeof action == "function" ? action(state2.shortcutKeyMap) : action
      }));
    }, []);
    return /* @__PURE__ */ import_react18.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("PREFERENCES")
      },
      /* @__PURE__ */ import_react18.default.createElement("form", null, /* @__PURE__ */ import_react18.default.createElement(ShortcutKeyPrefs, { keyMap: state.shortcutKeyMap, setKeyMap }), /* @__PURE__ */ import_react18.default.createElement("div", { className: "d-flex" }, /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "submit",
          disabled: state === appSettings,
          className: "btn btn-primary border me-2",
          onClick: save
        },
        trans("SAVE_CHANGES")
      ), /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border me-2",
          disabled: state === defaultAppSettings,
          onClick: () => {
            setState(defaultAppSettings);
          }
        },
        trans("RESET_TO_DEFAULTS")
      ), /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          onClick: dismiss
        },
        trans("CANCEL")
      )))
    );
  }
  function ShortcutKeyPrefs({
    keyMap,
    setKeyMap
  }) {
    let setShortcut = (0, import_react18.useCallback)(
      (action, key) => {
        setKeyMap(
          (keyMap2) => new Map(
            Array.from(keyMap2.entries(), ([a, k]) => [
              a,
              a === action ? key : k !== key ? k : null
            ])
          )
        );
      },
      [setKeyMap]
    );
    return /* @__PURE__ */ import_react18.default.createElement("fieldset", { className: "border border-dark p-2 mb-3" }, /* @__PURE__ */ import_react18.default.createElement("legend", null, "Shortcut Keys"), Array.from(keyMap, ([action, key]) => /* @__PURE__ */ import_react18.default.createElement("div", { className: "row mb-3", key: action }, /* @__PURE__ */ import_react18.default.createElement("label", { htmlFor: action, className: "col-sm-6 col-form-label text-end" }, trans(action)), /* @__PURE__ */ import_react18.default.createElement("div", { className: "col-sm-4" }, /* @__PURE__ */ import_react18.default.createElement(
      ShortcutKeyInputWidget,
      {
        value: key,
        onValueChange: (key2) => {
          setShortcut(action, key2);
        },
        className: "form-control",
        id: action
      }
    )))));
  }
  function ShortcutKeyInputWidget({
    value,
    onValueChange,
    ...props
  }) {
    return /* @__PURE__ */ import_react18.default.createElement(
      "input",
      {
        type: "text",
        value: value != null ? value : "",
        onChange: () => null,
        onKeyDown: (event) => {
          let key = getShortcutKey(event), doUnset = eraseHotkeyKeys.has(event.key);
          (key || doUnset) && (event.preventDefault(), event.stopPropagation(), onValueChange(key));
        },
        ...props
      }
    );
  }

  // js/dialogs/Publish.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react19 = __toESM(require_react());
  function TargetServers({
    activeTarget,
    servers,
    setActiveTarget
  }) {
    function onChange(event) {
      setActiveTarget(event.target.value);
    }
    let serverOptions = servers.map((server) => /* @__PURE__ */ import_react19.default.createElement("option", { value: server.id, key: server.id }, trans_fallback(server.name_i18n, server.name) + " (" + server.short_target + ")"));
    return /* @__PURE__ */ import_react19.default.createElement("dl", null, /* @__PURE__ */ import_react19.default.createElement("dt", null, trans("PUBLISH_SERVER")), /* @__PURE__ */ import_react19.default.createElement("dd", null, /* @__PURE__ */ import_react19.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react19.default.createElement(
      "select",
      {
        value: activeTarget,
        onChange,
        className: "form-control"
      },
      serverOptions
    ))));
  }
  function BuildLog({ log }) {
    let buildLog = (0, import_react19.useRef)(null);
    return (0, import_react19.useEffect)(() => {
      let node = buildLog.current;
      node && (node.scrollTop = node.scrollHeight);
    }, [log]), /* @__PURE__ */ import_react19.default.createElement("pre", { ref: buildLog, className: "build-log" }, log.join(`
`));
  }
  function Publish({
    dismiss,
    preventNavigation
  }) {
    let [servers, setServers] = (0, import_react19.useState)([]), [activeTarget, setActiveTarget] = (0, import_react19.useState)(""), [log, setLog] = (0, import_react19.useState)([]), [state, setState] = (0, import_react19.useState)("IDLE");
    (0, import_react19.useEffect)(() => {
      get("/servers", null).then(({ servers: servers2 }) => {
        setServers(servers2), setActiveTarget(servers2.length ? servers2[0].id : "");
      }, showErrorDialog);
    }, []);
    let onPublish = (0, import_react19.useCallback)(() => {
      setLog([]), setState("BUILDING"), preventNavigation(!0), post("/build", null).then(() => {
        setState("PUBLISH");
        let eventSource = new EventSource(
          apiUrl("/publish", { server: activeTarget })
        );
        eventSource.addEventListener("message", (event) => {
          let data2 = JSON.parse(event.data);
          data2 === null ? (setState("DONE"), preventNavigation(!1), eventSource.close()) : setLog((log2) => log2.concat(data2.msg));
        });
      }, showErrorDialog);
    }, [activeTarget, preventNavigation]), isSafeToPublish = state === "IDLE" || state === "DONE";
    return /* @__PURE__ */ import_react19.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("PUBLISH")
      },
      /* @__PURE__ */ import_react19.default.createElement("p", null, trans("PUBLISH_NOTE")),
      /* @__PURE__ */ import_react19.default.createElement(
        TargetServers,
        {
          activeTarget,
          servers,
          setActiveTarget
        }
      ),
      /* @__PURE__ */ import_react19.default.createElement("p", null, /* @__PURE__ */ import_react19.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-primary",
          disabled: !isSafeToPublish,
          onClick: onPublish
        },
        trans("PUBLISH")
      ), " ", /* @__PURE__ */ import_react19.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          disabled: !isSafeToPublish,
          onClick: dismiss
        },
        trans(state === "DONE" ? "CLOSE" : "CANCEL")
      )),
      state !== "IDLE" ? /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("h3", null, state !== "DONE" ? trans("CURRENTLY_PUBLISHING") : trans("PUBLISH_DONE")), /* @__PURE__ */ import_react19.default.createElement("pre", null, trans("STATE") + ": " + trans(`PUBLISH_STATE_${state}`)), /* @__PURE__ */ import_react19.default.createElement(BuildLog, { log })) : null
    );
  }
  var Publish_default = Publish;

  // js/dialogs/Refresh.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react20 = __toESM(require_react());
  function Refresh({
    dismiss,
    preventNavigation
  }) {
    let [state, setState] = (0, import_react20.useState)("IDLE"), isSafeToNavigate = state === "IDLE" || state === "DONE", refresh2 = (0, import_react20.useCallback)(() => {
      setState("CLEANING"), post("/clean", null).then(() => {
        setState("DONE");
      }, showErrorDialog);
    }, []);
    return (0, import_react20.useEffect)(() => {
      preventNavigation(!isSafeToNavigate);
    }, [preventNavigation, isSafeToNavigate]), /* @__PURE__ */ import_react20.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("REFRESH_BUILD")
      },
      /* @__PURE__ */ import_react20.default.createElement("p", null, trans("REFRESH_BUILD_NOTE")),
      /* @__PURE__ */ import_react20.default.createElement("p", null, /* @__PURE__ */ import_react20.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-primary",
          disabled: !isSafeToNavigate,
          onClick: refresh2
        },
        trans("REFRESH_BUILD")
      ), " ", /* @__PURE__ */ import_react20.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          disabled: !isSafeToNavigate,
          onClick: dismiss
        },
        trans(state === "DONE" ? "CLOSE" : "CANCEL")
      )),
      state !== "IDLE" && /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("h3", null, state !== "DONE" ? trans("CURRENTLY_REFRESHING_BUILD") : trans("REFRESHING_BUILD_DONE")))
    );
  }

  // js/components/DialogSlot.tsx
  function DialogSlot({
    setAppSettings
  }) {
    let [dialog, setDialog] = (0, import_react21.useState)(null), dismiss = (0, import_react21.useCallback)(() => {
      setDialog((c) => c != null && c.preventNavigation ? c : null);
    }, []), prevent = (0, import_react21.useCallback)((preventNavigation) => {
      setDialog((d) => d ? { ...d, preventNavigation } : null);
    }, []);
    if ((0, import_react21.useEffect)(() => {
      let handler = ({ detail }) => {
        setDialog((current) => current != null ? current : detail);
      };
      return subscribe("lektor-dialog", handler), () => {
        unsubscribe("lektor-dialog", handler);
      };
    }, []), !dialog)
      return null;
    if (dialog.type === "find-files")
      return /* @__PURE__ */ import_react21.default.createElement(FindFiles_default, { dismiss });
    if (dialog.type === "refresh")
      return /* @__PURE__ */ import_react21.default.createElement(Refresh, { dismiss, preventNavigation: prevent });
    if (dialog.type === "publish")
      return /* @__PURE__ */ import_react21.default.createElement(Publish_default, { dismiss, preventNavigation: prevent });
    if (dialog.type === "preferences")
      return /* @__PURE__ */ import_react21.default.createElement(Preferences, { setAppSettings, dismiss });
    let exhaustiveCheck = dialog.type;
    throw new Error(exhaustiveCheck);
  }

  // js/components/ServerStatus.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react22 = __toESM(require_react());
  function ServerStatus() {
    let [state, setState] = (0, import_react22.useState)({
      serverIsUp: !0,
      projectId: null
    });
    return (0, import_react22.useEffect)(() => {
      let onInterval = () => {
        get("/ping", null).then(
          ({ project_id }) => {
            setState(
              ({ projectId }) => projectId === null ? { projectId: project_id, serverIsUp: !0 } : { projectId, serverIsUp: projectId === project_id }
            );
          },
          () => {
            setState((s) => ({ ...s, serverIsUp: !1 }));
          }
        );
      }, id = window.setInterval(onInterval, 2e3);
      return () => {
        window.clearInterval(id);
      };
    }, []), state.serverIsUp ? null : /* @__PURE__ */ import_react22.default.createElement("div", { className: "interface-protector server-down-panel" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "server-down-dialog" }, /* @__PURE__ */ import_react22.default.createElement("h3", null, trans("ERROR_SERVER_UNAVAILABLE")), /* @__PURE__ */ import_react22.default.createElement("p", null, trans("ERROR_SERVER_UNAVAILABLE_MESSAGE"))));
  }

  // js/components/ErrorDialog.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react23 = __toESM(require_react());
  function ErrorDialog() {
    let [error, setError] = (0, import_react23.useState)(null), dismiss = (0, import_react23.useCallback)(() => {
      setError(null);
    }, []);
    return (0, import_react23.useEffect)(() => {
      let handler = ({ detail }) => {
        setError(detail);
      };
      return subscribe("lektor-error", handler), () => {
        unsubscribe("lektor-error", handler);
      };
    }, []), error ? /* @__PURE__ */ import_react23.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("ERROR")
      },
      /* @__PURE__ */ import_react23.default.createElement("p", null, trans("ERROR_OCURRED"), ": ", trans("ERROR_" + error.code)),
      /* @__PURE__ */ import_react23.default.createElement("p", null, /* @__PURE__ */ import_react23.default.createElement("button", { type: "button", className: "btn btn-primary", onClick: dismiss }, trans("CLOSE")))
    ) : null;
  }

  // js/views/edit/EditPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react44 = __toESM(require_react());

  // js/widgets.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react40 = __toESM(require_react());

  // js/widgets/IntegerInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react26 = __toESM(require_react());

  // js/widgets/InputWidgetBase.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react25 = __toESM(require_react());

  // js/userLabel.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react24 = __toESM(require_react());
  function formatUserLabel(inputConfig) {
    let label = typeof inputConfig == "string" ? inputConfig : trans_obj(inputConfig);
    if (!label)
      return /* @__PURE__ */ import_react24.default.createElement("span", null);
    let iconData = label.match(/^\[\[\s*(.*?)\s*(;\s*(.*?))?\s*\]\]$/);
    if (iconData) {
      let className = "fa fa-" + iconData[1];
      return (iconData[3] || "").match(/90|180|270/) && (className += " fa-rotate-" + iconData[3]), /* @__PURE__ */ import_react24.default.createElement("i", { className });
    }
    return /* @__PURE__ */ import_react24.default.createElement("span", null, label);
  }

  // js/widgets/types.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function getInputClass(type) {
    return type.size === "small" ? "form-control form-control-sm" : type.size === "large" ? "form-control form-control-lg" : "form-control";
  }

  // js/widgets/InputWidgetBase.tsx
  function InputWidgetBase({
    type,
    value,
    onChange,
    postprocessValue,
    inputAddon: inputAddon5,
    inputType,
    validate,
    disabled,
    placeholder
  }) {
    let onChangeHandler = (0, import_react25.useCallback)(
      (event) => {
        let value2 = event.target.value;
        postprocessValue && (value2 = postprocessValue(value2)), onChange(value2);
      },
      [onChange, postprocessValue]
    ), failure = validate ? validate(value) : null, setValidity = (el) => {
      el == null || el.setCustomValidity(failure != null ? failure : "");
    }, configuredAddon = type.addon_label_i18n, addon = configuredAddon ? formatUserLabel(configuredAddon) : inputAddon5;
    return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react25.default.createElement(
      "input",
      {
        ref: setValidity,
        type: inputType,
        disabled,
        placeholder,
        className: getInputClass(type),
        onChange: onChangeHandler,
        value: value || ""
      }
    ), /* @__PURE__ */ import_react25.default.createElement("span", { className: "input-group-text" }, addon)), failure !== null && /* @__PURE__ */ import_react25.default.createElement("div", { className: "validation-block validation-block-error" }, failure));
  }

  // js/widgets/IntegerInputWidget.tsx
  function postprocessInteger(value) {
    return value.trim();
  }
  function validateInteger(value) {
    return value && !value.match(/^-?\d+$/) ? trans("ERROR_INVALID_NUMBER") : null;
  }
  function IntegerInputWidget(props) {
    return /* @__PURE__ */ import_react26.default.createElement(
      InputWidgetBase,
      {
        inputType: "text",
        inputAddon: "0",
        postprocessValue: postprocessInteger,
        validate: validateInteger,
        ...props
      }
    );
  }

  // js/widgets/MultiLineTextInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react27 = __toESM(require_react());
  var config = {
    // On initial render, if the natural height of the textarea is less than
    // than maxInitialHeight, the textarea will start in autosize mode.
    // Otherwise, it will start with a static height of defaultStaticHeight.
    // (Both of these are relative to windowHeight.)
    maxInitialHeight: 0.6,
    defaultStaticHeight: 0.4,
    // The maximum target height for the "shrink" button, relative to windowHeight.
    maxTargetHeight: 0.8,
    // The minimum target height for the "shrink" button, in lines.
    minTargetLines: 5,
    // Default shrink factor, if remembered height is not viable
    fallbackShrinkFactor: 0.5,
    // When textarea is manually resized, if the new size larger than the
    // largest of (extraLines * lineHeight) or (maxResizeHeight * windowHeight),
    // the textarea will be switched to autosize mode.
    extraLines: 2,
    maxResizeHeight: 0.8,
    // When window is narrower than this, textareas are always autosized
    minWindowWidth: 576
  };
  function _pixels(dimension) {
    return Number(dimension.replace(/px/, ""));
  }
  function deref(ref) {
    if (ref.current === void 0 || ref.current === null)
      throw new Error("Attempt to dereference undefined reference");
    return ref.current;
  }
  function isTouchDevice() {
    return "ontouchstart" in window || navigator.maxTouchPoints > 0;
  }
  function shouldEnableDragHandle() {
    return window.innerWidth >= config.minWindowWidth && !isTouchDevice();
  }
  function textareaResizeWatcher(textarea) {
    let height;
    function mousedownListener() {
      height = textarea.style.height, window.addEventListener("mouseup", mouseupListener, { once: !0 });
    }
    function mouseupListener() {
      if (textarea.style.height !== height) {
        let event = new CustomEvent("textarea-resized", {
          detail: { height: _pixels(textarea.style.height) }
        });
        textarea.dispatchEvent(event);
      }
    }
    return textarea.addEventListener("mousedown", mousedownListener), () => {
      window.removeEventListener("mouseup", mouseupListener), textarea.removeEventListener("mousedown", mousedownListener);
    };
  }
  function initState(arg) {
    let resizeable = shouldEnableDragHandle(), height = window.innerHeight * config.defaultStaticHeight, autosized = !0, lineHeight = 21, borderHeight = 2, decorationHeight = 12.5;
    if (arg) {
      let { textarea, replica } = arg, cs = getComputedStyle(textarea);
      lineHeight = _pixels(cs.lineHeight), borderHeight = _pixels(cs.borderTopWidth) + _pixels(cs.borderBottomWidth), decorationHeight = borderHeight + _pixels(cs.paddingTop) + _pixels(cs.paddingBottom), resizeable && replica.scrollHeight + borderHeight > window.innerHeight * config.maxInitialHeight && (autosized = !1);
    }
    return {
      resizeable,
      autosized,
      height,
      lineHeight,
      borderHeight,
      decorationHeight
    };
  }
  function reduceState(state, action) {
    switch (action.type) {
      case "initialize":
        return initState(action);
      case "set-height":
        return state.autosized ? { ...state, autosized: !1, height: action.height } : state;
      case "autosize":
        return state.autosized ? state : { ...state, autosized: !0 };
      case "enable-drag-handle":
        return state.resizeable ? state : { ...state, resizeable: !0 };
      case "disable-drag-handle":
        return state.resizeable ? { ...state, resizeable: !1, autosized: !0 } : state;
    }
  }
  function MultiLineTextInputWidget({
    type,
    value,
    placeholder,
    disabled,
    onChange: onChangeProp
  }) {
    let textareaRef = (0, import_react27.useRef)(null), replicaRef = (0, import_react27.useRef)(null), [state, dispatch2] = (0, import_react27.useReducer)(reduceState, null, initState);
    (0, import_react27.useEffect)(() => {
      let textarea = deref(textareaRef), replica = deref(replicaRef);
      dispatch2({ type: "initialize", textarea, replica });
      let windowResizeListener = () => {
        shouldEnableDragHandle() ? dispatch2({ type: "enable-drag-handle" }) : dispatch2({ type: "disable-drag-handle" });
      };
      window.addEventListener("resize", windowResizeListener);
      let disconnectResizeWatcher = textareaResizeWatcher(textarea);
      return () => {
        disconnectResizeWatcher(), window.removeEventListener("resize", windowResizeListener);
      };
    }, []), (0, import_react27.useEffect)(() => {
      if (state.resizeable) {
        let textarea = deref(textareaRef), replica = deref(replicaRef), observer = new MutationObserver(() => {
          textarea.style.height && (replica.style.maxHeight = "0px");
        });
        observer.observe(textarea, { attributeFilter: ["style"] });
        let resizeListener = (event) => {
          let { height } = event.detail;
          dispatch2({ type: "set-height", height });
        };
        return textarea.addEventListener("textarea-resized", resizeListener), () => {
          textarea.removeEventListener("textarea-resized", resizeListener), observer.disconnect();
        };
      }
    }, [state.resizeable]);
    let getNaturalHeight = () => {
      let replica = replicaRef.current;
      return replica ? (replica.innerText = value, replica.scrollHeight + state.borderHeight) : 0;
    };
    (0, import_react27.useEffect)(() => {
      if (!state.autosized) {
        let reasonableHeight = Math.max(
          getNaturalHeight() + state.lineHeight * config.extraLines,
          window.innerHeight * config.maxResizeHeight
        );
        state.height > reasonableHeight && dispatch2({ type: "autosize" });
      }
    });
    let onChange = (event) => {
      onChangeProp(event.target.value);
    };
    return /* @__PURE__ */ import_react27.default.createElement("div", { className: "text-widget" }, /* @__PURE__ */ import_react27.default.createElement(
      "div",
      {
        style: { maxHeight: state.autosized ? "" : "0px" },
        ref: replicaRef,
        className: "text-widget__replica"
      },
      value
    ), /* @__PURE__ */ import_react27.default.createElement(
      "textarea",
      {
        style: { height: state.autosized ? "" : `${state.height}px` },
        ref: textareaRef,
        className: [
          "text-widget__textarea",
          state.autosized && "text-widget__textarea--autosized",
          state.resizeable && "text-widget__textarea--resizeable",
          getInputClass(type)
        ].filter(Boolean).join(" "),
        onChange,
        value,
        disabled,
        placeholder
      }
    ), /* @__PURE__ */ import_react27.default.createElement(
      ToggleButton,
      {
        state,
        dispatch: dispatch2,
        naturalHeight: getNaturalHeight()
      }
    ));
  }
  function ToggleButton({
    state,
    dispatch: dispatch2,
    naturalHeight
  }) {
    let action = getToggleAction(state, naturalHeight);
    if (!action) return null;
    let { title, icon } = toggleButtonLabels[action.type], onClick = (event) => {
      event.preventDefault(), dispatch2(action);
    };
    return /* @__PURE__ */ import_react27.default.createElement("a", { href: "#", title: trans(title), onClick, className: "position-absolute top-0 start-100 translate-middle bg-light border rounded-circle" }, /* @__PURE__ */ import_react27.default.createElement("i", { className: `fa fa-${icon} fa-fw` }));
  }
  var toggleButtonLabels = {
    autosize: {
      title: "AUTOSIZE_TEXTAREA",
      icon: "expand"
    },
    "set-height": {
      title: "SHRINK_TEXTAREA",
      icon: "compress"
    }
  };
  function getToggleAction(state, naturalHeight) {
    if (!state.resizeable)
      return null;
    if (!state.autosized)
      return { type: "autosize" };
    let targetHeight = Math.min(
      state.height,
      // last manually set height
      Math.ceil(window.innerHeight * config.maxTargetHeight)
    );
    if (targetHeight < naturalHeight)
      return { type: "set-height", height: targetHeight };
    let lines = Math.round(
      (naturalHeight - state.decorationHeight) / state.lineHeight
    ), targetLines = Math.max(
      config.minTargetLines,
      Math.ceil(lines * config.fallbackShrinkFactor)
    ), fallbackHeight = Math.ceil(
      targetLines * state.lineHeight + state.decorationHeight
    );
    return fallbackHeight < naturalHeight ? { type: "set-height", height: fallbackHeight } : null;
  }

  // js/widgets/BooleanInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react28 = __toESM(require_react());
  var isTrue = (value) => value === "true" || value === "yes" || value === "1", isDeleteOrBackspace = (event) => event.altKey || event.metaKey || event.shiftKey && !event.ctrlKey ? !1 : event.key === "Delete" || event.key === "Backspace";
  function BooleanInputWidget({
    type,
    value,
    disabled,
    placeholder,
    onChange
  }) {
    return /* @__PURE__ */ import_react28.default.createElement("div", { className: "form-check" }, /* @__PURE__ */ import_react28.default.createElement("label", { className: "form-check-label" }, /* @__PURE__ */ import_react28.default.createElement(
      "input",
      {
        type: "checkbox",
        className: [
          "form-check-input",
          `form-check-input--default-${placeholder ? "true" : "false"}`
        ].join(" "),
        disabled,
        ref: (checkbox) => {
          checkbox && (checkbox.indeterminate = !value);
        },
        checked: isTrue(value || placeholder),
        onChange: (ev) => {
          onChange(ev.target.checked ? "yes" : "no");
        },
        onKeyDown: (ev) => {
          isDeleteOrBackspace(ev) && (ev.preventDefault(), ev.stopPropagation(), onChange(null));
        },
        title: trans("TRISTATE_CHECKBOX_TOOLTIP")
      }
    ), type.checkbox_label_i18n ? trans_obj(type.checkbox_label_i18n) : null));
  }

  // js/widgets/DateInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react29 = __toESM(require_react());
  var parseInteger = (s) => Number.parseInt(s, 10);
  function isValidDate(year, month, day) {
    let date = new Date(year, month - 1, day);
    return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
  }
  var DATE_RE = /^\s*(?<year>\d{4})-(?<month>\d{1,2})-(?<day>\d{1,2})\s*$/;
  function validateDate(value) {
    var _a2;
    if (!value)
      return null;
    let groups = (_a2 = value.match(DATE_RE)) == null ? void 0 : _a2.groups;
    return groups && isValidDate(
      parseInteger(groups.year),
      parseInteger(groups.month),
      parseInteger(groups.day)
    ) ? null : trans("ERROR_INVALID_DATE");
  }
  var REVERSE_DATE_RE = /^(?<day>\d{1,2})\.(?<month>\d{1,2})\.(?<year>\d{4})\s*$/, pad = (n) => n < 10 ? `0${n}` : `${n}`;
  function postprocessDate(value) {
    var _a2;
    value = value.trim();
    let groups = (_a2 = value.match(REVERSE_DATE_RE)) == null ? void 0 : _a2.groups;
    if (groups) {
      let day = parseInteger(groups.day), month = parseInteger(groups.month);
      return `${parseInteger(groups.year)}-${pad(month)}-${pad(day)}`;
    }
    return value;
  }
  var inputAddon = /* @__PURE__ */ import_react29.default.createElement("i", { className: "fa fa-calendar" });
  function DateInputWidget(props) {
    return /* @__PURE__ */ import_react29.default.createElement(
      InputWidgetBase,
      {
        inputType: "date",
        inputAddon,
        postprocessValue: postprocessDate,
        validate: validateDate,
        ...props
      }
    );
  }

  // js/widgets/FloatInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react30 = __toESM(require_react());
  function postprocessFloat(value) {
    return value.trim();
  }
  function validateFloat(value) {
    return value && !value.match(/^[+,-]?\d+[.]\d+$/) ? trans("ERROR_INVALID_NUMBER") : null;
  }
  function FloatInputWidget(props) {
    return /* @__PURE__ */ import_react30.default.createElement(
      InputWidgetBase,
      {
        inputType: "text",
        inputAddon: "0.0",
        postprocessValue: postprocessFloat,
        validate: validateFloat,
        ...props
      }
    );
  }

  // js/widgets/UrlInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react31 = __toESM(require_react());
  function validateUrl(value) {
    return value && !isValidUrl(value) ? trans("ERROR_INVALID_URL") : null;
  }
  var inputAddon2 = /* @__PURE__ */ import_react31.default.createElement("i", { className: "fa fa-external-link" });
  function UrlInputWidget(props) {
    return /* @__PURE__ */ import_react31.default.createElement(
      InputWidgetBase,
      {
        inputType: "text",
        inputAddon: inputAddon2,
        validate: validateUrl,
        ...props
      }
    );
  }

  // js/widgets/SlugInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react32 = __toESM(require_react());
  function postprocessSlug(value) {
    return value.replace(/\s+/g, "-");
  }
  var inputAddon3 = /* @__PURE__ */ import_react32.default.createElement("i", { className: "fa fa-link" });
  function SlugInputWidget(props) {
    return /* @__PURE__ */ import_react32.default.createElement(
      InputWidgetBase,
      {
        inputType: "text",
        inputAddon: inputAddon3,
        postprocessValue: postprocessSlug,
        ...props
      }
    );
  }

  // js/widgets/SingleLineTextInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react33 = __toESM(require_react());
  var inputAddon4 = /* @__PURE__ */ import_react33.default.createElement("i", { className: "fa fa-paragraph" });
  function SingleLineTextInputWidget(props) {
    return /* @__PURE__ */ import_react33.default.createElement(InputWidgetBase, { inputType: "text", inputAddon: inputAddon4, ...props });
  }

  // js/widgets/CheckboxesInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react34 = __toESM(require_react());
  var checkboxIsActive = (field, value) => value !== null && value.includes(field), flipSetValue = (set, value, isActive) => isActive ? set.includes(value) ? set : [...set, value] : set.filter((v) => v !== value), deserialize = (value) => {
    if (!value)
      return null;
    let rv = value.split(",").map((x) => x.trim());
    return rv.length === 1 && rv[0] === "" && (rv = []), rv;
  };
  function CheckboxesInputWidget({
    disabled,
    type,
    onChange,
    value,
    placeholder
  }) {
    var _a2;
    let deserializedValue = deserialize(value), deserializedPlaceholder = deserialize(placeholder);
    return /* @__PURE__ */ import_react34.default.createElement("div", { className: "checkboxes-widget" }, (_a2 = type.choices) == null ? void 0 : _a2.map(([key, description]) => /* @__PURE__ */ import_react34.default.createElement("div", { className: "form-check", key }, /* @__PURE__ */ import_react34.default.createElement("label", { className: "form-check-label" }, /* @__PURE__ */ import_react34.default.createElement(
      "input",
      {
        className: "form-check-input",
        type: "checkbox",
        disabled,
        checked: checkboxIsActive(
          key,
          deserializedValue != null ? deserializedValue : deserializedPlaceholder
        ),
        onChange: (ev) => {
          let newValue = flipSetValue(
            deserializedValue || [],
            key,
            ev.target.checked
          );
          onChange(newValue.join(", "));
        }
      }
    ), trans_obj(description)))));
  }

  // js/widgets/SelectInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react35 = __toESM(require_react());
  function SelectInputWidget(props) {
    var _a2;
    let { type, value, placeholder, onChange, disabled } = props, choices = (_a2 = type.choices) == null ? void 0 : _a2.map((item) => /* @__PURE__ */ import_react35.default.createElement("option", { key: item[0], value: item[0] }, trans_obj(item[1])));
    return /* @__PURE__ */ import_react35.default.createElement("div", null, /* @__PURE__ */ import_react35.default.createElement(
      "select",
      {
        className: getInputClass(type),
        value: value || placeholder || "",
        onChange: (e) => {
          onChange(e.target.value);
        },
        disabled
      },
      /* @__PURE__ */ import_react35.default.createElement("option", { key: "", value: "" }, "----"),
      choices
    ));
  }

  // js/widgets/flow/FlowWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react38 = __toESM(require_react());

  // js/widgets/flow/metaformat.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  function lineIsDashes(rawLine) {
    let line = rawLine.trim();
    return line.length >= 3 && line.match(/[^-]/) === null;
  }
  function processBuf(buf) {
    if (buf.length === 0)
      return buf;
    let lines = buf.map((line) => lineIsDashes(line) ? line.substr(1) : line), lastLine = lines[lines.length - 1];
    return lastLine.endsWith(`
`) && (lines[lines.length - 1] = lastLine.substr(0, lastLine.length - 1)), lines;
  }
  function trimTabsAndSpaces(str) {
    let match = str.match(/^[\t ]*(.*?)[\t ]*$/m);
    return match ? match[1] : "";
  }
  function tokenize(lines) {
    let key = null, buf = [], wantNewline = !1, rv = [];
    function flushItem() {
      key !== null && (rv.push([key, processBuf(buf)]), key = null, buf = []);
    }
    for (let i = 0; i < lines.length; i++) {
      let match = lines[i].match(/^(.*?)(\r?\n)*$/m), line = match ? `${match[1]}
` : `
`;
      if (line.trimRight() === "---")
        wantNewline = !1, flushItem();
      else if (key !== null) {
        if (wantNewline && (wantNewline = !1, line.match(/^\s*$/)))
          continue;
        buf.push(line);
      } else {
        let bits = line.split(":");
        if (bits.length >= 2) {
          let [rawKey, ...rest] = bits;
          key = rawKey.trim();
          let firstBit = trimTabsAndSpaces(rest.join(":"));
          firstBit.match(/^\s*$/) ? (buf = [], wantNewline = !0) : buf = [firstBit];
        }
      }
    }
    return flushItem(), rv;
  }
  function serialize(blocks) {
    let rv = [];
    return blocks.forEach((item, idx) => {
      let [key, value] = item;
      if (idx > 0 && rv.push(`---
`), value.match(/([\r\n]|(^[\t ])|([\t ]$))/m)) {
        rv.push(key + `:
`), rv.push(`
`);
        let lines = value.split(/\n/);
        lines[lines.length - 1] === "" && lines.pop(), lines.forEach((line) => {
          rv.push(lineIsDashes(line) ? `-${line}
` : `${line}
`);
        });
      } else
        rv.push(key + ": " + value + `
`);
    }), rv;
  }

  // js/widgets/flow/FlowBlock.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react36 = __toESM(require_react());
  var FlowBlock_default = (0, import_react36.memo)(function({
    block,
    moveBlock,
    renderFormField,
    removeBlock,
    idx,
    length
  }) {
    let [collapsed, toggle] = (0, import_react36.useReducer)((s) => !s, !1);
    return /* @__PURE__ */ import_react36.default.createElement("div", { className: "flow-block" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "d-flex justify-content-between" }, /* @__PURE__ */ import_react36.default.createElement("h4", { className: "block-name" }, formatUserLabel(block.model.name_i18n)), /* @__PURE__ */ import_react36.default.createElement("div", { className: "btn-group action-bar" }, /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: collapsed ? trans("EXPAND") : trans("COLLAPSE"),
        onClick: toggle
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: collapsed ? "fa fa-expand" : "fa fa-compress" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("UP"),
        disabled: idx === 0,
        onClick: () => {
          moveBlock(idx, -1);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-chevron-up" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("DOWN"),
        disabled: idx === length - 1,
        onClick: () => {
          moveBlock(idx, 1);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-chevron-down" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("REMOVE"),
        onClick: () => {
          removeBlock(idx);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-times" })
    ))), collapsed ? null : /* @__PURE__ */ import_react36.default.createElement(
      FieldRows,
      {
        fields: block.model.fields,
        renderFunc: renderFormField.bind(void 0, block)
      }
    ));
  });

  // js/widgets/flow/AddFlowBlockButtons.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react37 = __toESM(require_react());
  function AddFlowBlockButtons({
    flowblock_order,
    flowblocks,
    addBlock
  }) {
    let models = flowblock_order.map((key) => flowblocks[key]);
    return /* @__PURE__ */ import_react37.default.createElement("div", { className: "add-flow-block" }, /* @__PURE__ */ import_react37.default.createElement("label", null, `${trans("ADD_FLOWBLOCK")}: `), /* @__PURE__ */ import_react37.default.createElement("div", { className: "btn-group" }, models.map((model) => {
      let label = model.button_label ? formatUserLabel(model.button_label) : formatUserLabel(model.name_i18n);
      return /* @__PURE__ */ import_react37.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          onClick: () => {
            addBlock(model);
          },
          title: trans_obj(model.name_i18n),
          key: model.id
        },
        label
      );
    })));
  }

  // js/widgets/flow/FlowWidget.tsx
  function parseFlowFormat(value = "") {
    let blocks = [], lines = value.split(/\r?\n/), blockName = null, blockLines = [], flush = () => {
      blockName !== null && (blocks.push([blockName, blockLines]), blockLines = []);
    };
    for (let line of lines) {
      if (blockName === null && line.match(/^\s*$/))
        continue;
      let blockStart = line.match(/^####\s*([^#]*?)\s*####\s*$/);
      if (blockStart) {
        flush(), blockName = blockStart[1];
        continue;
      } else if (blockName === null)
        return [];
      blockLines.push(line.replace(/^#####(.*?)#####$/, "####$1####"));
    }
    return flush(), blocks;
  }
  function serializeFlowFormat(blocks) {
    let serialisedBlocks = [];
    blocks.forEach(([blockName, lines]) => {
      serialisedBlocks.push(`#### ${blockName} ####
`), lines.forEach((line) => {
        serialisedBlocks.push(line.replace(/^(####(.*)####)(\r?\n)?$/, "#$1#$3"));
      });
    });
    let rv = serialisedBlocks.join("");
    return rv.endsWith(`
`) ? rv.substr(0, rv.length - 1) : rv;
  }
  function deserializeFlowBlock(model, lines, localId) {
    let data2 = {}, rawData = {};
    return tokenize(lines).forEach(([key, lines2]) => {
      rawData[key] = lines2.join("");
    }), model.fields.forEach((field) => {
      let value = rawData[field.name] || "", Widget = getWidgetComponent(field.type);
      !value && field.default && (value = field.default), Widget && Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type)), data2[field.name] = value;
    }), { localId, model, data: data2 };
  }
  function serializeFlowBlock(flockBlockModel, data2) {
    let rv = [];
    return flockBlockModel.fields.forEach((field) => {
      let Widget = getWidgetComponent(field.type);
      if (Widget === null)
        return;
      let value = data2[field.name];
      value != null && (Widget.serializeValue && (value = Widget.serializeValue(value, field.type)), rv.push([field.name, value]));
    }), serialize(rv);
  }
  function FlowWidget(props) {
    let { value, onChange } = props, moveBlock = (0, import_react38.useCallback)(
      (idx, offset) => {
        onChange((prevValue) => {
          let newIndex = idx + offset;
          if (newIndex < 0 || newIndex >= prevValue.length)
            return prevValue;
          let newValue = [...prevValue];
          return newValue[newIndex] = prevValue[idx], newValue[idx] = prevValue[newIndex], newValue;
        });
      },
      [onChange]
    ), removeBlock = (0, import_react38.useCallback)(
      (idx) => {
        confirm(trans("REMOVE_FLOWBLOCK_PROMPT")) && onChange((v) => v.filter((item, i) => i !== idx));
      },
      [onChange]
    ), addNewBlock = (0, import_react38.useCallback)(
      (flowBlockModel) => {
        onChange((prevValue) => {
          prevValue != null || (prevValue = []);
          let newBlockId = Math.max(0, ...prevValue.map(({ localId }) => localId)) + 1, newBlock = deserializeFlowBlock(flowBlockModel, [], newBlockId);
          return [...prevValue, newBlock];
        });
      },
      [onChange]
    ), renderFormField = (0, import_react38.useCallback)(
      (block, field) => {
        let fieldValue = block.data[field.name], placeholder = field.default, Widget = getWidgetComponentWithFallback(field.type);
        Widget.deserializeValue && placeholder != null && (placeholder = Widget.deserializeValue(placeholder, field.type));
        let setFieldValue = (fieldName, v) => {
          onChange((prevValue) => {
            let newValue = [...prevValue], idx = newValue.indexOf(block), data2 = {
              ...block.data,
              [fieldName]: typeof v == "function" ? v(block.data[fieldName]) : v
            };
            return newValue[idx] = { ...block, data: data2 }, newValue;
          });
        };
        return /* @__PURE__ */ import_react38.default.createElement(
          FieldBox,
          {
            key: field.name,
            value: fieldValue,
            placeholder,
            field,
            setFieldValue
          }
        );
      },
      [onChange]
    ), { flowblock_order, flowblocks } = props.type;
    return /* @__PURE__ */ import_react38.default.createElement("div", { className: "flow-widget" }, value.map((block, idx) => /* @__PURE__ */ import_react38.default.createElement(
      FlowBlock_default,
      {
        key: block.localId,
        block,
        moveBlock,
        renderFormField,
        removeBlock,
        length: value.length,
        idx
      }
    )), /* @__PURE__ */ import_react38.default.createElement(
      AddFlowBlockButtons,
      {
        flowblock_order,
        flowblocks,
        addBlock: addNewBlock
      }
    ));
  }
  FlowWidget.deserializeValue = (value, { flowblocks }) => {
    let blockId = 0, blocks = [];
    return parseFlowFormat(value).forEach(([id, lines]) => {
      let flowBlock = flowblocks[id];
      flowBlock !== void 0 && blocks.push(deserializeFlowBlock(flowBlock, lines, ++blockId));
    }), blocks;
  };
  FlowWidget.serializeValue = (value) => serializeFlowFormat(
    value.map(({ model: flowBlockModel, data: data2 }) => [
      flowBlockModel.id,
      serializeFlowBlock(flowBlockModel, data2)
    ])
  );

  // js/widgets/fakeWidgets.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react39 = __toESM(require_react());
  function LineWidget() {
    return /* @__PURE__ */ import_react39.default.createElement("hr", null);
  }
  LineWidget.isFakeWidget = !0;
  function SpacingWidget() {
    return /* @__PURE__ */ import_react39.default.createElement("div", { className: "spacing-widget" });
  }
  SpacingWidget.isFakeWidget = !0;
  function InfoWidget(props) {
    let label = trans_obj(props.field.label_i18n);
    return /* @__PURE__ */ import_react39.default.createElement("div", { className: "info-widget" }, /* @__PURE__ */ import_react39.default.createElement("p", null, label ? /* @__PURE__ */ import_react39.default.createElement("strong", null, label + ": ") : null, trans_obj(props.field.description_i18n)));
  }
  InfoWidget.isFakeWidget = !0;
  function HeadingWidget(props) {
    var _a2;
    return /* @__PURE__ */ import_react39.default.createElement("h3", null, trans_obj((_a2 = props.field.type.heading_i18n) != null ? _a2 : {}));
  }
  HeadingWidget.isFakeWidget = !0;

  // js/widgets.tsx
  var widgetComponents = {
    "singleline-text": SingleLineTextInputWidget,
    "multiline-text": MultiLineTextInputWidget,
    datepicker: DateInputWidget,
    integer: IntegerInputWidget,
    float: FloatInputWidget,
    checkbox: BooleanInputWidget,
    url: UrlInputWidget,
    slug: SlugInputWidget,
    flow: FlowWidget,
    checkboxes: CheckboxesInputWidget,
    select: SelectInputWidget,
    "f-line": LineWidget,
    "f-spacing": SpacingWidget,
    "f-info": InfoWidget,
    "f-heading": HeadingWidget
  };
  function FallbackWidget(props) {
    return /* @__PURE__ */ import_react40.default.createElement("div", null, /* @__PURE__ */ import_react40.default.createElement("em", null, `Widget "${props.type.widget}" not implemented`, ` (used by type "${props.type.name}")`));
  }
  var FieldBox = import_react40.default.memo(function(props) {
    let { field, value, placeholder, disabled, setFieldValue } = props, onChange = (0, import_react40.useCallback)(
      (value2) => {
        setFieldValue(field.name, value2);
      },
      [field, setFieldValue]
    ), className = `col-md-${getFieldColumns(field)}`, Widget = getWidgetComponentWithFallback(field.type);
    if (Widget.isFakeWidget)
      return /* @__PURE__ */ import_react40.default.createElement("div", { className, key: field.name }, /* @__PURE__ */ import_react40.default.createElement(Widget, { key: field.name, field }));
    let description = field.description_i18n ? /* @__PURE__ */ import_react40.default.createElement("div", { className: "help-text" }, trans_obj(field.description_i18n)) : null;
    return /* @__PURE__ */ import_react40.default.createElement("div", { className, key: field.name }, /* @__PURE__ */ import_react40.default.createElement("dl", { className: "field" }, field.hide_label ? null : /* @__PURE__ */ import_react40.default.createElement("dt", null, trans_obj(field.label_i18n)), /* @__PURE__ */ import_react40.default.createElement("dd", null, description, /* @__PURE__ */ import_react40.default.createElement(
      Widget,
      {
        value,
        onChange,
        type: field.type,
        placeholder: placeholder != null ? placeholder : void 0,
        disabled
      }
    ))));
  });
  function getWidgetComponent(type) {
    return widgetComponents[type.widget] || null;
  }
  function getWidgetComponentWithFallback(type) {
    return widgetComponents[type.widget] || FallbackWidget;
  }
  function getFieldColumns(field) {
    let widthSpec = (field.type.width || "1/1").split("/"), fraction = 12 * +widthSpec[0] / +widthSpec[1];
    return Number.isNaN(fraction) ? 12 : Math.min(12, Math.max(2, parseInt(`${fraction}`)));
  }
  function processFields(fields) {
    let rows = [], currentColumns = 0, row = [];
    return fields.forEach((field) => {
      let columns = getFieldColumns(field);
      columns + currentColumns > 12 && (rows.push(row), currentColumns = 0, row = []), row.push(field), currentColumns += columns;
    }), row.length > 0 && rows.push(row), rows;
  }
  function splitFields(fields) {
    let normalFields = [], systemFields = [];
    return fields.forEach((field) => {
      field.name.substr(0, 1) === "_" ? systemFields.push(field) : normalFields.push(field);
    }), [normalFields, systemFields];
  }
  function FieldRows({
    fields,
    renderFunc
  }) {
    let rows = (0, import_react40.useMemo)(() => processFields(fields), [fields]);
    return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, rows.map((row, idx) => /* @__PURE__ */ import_react40.default.createElement("div", { key: idx, className: "row field-row" }, row.map(renderFunc))));
  }

  // js/views/edit/EditPageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react41 = __toESM(require_react());
  function EditPageActions({
    recordInfo,
    hasPendingChanges
  }) {
    let { path, alt } = useRecord(), goToAdminPage = useGoToAdminPage(), deleteRecord = (0, import_react41.useCallback)(() => {
      goToAdminPage("delete", path, alt);
    }, [alt, goToAdminPage, path]);
    return /* @__PURE__ */ import_react41.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react41.default.createElement(
      "button",
      {
        type: "submit",
        disabled: !hasPendingChanges,
        className: "btn btn-primary"
      },
      trans("SAVE_CHANGES")
    ), recordInfo.can_be_deleted ? /* @__PURE__ */ import_react41.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: deleteRecord
      },
      trans("DELETE")
    ) : null);
  }

  // js/components/ToggleGroup.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react42 = __toESM(require_react());
  function ToggleGroup({
    className = "",
    groupTitle,
    children
  }) {
    let [open, setOpen] = (0, import_react42.useState)(!1), toggle = (0, import_react42.useCallback)((event) => {
      event.preventDefault(), setOpen((v) => !v);
    }, []);
    return /* @__PURE__ */ import_react42.default.createElement(
      "div",
      {
        className: open ? `${className} toggle-group` : `${className} toggle-group closed`
      },
      /* @__PURE__ */ import_react42.default.createElement("h4", { className: "toggle-group-header", onClick: toggle }, groupTitle),
      /* @__PURE__ */ import_react42.default.createElement("div", { className: "toggle-group-content" }, children)
    );
  }

  // js/components/use-changed-flag.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react43 = __toESM(require_react()), import_react_dom = __toESM(require_react_dom());
  function reducer(state, flushed) {
    return flushed !== null ? { ...state, flushed } : { ...state, changes: state.changes + 1 };
  }
  function useChangedFlag() {
    let [state, setFlushed] = (0, import_react43.useReducer)(reducer, { changes: 0, flushed: 0 }), changesRef = (0, import_react43.useRef)(state.changes);
    (0, import_react43.useEffect)(() => {
      changesRef.current = state.changes;
    }, [state]);
    let hasPendingChanges = state.changes != state.flushed, setDirty = (0, import_react43.useCallback)(() => {
      setFlushed(null);
    }, [setFlushed]), setClean = (0, import_react43.useCallback)(
      async (cb, options) => {
        let changes = changesRef.current, update = () => {
          setFlushed(changes);
        }, result = await cb();
        return options != null && options.sync ? (0, import_react_dom.flushSync)(update) : update(), result;
      },
      [setFlushed]
    );
    return [hasPendingChanges, setDirty, setClean];
  }

  // js/views/edit/EditPage.tsx
  function legalFields(recordDataModel, recordInfo) {
    function isLegalField(field) {
      switch (field.name) {
        case "_id":
        case "_path":
        case "_gid":
        case "_alt":
        case "_source_alt":
        case "_model":
        case "_attachment_for":
          return !1;
        case "_attachment_type":
          return recordInfo.is_attachment;
      }
      return !0;
    }
    return recordDataModel.fields.filter(isLegalField);
  }
  function getPlaceholderForField(recordInfo, Widget, field) {
    return field.default !== null ? Widget.deserializeValue ? Widget.deserializeValue(field.default, field.type) : field.default : field.name === "_slug" ? recordInfo.slug_format : field.name === "_template" ? recordInfo.default_template : field.name === "_attachment_type" ? recordInfo.implied_attachment_type : null;
  }
  function getValueForField(recordData, Widget, field) {
    let value = recordData[field.name];
    return value === void 0 && (value = "", Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type))), value;
  }
  function getRecordData({ data: data2, datamodel, record_info }) {
    let recordData = {};
    return legalFields(datamodel, record_info).forEach((field) => {
      let Widget = getWidgetComponentWithFallback(field.type), value = data2[field.name];
      value !== void 0 && (Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type)), recordData[field.name] = value);
    }), recordData;
  }
  function getValues({
    recordDataModel,
    recordInfo,
    recordData
  }) {
    let rv = {};
    return !recordDataModel || !recordInfo || legalFields(recordDataModel, recordInfo).forEach((field) => {
      let value = recordData[field.name];
      if (value !== void 0) {
        let Widget = getWidgetComponentWithFallback(field.type);
        Widget.serializeValue && (value = Widget.serializeValue(value, field.type));
      } else
        value = null;
      rv[field.name] = value;
    }), rv;
  }
  function EditPage() {
    let { path, alt } = useRecord(), form = (0, import_react44.useRef)(null), [recordData, setRecordData] = (0, import_react44.useState)({}), [recordDataModel, setRecordDataModel] = (0, import_react44.useState)(null), [recordInfo, setRecordInfo] = (0, import_react44.useState)(null), [hasPendingChanges, setDirty, setClean] = useChangedFlag(), goToAdminPage = useGoToAdminPage();
    usePrompt({
      when: hasPendingChanges,
      message: trans("UNLOAD_ACTIVE_TAB")
    }), (0, import_react44.useEffect)(() => {
      let ignore = !1;
      return setClean(
        async () => {
          let rawrecord = await get("/rawrecord", { path, alt }).catch(
            showErrorDialog
          );
          ignore || (setRecordData(getRecordData(rawrecord)), setRecordDataModel(rawrecord.datamodel), setRecordInfo(rawrecord.record_info));
        },
        { sync: !0 }
      ).catch(console.error), () => {
        ignore = !0;
      };
    }, [alt, path, setClean]);
    let setFieldValue = (0, import_react44.useCallback)(
      (fieldName, value) => {
        setRecordData((r) => ({
          ...r,
          [fieldName]: typeof value == "function" ? value(r[fieldName]) : value
        })), setDirty();
      },
      [setDirty]
    ), maybeSaveChanges = (0, import_react44.useCallback)(async () => {
      if (hasPendingChanges)
        return setClean(
          async () => {
            let data2 = getValues({ recordDataModel, recordInfo, recordData });
            await put("/rawrecord", { data: data2, path, alt }).catch(showErrorDialog);
          },
          { sync: !0 }
        );
    }, [
      path,
      alt,
      hasPendingChanges,
      setClean,
      recordData,
      recordDataModel,
      recordInfo
    ]);
    (0, import_react44.useEffect)(() => {
      let saveAndPreview = async () => {
        await maybeSaveChanges(), goToAdminPage("preview", path, alt);
      }, cleanup = [
        setShortcutHandler("SAVE_SHORTCUT" /* Save */, () => {
          maybeSaveChanges().catch(console.error);
        }),
        setShortcutHandler("PREVIEW_SHORTCUT" /* Preview */, () => {
          saveAndPreview().catch(console.error);
        })
      ];
      return () => {
        cleanup.forEach((cb) => {
          cb();
        });
      };
    }, [maybeSaveChanges, path, alt, goToAdminPage]);
    let renderFormField = (0, import_react44.useCallback)(
      (field) => {
        let Widget = getWidgetComponentWithFallback(field.type);
        if (!recordInfo)
          return null;
        let disabled = !(field.alts_enabled === null || field.alts_enabled !== (recordInfo.alt === "_primary"));
        return /* @__PURE__ */ import_react44.default.createElement(
          FieldBox,
          {
            key: field.name,
            value: getValueForField(recordData, Widget, field),
            placeholder: getPlaceholderForField(recordInfo, Widget, field),
            field,
            setFieldValue,
            disabled
          }
        );
      },
      [recordData, recordInfo, setFieldValue]
    );
    if (!recordInfo || !recordDataModel)
      return null;
    let label = trans_fallback(recordInfo.label_i18n, recordInfo.label), title = recordInfo.is_attachment ? trans_format("EDIT_ATTACHMENT_METADATA_OF", label) : trans_format("EDIT_PAGE_NAME", label), fields = legalFields(recordDataModel, recordInfo), [normalFields, systemFields] = splitFields(fields);
    return /* @__PURE__ */ import_react44.default.createElement(import_react44.default.Fragment, null, /* @__PURE__ */ import_react44.default.createElement("h2", null, title), /* @__PURE__ */ import_react44.default.createElement(
      "form",
      {
        ref: form,
        onSubmit: (e) => {
          e.preventDefault(), maybeSaveChanges().catch(console.error);
        }
      },
      /* @__PURE__ */ import_react44.default.createElement(FieldRows, { fields: normalFields, renderFunc: renderFormField }),
      systemFields.length > 0 && /* @__PURE__ */ import_react44.default.createElement(
        ToggleGroup,
        {
          groupTitle: trans("SYSTEM_FIELDS"),
          className: "system-fields"
        },
        /* @__PURE__ */ import_react44.default.createElement(FieldRows, { fields: systemFields, renderFunc: renderFormField })
      ),
      /* @__PURE__ */ import_react44.default.createElement(
        EditPageActions,
        {
          recordInfo,
          hasPendingChanges
        }
      )
    ));
  }
  var EditPage_default = EditPage;

  // js/views/delete/DeletePage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react51 = __toESM(require_react());

  // js/views/delete/DeletableAttachments.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react45 = __toESM(require_react());
  function DeletableAttachments({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react45.default.createElement("div", null, /* @__PURE__ */ import_react45.default.createElement("h4", null, trans("ATTACHMENTS_TO_BE_DELETED")), /* @__PURE__ */ import_react45.default.createElement("ul", null, recordInfo.attachments.map((atch) => /* @__PURE__ */ import_react45.default.createElement("li", { key: atch.id }, atch.id, " (", atch.type, ")"))));
  }

  // js/views/delete/DeletableChildPages.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react46 = __toESM(require_react());
  function DeletableChildPages({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("h4", null, trans("CHILD_PAGES_TO_BE_DELETED")), /* @__PURE__ */ import_react46.default.createElement("ul", null, recordInfo.children.map((child) => /* @__PURE__ */ import_react46.default.createElement("li", { key: child.id }, trans_obj(child.label_i18n)))));
  }

  // js/views/delete/DeletableAlternatives.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react47 = __toESM(require_react());
  function DeletableAlternatives({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement("h4", null, trans("ALTS_TO_BE_DELETED")), /* @__PURE__ */ import_react47.default.createElement("ul", null, recordInfo.alts.filter((i) => i.exists).map((item) => {
      let title = trans_obj(item.name_i18n);
      return item.is_primary ? title += " (" + trans("PRIMARY_ALT") + ")" : item.primary_overlay && (title += " (" + trans("PRIMARY_OVERLAY") + ")"), /* @__PURE__ */ import_react47.default.createElement("li", { key: item.alt }, title);
    })));
  }

  // js/views/delete/DeletePageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react48 = __toESM(require_react());
  function DeletePageActions({
    deleteRecord,
    cancelDelete
  }) {
    return /* @__PURE__ */ import_react48.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react48.default.createElement("button", { type: "button", className: "btn btn-primary", onClick: deleteRecord }, trans("YES_DELETE")), /* @__PURE__ */ import_react48.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: cancelDelete
      },
      trans("NO_CANCEL")
    ));
  }

  // js/views/delete/DeleteAllAltsChoice.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react49 = __toESM(require_react());
  function DeleteAllAltsChoice({
    deleteMasterRecord,
    setDeleteMasterRecord,
    isAttachment
  }) {
    return /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, /* @__PURE__ */ import_react49.default.createElement("p", null, trans("DELETE_PRIMARY_ALT_INFO")), /* @__PURE__ */ import_react49.default.createElement("ul", null, /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement("label", null, /* @__PURE__ */ import_react49.default.createElement(
      "input",
      {
        type: "radio",
        checked: deleteMasterRecord,
        onChange: () => {
          setDeleteMasterRecord(!0);
        }
      }
    ), " ", trans(
      isAttachment ? "DELETE_ALL_ATTACHMENT_ALTS" : "DELETE_ALL_PAGE_ALTS"
    ))), /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement("label", null, /* @__PURE__ */ import_react49.default.createElement(
      "input",
      {
        type: "radio",
        checked: !deleteMasterRecord,
        onChange: () => {
          setDeleteMasterRecord(!1);
        }
      }
    ), " ", trans(
      isAttachment ? "DELETE_ONLY_PRIMARY_ATTACHMENT_ALT" : "DELETE_ONLY_PRIMARY_PAGE_ALT"
    )))));
  }

  // js/views/delete/DeletePageHeader.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react50 = __toESM(require_react());
  function DeletePageHeader({
    recordInfo,
    currentAlt
  }) {
    let isPrimary = currentAlt === "_primary", altInfo = recordInfo.alts.find((a) => a.alt === currentAlt), label = trans_fallback(recordInfo.label_i18n, recordInfo.id);
    return !isPrimary && altInfo && (label += ` (${trans_obj(altInfo.name_i18n)})`), /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("h2", null, trans_format("DELETE_RECORD", label)), recordInfo.is_attachment ? /* @__PURE__ */ import_react50.default.createElement("p", null, isPrimary ? trans("DELETE_ATTACHMENT_PROMPT") : trans("DELETE_ATTACHMENT_ALT_PROMPT"), " ") : /* @__PURE__ */ import_react50.default.createElement("p", null, isPrimary ? trans("DELETE_PAGE_PROMPT") : trans("DELETE_PAGE_ALT_PROMPT"), " ", recordInfo.children.length > 0 && isPrimary ? trans("DELETE_PAGE_CHILDREN_WARNING") : null));
  }

  // js/views/delete/DeletePage.tsx
  function DeletePage() {
    let { path, alt } = useRecord(), [recordInfo, setRecordInfo] = (0, import_react51.useState)(null), [deleteMasterRecord, setDeleteMasterRecord] = (0, import_react51.useState)(!0), goToAdminPage = useGoToAdminPage();
    (0, import_react51.useEffect)(() => {
      let ignore = !1;
      return get("/recordinfo", { path }).then((resp) => {
        ignore || setRecordInfo(resp);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]), (0, import_react51.useEffect)(() => {
      setDeleteMasterRecord(alt === "_primary");
    }, [alt]);
    let deleteRecord = (0, import_react51.useCallback)(() => {
      let parent = getParentPath(path), targetPath = parent === null ? "/" : parent;
      post("/deleterecord", {
        path,
        alt,
        delete_master: deleteMasterRecord ? "1" : "0"
      }).then(() => {
        recordInfo != null && recordInfo.is_attachment && dispatch("lektor-attachments-changed", parent != null ? parent : ""), goToAdminPage("edit", targetPath, alt);
      }, showErrorDialog);
    }, [alt, path, deleteMasterRecord, goToAdminPage, recordInfo]), cancelDelete = (0, import_react51.useCallback)(() => {
      goToAdminPage("edit", path, alt);
    }, [goToAdminPage, path, alt]);
    if (!recordInfo || !recordInfo.can_be_deleted)
      return null;
    let hasAlts = recordInfo.alts.filter((a) => a.exists).length > 1;
    return /* @__PURE__ */ import_react51.default.createElement("div", null, /* @__PURE__ */ import_react51.default.createElement(DeletePageHeader, { recordInfo, currentAlt: alt }), hasAlts && alt === "_primary" && /* @__PURE__ */ import_react51.default.createElement(
      DeleteAllAltsChoice,
      {
        deleteMasterRecord,
        setDeleteMasterRecord,
        isAttachment: recordInfo.is_attachment
      }
    ), deleteMasterRecord && /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, hasAlts && alt === "_primary" && /* @__PURE__ */ import_react51.default.createElement(DeletableAlternatives, { recordInfo }), recordInfo.children.length > 0 && /* @__PURE__ */ import_react51.default.createElement(DeletableChildPages, { recordInfo }), recordInfo.attachments.length > 0 && /* @__PURE__ */ import_react51.default.createElement(DeletableAttachments, { recordInfo })), /* @__PURE__ */ import_react51.default.createElement(
      DeletePageActions,
      {
        deleteRecord,
        cancelDelete
      }
    ));
  }
  var DeletePage_default = DeletePage;

  // js/views/PreviewPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react52 = __toESM(require_react());
  function getSiteRootUrl() {
    let site_root = `/${trimLeadingSlashes($LEKTOR_CONFIG.site_root)}`, absRootUrl = new URL(site_root, document.baseURI).href;
    return trimTrailingSlashes(absRootUrl);
  }
  function usePreviewUrl(siteRootUrl) {
    let { path, alt } = useRecord(), [previewUrl, setPreviewUrl] = (0, import_react52.useState)("about:blank");
    return (0, import_react52.useEffect)(() => {
      let ignore = !1;
      return get("/previewinfo", { path, alt }).then(({ url }) => {
        ignore || setPreviewUrl(url ? siteRootUrl + url : "about:blank");
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path, alt, siteRootUrl]), previewUrl;
  }
  function PreviewPage() {
    let siteRootUrl = (0, import_react52.useMemo)(() => getSiteRootUrl(), []), previewUrl = usePreviewUrl(siteRootUrl), iframe = (0, import_react52.useRef)(null), goToAdminPage = useGoToAdminPage();
    (0, import_react52.useEffect)(() => {
      var _a2, _b;
      let location2 = (_b = (_a2 = iframe.current) == null ? void 0 : _a2.contentWindow) == null ? void 0 : _b.location;
      location2 && location2.href !== previewUrl && location2.replace(previewUrl);
    }, [previewUrl]);
    let onLoad = (0, import_react52.useCallback)(() => {
      var _a2;
      let contentWindow = (_a2 = iframe.current) == null ? void 0 : _a2.contentWindow;
      if (contentWindow)
        try {
          contentWindow.addEventListener("keydown", (ev) => {
            let clone = new KeyboardEvent(ev.type, ev);
            window.dispatchEvent(clone) || ev.preventDefault();
          });
          let href = contentWindow.location.href;
          if (href && href !== previewUrl && href.startsWith(`${siteRootUrl}/`)) {
            let url_path = href.substring(siteRootUrl.length);
            get("/matchurl", { url_path }).then(({ exists, alt, path }) => {
              exists && goToAdminPage("preview", path, alt);
            }, showErrorDialog);
          }
        } catch (e) {
          if (!(e instanceof DOMException && e.name === "SecurityError"))
            throw e;
        }
    }, [goToAdminPage, previewUrl, siteRootUrl]);
    return /* @__PURE__ */ import_react52.default.createElement("iframe", { className: "preview", ref: iframe, onLoad });
  }

  // js/views/add-child-page/AddChildPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react56 = __toESM(require_react());

  // js/slugify.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var charmap = {
    // latin
    \u00C0: "A",
    \u00C1: "A",
    \u00C2: "A",
    \u00C3: "A",
    \u00C4: "Ae",
    \u00C5: "A",
    \u00C6: "AE",
    \u00C7: "C",
    \u00C8: "E",
    \u00C9: "E",
    \u00CA: "E",
    \u00CB: "E",
    \u00CC: "I",
    \u00CD: "I",
    \u00CE: "I",
    \u00CF: "I",
    \u00D0: "D",
    \u00D1: "N",
    \u00D2: "O",
    \u00D3: "O",
    \u00D4: "O",
    \u00D5: "O",
    \u00D6: "Oe",
    \u0150: "O",
    \u00D8: "O",
    \u00D9: "U",
    \u00DA: "U",
    \u00DB: "U",
    \u00DC: "Ue",
    \u0170: "U",
    \u00DD: "Y",
    \u00DE: "TH",
    \u00DF: "ss",
    \u00E0: "a",
    \u00E1: "a",
    \u00E2: "a",
    \u00E3: "a",
    \u00E4: "ae",
    \u00E5: "a",
    \u00E6: "ae",
    \u00E7: "c",
    \u00E8: "e",
    \u00E9: "e",
    \u00EA: "e",
    \u00EB: "e",
    \u00EC: "i",
    \u00ED: "i",
    \u00EE: "i",
    \u00EF: "i",
    \u00F0: "d",
    \u00F1: "n",
    \u00F2: "o",
    \u00F3: "o",
    \u00F4: "o",
    \u00F5: "o",
    \u00F6: "oe",
    \u0151: "o",
    \u00F8: "o",
    \u00F9: "u",
    \u00FA: "u",
    \u00FB: "u",
    \u00FC: "ue",
    \u0171: "u",
    \u00FD: "y",
    \u00FE: "th",
    \u00FF: "y",
    "\u1E9E": "SS",
    // greek
    \u03B1: "a",
    \u03B2: "b",
    \u03B3: "g",
    \u03B4: "d",
    \u03B5: "e",
    \u03B6: "z",
    \u03B7: "h",
    \u03B8: "8",
    \u03B9: "i",
    \u03BA: "k",
    \u03BB: "l",
    \u03BC: "m",
    \u03BD: "n",
    \u03BE: "3",
    \u03BF: "o",
    \u03C0: "p",
    \u03C1: "r",
    \u03C3: "s",
    \u03C4: "t",
    \u03C5: "y",
    \u03C6: "f",
    \u03C7: "x",
    \u03C8: "ps",
    \u03C9: "w",
    \u03AC: "a",
    \u03AD: "e",
    \u03AF: "i",
    \u03CC: "o",
    \u03CD: "y",
    \u03AE: "h",
    \u03CE: "w",
    \u03C2: "s",
    \u03CA: "i",
    \u03B0: "y",
    \u03CB: "y",
    \u0390: "i",
    \u0391: "A",
    \u0392: "B",
    \u0393: "G",
    \u0394: "D",
    \u0395: "E",
    \u0396: "Z",
    \u0397: "H",
    \u0398: "8",
    \u0399: "I",
    \u039A: "K",
    \u039B: "L",
    \u039C: "M",
    \u039D: "N",
    \u039E: "3",
    \u039F: "O",
    \u03A0: "P",
    \u03A1: "R",
    \u03A3: "S",
    \u03A4: "T",
    \u03A5: "Y",
    \u03A6: "F",
    \u03A7: "X",
    \u03A8: "PS",
    \u03A9: "W",
    \u0386: "A",
    \u0388: "E",
    \u038A: "I",
    \u038C: "O",
    \u038E: "Y",
    \u0389: "H",
    \u038F: "W",
    \u03AA: "I",
    \u03AB: "Y",
    // turkish
    \u015F: "s",
    \u015E: "S",
    \u0131: "i",
    \u0130: "I",
    \u011F: "g",
    \u011E: "G",
    // russian
    \u0430: "a",
    \u0431: "b",
    \u0432: "v",
    \u0433: "g",
    \u0434: "d",
    \u0435: "e",
    \u0451: "yo",
    \u0436: "zh",
    \u0437: "z",
    \u0438: "i",
    \u0439: "j",
    \u043A: "k",
    \u043B: "l",
    \u043C: "m",
    \u043D: "n",
    \u043E: "o",
    \u043F: "p",
    \u0440: "r",
    \u0441: "s",
    \u0442: "t",
    \u0443: "u",
    \u0444: "f",
    \u0445: "h",
    \u0446: "c",
    \u0447: "ch",
    \u0448: "sh",
    \u0449: "sh",
    \u044A: "u",
    \u044B: "y",
    \u044C: "",
    \u044D: "e",
    \u044E: "yu",
    \u044F: "ya",
    \u0410: "A",
    \u0411: "B",
    \u0412: "V",
    \u0413: "G",
    \u0414: "D",
    \u0415: "E",
    \u0401: "Yo",
    \u0416: "Zh",
    \u0417: "Z",
    \u0418: "I",
    \u0419: "J",
    \u041A: "K",
    \u041B: "L",
    \u041C: "M",
    \u041D: "N",
    \u041E: "O",
    \u041F: "P",
    \u0420: "R",
    \u0421: "S",
    \u0422: "T",
    \u0423: "U",
    \u0424: "F",
    \u0425: "H",
    \u0426: "C",
    \u0427: "Ch",
    \u0428: "Sh",
    \u0429: "Sh",
    \u042A: "U",
    \u042B: "Y",
    \u042C: "",
    \u042D: "E",
    \u042E: "Yu",
    \u042F: "Ya",
    // ukranian
    \u0404: "Ye",
    \u0406: "I",
    \u0407: "Yi",
    \u0490: "G",
    \u0454: "ye",
    \u0456: "i",
    \u0457: "yi",
    \u0491: "g",
    // czech
    \u010D: "c",
    \u010F: "d",
    \u011B: "e",
    \u0148: "n",
    \u0159: "r",
    \u0161: "s",
    \u0165: "t",
    \u016F: "u",
    \u017E: "z",
    \u010C: "C",
    \u010E: "D",
    \u011A: "E",
    \u0147: "N",
    \u0158: "R",
    \u0160: "S",
    \u0164: "T",
    \u016E: "U",
    \u017D: "Z",
    // polish
    \u0105: "a",
    \u0107: "c",
    \u0119: "e",
    \u0142: "l",
    \u0144: "n",
    \u015B: "s",
    \u017A: "z",
    \u017C: "z",
    \u0104: "A",
    \u0106: "C",
    \u0118: "E",
    \u0141: "L",
    \u0143: "N",
    \u015A: "S",
    \u0179: "Z",
    \u017B: "Z",
    // latvian
    \u0101: "a",
    \u0113: "e",
    \u0123: "g",
    \u012B: "i",
    \u0137: "k",
    \u013C: "l",
    \u0146: "n",
    \u016B: "u",
    \u0100: "A",
    \u0112: "E",
    \u0122: "G",
    \u012A: "I",
    \u0136: "K",
    \u013B: "L",
    \u0145: "N",
    \u016A: "U",
    // lithuanian
    \u0117: "e",
    \u012F: "i",
    \u0173: "u",
    \u0116: "E",
    \u012E: "I",
    \u0172: "U",
    // romanian
    \u021B: "t",
    \u021A: "T",
    \u0163: "t",
    \u0162: "T",
    \u0219: "s",
    \u0218: "S",
    \u0103: "a",
    \u0102: "A",
    // currency
    "\u20AC": "euro",
    "\u20A2": "cruzeiro",
    "\u20A3": "french franc",
    "\xA3": "pound",
    "\u20A4": "lira",
    "\u20A5": "mill",
    "\u20A6": "naira",
    "\u20A7": "peseta",
    "\u20A8": "rupee",
    "\u20A9": "won",
    "\u20AA": "new shequel",
    "\u20AB": "dong",
    "\u20AD": "kip",
    "\u20AE": "tugrik",
    "\u20AF": "drachma",
    "\u20B0": "penny",
    "\u20B1": "peso",
    "\u20B2": "guarani",
    "\u20B3": "austral",
    "\u20B4": "hryvnia",
    "\u20B5": "cedi",
    "\xA2": "cent",
    "\xA5": "yen",
    \u5143: "yuan",
    \u5186: "yen",
    "\uFDFC": "rial",
    "\u20A0": "ecu",
    "\xA4": "currency",
    "\u0E3F": "baht",
    $: "dollar",
    "\u20B9": "indian rupee",
    // symbols
    "\xA9": "(c)",
    \u0153: "oe",
    \u0152: "OE",
    "\u2211": "sum",
    "\xAE": "(r)",
    "\u2020": "+",
    "\u201C": '"',
    "\u201D": '"',
    "\u2018": "'",
    "\u2019": "'",
    "\u2202": "d",
    \u0192: "f",
    "\u2122": "tm",
    "\u2120": "sm",
    "\u2026": "...",
    "\u02DA": "o",
    \u00BA: "o",
    \u00AA: "a",
    "\u2022": "*",
    "\u2206": "delta",
    "\u221E": "infinity",
    "\u2665": "love",
    "&": "and",
    "|": "or",
    "<": "less",
    ">": "greater",
    "=": "equals"
  }, multicharmap = {
    "<3": "love",
    "&&": "and",
    "||": "or",
    "w/": "with"
  }, pretty = {
    replacement: "-",
    remove: /[.]/g,
    charmap,
    multicharmap
  };
  function slugify(rawString) {
    let string = rawString.toString(), opts = pretty, lengths = [];
    Object.keys(opts.multicharmap).forEach((key) => {
      let len = key.length;
      lengths.includes(len) || lengths.push(len);
    });
    let result = "";
    for (let char, i = 0, l = string.length; i < l; i++)
      char = string[i], lengths.some((len) => {
        let str = string.substr(i, len);
        return opts.multicharmap[str] ? (i += len - 1, char = opts.multicharmap[str], !0) : !1;
      }) || opts.charmap[char] && (char = opts.charmap[char]), char = char.replace(/[^\w\s\-._~]/g, ""), opts.remove && (char = char.replace(opts.remove, "")), result += char;
    return result = result.replace(/^\s+|\s+$/g, ""), result = result.replace(/[-\s]+/g, opts.replacement), result.replace(opts.replacement + "$", "");
  }

  // js/views/add-child-page/AvailableModels.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react53 = __toESM(require_react());
  function AvailableModels({
    newChildInfo,
    selected,
    setSelected
  }) {
    let available = Object.values(newChildInfo.available_models).sort(
      (a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())
    );
    return /* @__PURE__ */ import_react53.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react53.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react53.default.createElement("dt", null, trans("MODEL")), /* @__PURE__ */ import_react53.default.createElement("dd", null, /* @__PURE__ */ import_react53.default.createElement(
      "select",
      {
        value: selected,
        className: "form-control",
        onChange: (event) => {
          setSelected(event.target.value);
        }
      },
      available.map((model) => /* @__PURE__ */ import_react53.default.createElement("option", { value: model.id, key: model.id }, trans_obj(model.name_i18n)))
    )))));
  }

  // js/views/add-child-page/PrimaryFieldRow.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react54 = __toESM(require_react());
  function PrimaryField({
    primary,
    field,
    setPrimary
  }) {
    let Widget = getWidgetComponentWithFallback(field.type), value = Widget.deserializeValue ? Widget.deserializeValue(primary, field.type) : primary;
    return /* @__PURE__ */ import_react54.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react54.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react54.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react54.default.createElement("dt", null, formatUserLabel(field.label_i18n)), /* @__PURE__ */ import_react54.default.createElement("dd", null, /* @__PURE__ */ import_react54.default.createElement(
      Widget,
      {
        value,
        onChange: setPrimary,
        type: field.type,
        field
      }
    )))));
  }

  // js/views/add-child-page/Slug.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react55 = __toESM(require_react());
  function Slug({
    id,
    placeholder,
    setId
  }) {
    return /* @__PURE__ */ import_react55.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react55.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react55.default.createElement("dt", null, formatUserLabel(trans("ID"))), /* @__PURE__ */ import_react55.default.createElement("dd", null, /* @__PURE__ */ import_react55.default.createElement(
      SlugInputWidget,
      {
        value: id,
        placeholder,
        onChange: setId,
        type: { widget: "slug", name: "slug", size: "normal" }
      }
    )))));
  }

  // js/views/add-child-page/AddChildPage.tsx
  var alertErr = (text) => {
    alert(trans("ERROR_PREFIX") + text);
  };
  function AddChildPage() {
    var _a2;
    let { path, alt } = useRecord(), [newChildInfo, setNewChildInfo] = (0, import_react56.useState)(null), [selectedModel, setSelectedModel] = (0, import_react56.useState)(""), [id, setId] = (0, import_react56.useState)(""), [primary, setPrimary] = (0, import_react56.useState)("");
    (0, import_react56.useEffect)(() => {
      let ignore = !1;
      return get("/newrecord", { path }).then((resp) => {
        var _a3;
        if (!ignore) {
          let defaultModel = resp.available_models.page ? "page" : Object.keys(resp.available_models).sort()[0], selectedModel2 = (_a3 = resp.implied_model) != null ? _a3 : defaultModel;
          setNewChildInfo(resp), setId(""), setPrimary(""), setSelectedModel(selectedModel2);
        }
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]);
    let primaryField = (_a2 = newChildInfo == null ? void 0 : newChildInfo.available_models[selectedModel]) == null ? void 0 : _a2.primary_field, goToAdminPage = useGoToAdminPage(), createRecord = (0, import_react56.useCallback)(() => {
      let currentId = id || slugify(primary).toLowerCase();
      if (!currentId) {
        alertErr(trans("ERROR_NO_ID_PROVIDED"));
        return;
      }
      let data2 = {};
      newChildInfo != null && newChildInfo.implied_model || (data2._model = selectedModel), primaryField && (data2[primaryField.name] = primary), post("/newrecord", null, { id: currentId, path, data: data2 }).then(
        ({ exists, valid_id, path: path2 }) => {
          exists ? alertErr(trans_format("ERROR_PAGE_ID_DUPLICATE", currentId)) : valid_id ? goToAdminPage("edit", path2, alt) : alertErr(trans_format("ERROR_INVALID_ID", currentId));
        },
        showErrorDialog
      );
    }, [
      alt,
      goToAdminPage,
      newChildInfo,
      id,
      path,
      primary,
      primaryField,
      selectedModel
    ]);
    return newChildInfo ? /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, /* @__PURE__ */ import_react56.default.createElement("h2", null, trans_format("ADD_CHILD_PAGE_TO", newChildInfo.label)), /* @__PURE__ */ import_react56.default.createElement("p", null, trans("ADD_CHILD_PAGE_NOTE")), !newChildInfo.implied_model && /* @__PURE__ */ import_react56.default.createElement(
      AvailableModels,
      {
        newChildInfo,
        selected: selectedModel,
        setSelected: setSelectedModel
      }
    ), primaryField && /* @__PURE__ */ import_react56.default.createElement(
      PrimaryField,
      {
        primary,
        setPrimary,
        field: primaryField
      }
    ), /* @__PURE__ */ import_react56.default.createElement(
      Slug,
      {
        id,
        placeholder: slugify(primary).toLowerCase(),
        setId
      }
    ), /* @__PURE__ */ import_react56.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react56.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-primary",
        onClick: createRecord
      },
      trans("CREATE_CHILD_PAGE")
    ))) : null;
  }
  var AddChildPage_default = AddChildPage;

  // js/views/AddAttachmentPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react57 = __toESM(require_react());
  function AddAttachmentPage() {
    let path = useRecordPath(), [newAttachmentInfo, setNewAttachmentInfo] = (0, import_react57.useState)(null), fileInput = (0, import_react57.useRef)(null), [currentFiles, setCurrentFiles] = (0, import_react57.useState)([]), [isUploading, setIsUploading] = (0, import_react57.useState)(!1), [currentProgress, setCurrentProgress] = (0, import_react57.useState)(0);
    (0, import_react57.useEffect)(() => {
      let ignore = !1;
      return get("/newattachment", { path }).then((resp) => {
        ignore || setNewAttachmentInfo(resp);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]);
    let onFileSelected = (0, import_react57.useCallback)(
      ({ target }) => {
        if (isUploading || !target.files)
          return;
        let files = Array.prototype.slice.call(target.files, 0);
        setCurrentFiles(files), setIsUploading(!0);
        let formData = new FormData();
        formData.append("path", path), files.forEach((file) => {
          formData.append("file", file, file.name);
        });
        let xhr = new XMLHttpRequest();
        xhr.open("POST", apiUrl("/newattachment")), xhr.onprogress = (event) => {
          setCurrentProgress(Math.round(event.loaded * 100 / event.total));
        }, xhr.onload = () => {
          setIsUploading(!1), setCurrentProgress(100), dispatch("lektor-attachments-changed", path);
        }, xhr.send(formData);
      },
      [path, isUploading]
    );
    return newAttachmentInfo ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("h2", null, trans_format("ADD_ATTACHMENT_TO", newAttachmentInfo.label)), /* @__PURE__ */ import_react57.default.createElement("p", null, trans("ADD_ATTACHMENT_NOTE")), /* @__PURE__ */ import_react57.default.createElement("ul", null, currentFiles.map((file) => /* @__PURE__ */ import_react57.default.createElement("li", { key: file.name }, file.name, " (", file.type, ")"))), /* @__PURE__ */ import_react57.default.createElement("p", null, trans("PROGRESS"), ": ", currentProgress, "%"), /* @__PURE__ */ import_react57.default.createElement(
      "input",
      {
        type: "file",
        ref: fileInput,
        multiple: !0,
        style: { display: "none" },
        onChange: onFileSelected
      }
    ), /* @__PURE__ */ import_react57.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react57.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-primary",
        onClick: () => {
          var _a2;
          return (_a2 = fileInput.current) == null ? void 0 : _a2.click();
        }
      },
      trans("UPLOAD")
    ))) : null;
  }
  var AddAttachmentPage_default = AddAttachmentPage;

  // js/views/App.tsx
  var mainComponentForPage = {
    edit: EditPage_default,
    delete: DeletePage_default,
    preview: PreviewPage,
    "add-child": AddChildPage_default,
    upload: AddAttachmentPage_default
  };
  function App() {
    let page = (0, import_react58.useContext)(PageContext), [sidebarIsActive, toggleSidebar] = (0, import_react58.useReducer)((v) => !v, !1), [appSettings, setAppSettings] = (0, import_react58.useState)(loadAppSettings()), { path, alt } = useRecord(), goToAdminPage = useGoToAdminPage(), MainComponent = mainComponentForPage[page];
    return (0, import_react58.useEffect)(() => (saveAppSettings(appSettings), installShortcutKeyListener(appSettings.shortcutKeyMap)), [appSettings]), (0, import_react58.useEffect)(() => {
      let cleanup = [
        { action: "EDIT_SHORTCUT" /* Edit */, target: "edit" },
        { action: "PREVIEW_SHORTCUT" /* Preview */, target: "preview" }
      ].filter(({ target }) => target != page).map(
        ({ action, target }) => setShortcutHandler(action, () => {
          goToAdminPage(target, path, alt);
        })
      );
      return () => {
        cleanup.forEach((cb) => {
          cb();
        });
      };
    }, [page, path, alt, goToAdminPage]), /* @__PURE__ */ import_react58.default.createElement(AppSettingsContext.Provider, { value: appSettings }, /* @__PURE__ */ import_react58.default.createElement(Header, { sidebarIsActive, toggleSidebar }), /* @__PURE__ */ import_react58.default.createElement(ErrorDialog, null), /* @__PURE__ */ import_react58.default.createElement(DialogSlot, { setAppSettings }), /* @__PURE__ */ import_react58.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react58.default.createElement(
      "div",
      {
        className: sidebarIsActive ? "block-offcanvas row active" : "block-offcanvas row"
      },
      /* @__PURE__ */ import_react58.default.createElement("nav", { className: "sidebar col-md-2 col-sm-3" }, /* @__PURE__ */ import_react58.default.createElement(Sidebar_default, null)),
      /* @__PURE__ */ import_react58.default.createElement("div", { className: "main col-md-10 col-sm-9" }, /* @__PURE__ */ import_react58.default.createElement(MainComponent, null))
    )), /* @__PURE__ */ import_react58.default.createElement(ServerStatus, null));
  }

  // js/main.tsx
  function Page({ page }) {
    let { search } = useLocation(), record = (0, import_react59.useMemo)(() => {
      var _a2, _b;
      let params = new URLSearchParams(search);
      return {
        path: `/${trimSlashes((_a2 = params.get("path")) != null ? _a2 : "/")}`,
        alt: (_b = params.get("alt")) != null ? _b : "_primary"
      };
    }, [search]);
    return /* @__PURE__ */ import_react59.default.createElement(PageContext.Provider, { value: page }, /* @__PURE__ */ import_react59.default.createElement(RecordContext.Provider, { value: record }, /* @__PURE__ */ import_react59.default.createElement(App, null)));
  }
  function Main() {
    var _a2;
    let page = (_a2 = useMatch(":page")) == null ? void 0 : _a2.params.page;
    return isPageName(page) ? /* @__PURE__ */ import_react59.default.createElement(Page, { page }) : /* @__PURE__ */ import_react59.default.createElement(Navigate, { to: adminPath("edit", "/", "_primary") });
  }
  var dash = document.getElementById("dash");
  if (dash) {
    setCurrentLanguage($LEKTOR_CONFIG.lang);
    let root = (0, import_client.createRoot)(dash), router = createBrowserRouter(
      [
        {
          path: "/",
          element: /* @__PURE__ */ import_react59.default.createElement(Navigate, { to: adminPath("edit", "/", "_primary") })
        },
        {
          path: "/:page",
          element: /* @__PURE__ */ import_react59.default.createElement(Main, null)
        }
      ],
      {
        basename: $LEKTOR_CONFIG.admin_root
      }
    ), app = /* @__PURE__ */ import_react59.default.createElement(RouterProvider2, { router });
    root.render(app);
  }
})();
/*! Bundled license information:

react/cjs/react.production.js:
  (**
   * @license React
   * react.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

scheduler/cjs/scheduler.production.js:
  (**
   * @license React
   * scheduler.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom.production.js:
  (**
   * @license React
   * react-dom.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom-client.production.js:
  (**
   * @license React
   * react-dom-client.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-router/dist/development/chunk-EPOLDU6W.mjs:
react-router/dist/development/dom-export.mjs:
react-router/dist/development/index.mjs:
  (**
   * react-router v7.12.0
   *
   * Copyright (c) Remix Software Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

react-router-dom/dist/index.mjs:
  (**
   * react-router-dom v7.12.0
   *
   * Copyright (c) Remix Software Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)
*/
//# sourceMappingURL=app.js.map
