import { k as Vt, p as en, s as tn, e as rn, r as nn, O as Ze, l as Z, m as an, N as on, n as pe, S as sn, R as Je, o as Qe, q as un, t as cn, J as ln, b as Me, u as fn, v as Yt, w as zt, z as Bt, D as Kt, M as Dt, F as Pe, c as Ne, G as Ut } from "./index.es-i1FEgVLi.js";
import { Y as Tn, I as kn } from "./index.es-i1FEgVLi.js";
var v = {};
/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Ft;
function dn() {
  if (Ft)
    return v;
  Ft = 1;
  var i = Symbol.for("react.element"), a = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), E = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), q = Symbol.for("react.suspense"), H = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), G = Symbol.iterator;
  function z(r) {
    return r === null || typeof r != "object" ? null : (r = G && r[G] || r["@@iterator"], typeof r == "function" ? r : null);
  }
  var U = { isMounted: function() {
    return !1;
  }, enqueueForceUpdate: function() {
  }, enqueueReplaceState: function() {
  }, enqueueSetState: function() {
  } }, V = Object.assign, ve = {};
  function B(r, u, h) {
    this.props = r, this.context = u, this.refs = ve, this.updater = h || U;
  }
  B.prototype.isReactComponent = {}, B.prototype.setState = function(r, u) {
    if (typeof r != "object" && typeof r != "function" && r != null)
      throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
    this.updater.enqueueSetState(this, r, u, "setState");
  }, B.prototype.forceUpdate = function(r) {
    this.updater.enqueueForceUpdate(this, r, "forceUpdate");
  };
  function ye() {
  }
  ye.prototype = B.prototype;
  function re(r, u, h) {
    this.props = r, this.context = u, this.refs = ve, this.updater = h || U;
  }
  var ne = re.prototype = new ye();
  ne.constructor = re, V(ne, B.prototype), ne.isPureReactComponent = !0;
  var K = Array.isArray, j = Object.prototype.hasOwnProperty, D = { current: null }, J = { key: !0, ref: !0, __self: !0, __source: !0 };
  function ee(r, u, h) {
    var _, y = {}, S = null, I = null;
    if (u != null)
      for (_ in u.ref !== void 0 && (I = u.ref), u.key !== void 0 && (S = "" + u.key), u)
        j.call(u, _) && !J.hasOwnProperty(_) && (y[_] = u[_]);
    var R = arguments.length - 2;
    if (R === 1)
      y.children = h;
    else if (1 < R) {
      for (var O = Array(R), $ = 0; $ < R; $++)
        O[$] = arguments[$ + 2];
      y.children = O;
    }
    if (r && r.defaultProps)
      for (_ in R = r.defaultProps, R)
        y[_] === void 0 && (y[_] = R[_]);
    return { $$typeof: i, type: r, key: S, ref: I, props: y, _owner: D.current };
  }
  function ge(r, u) {
    return { $$typeof: i, type: r.type, key: u, ref: r.ref, props: r.props, _owner: r._owner };
  }
  function ue(r) {
    return typeof r == "object" && r !== null && r.$$typeof === i;
  }
  function xe(r) {
    var u = { "=": "=0", ":": "=2" };
    return "$" + r.replace(/[=:]/g, function(h) {
      return u[h];
    });
  }
  var me = /\/+/g;
  function ce(r, u) {
    return typeof r == "object" && r !== null && r.key != null ? xe("" + r.key) : u.toString(36);
  }
  function ae(r, u, h, _, y) {
    var S = typeof r;
    (S === "undefined" || S === "boolean") && (r = null);
    var I = !1;
    if (r === null)
      I = !0;
    else
      switch (S) {
        case "string":
        case "number":
          I = !0;
          break;
        case "object":
          switch (r.$$typeof) {
            case i:
            case a:
              I = !0;
          }
      }
    if (I)
      return I = r, y = y(I), r = _ === "" ? "." + ce(I, 0) : _, K(y) ? (h = "", r != null && (h = r.replace(me, "$&/") + "/"), ae(y, u, h, "", function($) {
        return $;
      })) : y != null && (ue(y) && (y = ge(y, h + (!y.key || I && I.key === y.key ? "" : ("" + y.key).replace(me, "$&/") + "/") + r)), u.push(y)), 1;
    if (I = 0, _ = _ === "" ? "." : _ + ":", K(r))
      for (var R = 0; R < r.length; R++) {
        S = r[R];
        var O = _ + ce(S, R);
        I += ae(S, u, h, O, y);
      }
    else if (O = z(r), typeof O == "function")
      for (r = O.call(r), R = 0; !(S = r.next()).done; )
        S = S.value, O = _ + ce(S, R++), I += ae(S, u, h, O, y);
    else if (S === "object")
      throw u = String(r), Error("Objects are not valid as a React child (found: " + (u === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : u) + "). If you meant to render a collection of children, use an array instead.");
    return I;
  }
  function W(r, u, h) {
    if (r == null)
      return r;
    var _ = [], y = 0;
    return ae(r, _, "", "", function(S) {
      return u.call(h, S, y++);
    }), _;
  }
  function Q(r) {
    if (r._status === -1) {
      var u = r._result;
      u = u(), u.then(function(h) {
        (r._status === 0 || r._status === -1) && (r._status = 1, r._result = h);
      }, function(h) {
        (r._status === 0 || r._status === -1) && (r._status = 2, r._result = h);
      }), r._status === -1 && (r._status = 0, r._result = u);
    }
    if (r._status === 1)
      return r._result.default;
    throw r._result;
  }
  var d = { current: null }, te = { transition: null }, we = { ReactCurrentDispatcher: d, ReactCurrentBatchConfig: te, ReactCurrentOwner: D };
  return v.Children = { map: W, forEach: function(r, u, h) {
    W(r, function() {
      u.apply(this, arguments);
    }, h);
  }, count: function(r) {
    var u = 0;
    return W(r, function() {
      u++;
    }), u;
  }, toArray: function(r) {
    return W(r, function(u) {
      return u;
    }) || [];
  }, only: function(r) {
    if (!ue(r))
      throw Error("React.Children.only expected to receive a single React element child.");
    return r;
  } }, v.Component = B, v.Fragment = c, v.Profiler = b, v.PureComponent = re, v.StrictMode = m, v.Suspense = q, v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = we, v.cloneElement = function(r, u, h) {
    if (r == null)
      throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
    var _ = V({}, r.props), y = r.key, S = r.ref, I = r._owner;
    if (u != null) {
      if (u.ref !== void 0 && (S = u.ref, I = D.current), u.key !== void 0 && (y = "" + u.key), r.type && r.type.defaultProps)
        var R = r.type.defaultProps;
      for (O in u)
        j.call(u, O) && !J.hasOwnProperty(O) && (_[O] = u[O] === void 0 && R !== void 0 ? R[O] : u[O]);
    }
    var O = arguments.length - 2;
    if (O === 1)
      _.children = h;
    else if (1 < O) {
      R = Array(O);
      for (var $ = 0; $ < O; $++)
        R[$] = arguments[$ + 2];
      _.children = R;
    }
    return { $$typeof: i, type: r.type, key: y, ref: S, props: _, _owner: I };
  }, v.createContext = function(r) {
    return r = { $$typeof: E, _currentValue: r, _currentValue2: r, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, r.Provider = { $$typeof: w, _context: r }, r.Consumer = r;
  }, v.createElement = ee, v.createFactory = function(r) {
    var u = ee.bind(null, r);
    return u.type = r, u;
  }, v.createRef = function() {
    return { current: null };
  }, v.forwardRef = function(r) {
    return { $$typeof: N, render: r };
  }, v.isValidElement = ue, v.lazy = function(r) {
    return { $$typeof: Y, _payload: { _status: -1, _result: r }, _init: Q };
  }, v.memo = function(r, u) {
    return { $$typeof: H, type: r, compare: u === void 0 ? null : u };
  }, v.startTransition = function(r) {
    var u = te.transition;
    te.transition = {};
    try {
      r();
    } finally {
      te.transition = u;
    }
  }, v.unstable_act = function() {
    throw Error("act(...) is not supported in production builds of React.");
  }, v.useCallback = function(r, u) {
    return d.current.useCallback(r, u);
  }, v.useContext = function(r) {
    return d.current.useContext(r);
  }, v.useDebugValue = function() {
  }, v.useDeferredValue = function(r) {
    return d.current.useDeferredValue(r);
  }, v.useEffect = function(r, u) {
    return d.current.useEffect(r, u);
  }, v.useId = function() {
    return d.current.useId();
  }, v.useImperativeHandle = function(r, u, h) {
    return d.current.useImperativeHandle(r, u, h);
  }, v.useInsertionEffect = function(r, u) {
    return d.current.useInsertionEffect(r, u);
  }, v.useLayoutEffect = function(r, u) {
    return d.current.useLayoutEffect(r, u);
  }, v.useMemo = function(r, u) {
    return d.current.useMemo(r, u);
  }, v.useReducer = function(r, u, h) {
    return d.current.useReducer(r, u, h);
  }, v.useRef = function(r) {
    return d.current.useRef(r);
  }, v.useState = function(r) {
    return d.current.useState(r);
  }, v.useSyncExternalStore = function(r, u, h) {
    return d.current.useSyncExternalStore(r, u, h);
  }, v.useTransition = function() {
    return d.current.useTransition();
  }, v.version = "18.2.0", v;
}
var he = { exports: {} };
he.exports;
var Wt;
function pn() {
  return Wt || (Wt = 1, function(i, a) {
    Vt.env.NODE_ENV !== "production" && function() {
      typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
      var c = "18.2.0", m = Symbol.for("react.element"), b = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), q = Symbol.for("react.provider"), H = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), ve = Symbol.for("react.offscreen"), B = Symbol.iterator, ye = "@@iterator";
      function re(e) {
        if (e === null || typeof e != "object")
          return null;
        var t = B && e[B] || e[ye];
        return typeof t == "function" ? t : null;
      }
      var ne = {
        /**
         * @internal
         * @type {ReactComponent}
         */
        current: null
      }, K = {
        transition: null
      }, j = {
        current: null,
        // Used to reproduce behavior of `batchedUpdates` in legacy mode.
        isBatchingLegacy: !1,
        didScheduleLegacyUpdate: !1
      }, D = {
        /**
         * @internal
         * @type {ReactComponent}
         */
        current: null
      }, J = {}, ee = null;
      function ge(e) {
        ee = e;
      }
      J.setExtraStackFrame = function(e) {
        ee = e;
      }, J.getCurrentStack = null, J.getStackAddendum = function() {
        var e = "";
        ee && (e += ee);
        var t = J.getCurrentStack;
        return t && (e += t() || ""), e;
      };
      var ue = !1, xe = !1, me = !1, ce = !1, ae = !1, W = {
        ReactCurrentDispatcher: ne,
        ReactCurrentBatchConfig: K,
        ReactCurrentOwner: D
      };
      W.ReactDebugCurrentFrame = J, W.ReactCurrentActQueue = j;
      function Q(e) {
        {
          for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
            n[o - 1] = arguments[o];
          te("warn", e, n);
        }
      }
      function d(e) {
        {
          for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
            n[o - 1] = arguments[o];
          te("error", e, n);
        }
      }
      function te(e, t, n) {
        {
          var o = W.ReactDebugCurrentFrame, s = o.getStackAddendum();
          s !== "" && (t += "%s", n = n.concat([s]));
          var f = n.map(function(l) {
            return String(l);
          });
          f.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, f);
        }
      }
      var we = {};
      function r(e, t) {
        {
          var n = e.constructor, o = n && (n.displayName || n.name) || "ReactClass", s = o + "." + t;
          if (we[s])
            return;
          d("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, o), we[s] = !0;
        }
      }
      var u = {
        /**
         * Checks whether or not this composite component is mounted.
         * @param {ReactClass} publicInstance The instance we want to test.
         * @return {boolean} True if mounted, false otherwise.
         * @protected
         * @final
         */
        isMounted: function(e) {
          return !1;
        },
        /**
         * Forces an update. This should only be invoked when it is known with
         * certainty that we are **not** in a DOM transaction.
         *
         * You may want to call this when you know that some deeper aspect of the
         * component's state has changed but `setState` was not called.
         *
         * This will not invoke `shouldComponentUpdate`, but it will invoke
         * `componentWillUpdate` and `componentDidUpdate`.
         *
         * @param {ReactClass} publicInstance The instance that should rerender.
         * @param {?function} callback Called after component is updated.
         * @param {?string} callerName name of the calling function in the public API.
         * @internal
         */
        enqueueForceUpdate: function(e, t, n) {
          r(e, "forceUpdate");
        },
        /**
         * Replaces all of the state. Always use this or `setState` to mutate state.
         * You should treat `this.state` as immutable.
         *
         * There is no guarantee that `this.state` will be immediately updated, so
         * accessing `this.state` after calling this method may return the old value.
         *
         * @param {ReactClass} publicInstance The instance that should rerender.
         * @param {object} completeState Next state.
         * @param {?function} callback Called after component is updated.
         * @param {?string} callerName name of the calling function in the public API.
         * @internal
         */
        enqueueReplaceState: function(e, t, n, o) {
          r(e, "replaceState");
        },
        /**
         * Sets a subset of the state. This only exists because _pendingState is
         * internal. This provides a merging strategy that is not available to deep
         * properties which is confusing. TODO: Expose pendingState or don't use it
         * during the merge.
         *
         * @param {ReactClass} publicInstance The instance that should rerender.
         * @param {object} partialState Next partial state to be merged with state.
         * @param {?function} callback Called after component is updated.
         * @param {?string} Name of the calling function in the public API.
         * @internal
         */
        enqueueSetState: function(e, t, n, o) {
          r(e, "setState");
        }
      }, h = Object.assign, _ = {};
      Object.freeze(_);
      function y(e, t, n) {
        this.props = e, this.context = t, this.refs = _, this.updater = n || u;
      }
      y.prototype.isReactComponent = {}, y.prototype.setState = function(e, t) {
        if (typeof e != "object" && typeof e != "function" && e != null)
          throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
        this.updater.enqueueSetState(this, e, t, "setState");
      }, y.prototype.forceUpdate = function(e) {
        this.updater.enqueueForceUpdate(this, e, "forceUpdate");
      };
      {
        var S = {
          isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
          replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
        }, I = function(e, t) {
          Object.defineProperty(y.prototype, e, {
            get: function() {
              Q("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
            }
          });
        };
        for (var R in S)
          S.hasOwnProperty(R) && I(R, S[R]);
      }
      function O() {
      }
      O.prototype = y.prototype;
      function $(e, t, n) {
        this.props = e, this.context = t, this.refs = _, this.updater = n || u;
      }
      var De = $.prototype = new O();
      De.constructor = $, h(De, y.prototype), De.isPureReactComponent = !0;
      function qt() {
        var e = {
          current: null
        };
        return Object.seal(e), e;
      }
      var Ht = Array.isArray;
      function _e(e) {
        return Ht(e);
      }
      function Gt(e) {
        {
          var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
          return n;
        }
      }
      function Jt(e) {
        try {
          return tt(e), !1;
        } catch {
          return !0;
        }
      }
      function tt(e) {
        return "" + e;
      }
      function be(e) {
        if (Jt(e))
          return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Gt(e)), tt(e);
      }
      function Qt(e, t, n) {
        var o = e.displayName;
        if (o)
          return o;
        var s = t.displayName || t.name || "";
        return s !== "" ? n + "(" + s + ")" : n;
      }
      function rt(e) {
        return e.displayName || "Context";
      }
      function X(e) {
        if (e == null)
          return null;
        if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
          return e.displayName || e.name || null;
        if (typeof e == "string")
          return e;
        switch (e) {
          case w:
            return "Fragment";
          case b:
            return "Portal";
          case N:
            return "Profiler";
          case E:
            return "StrictMode";
          case G:
            return "Suspense";
          case z:
            return "SuspenseList";
        }
        if (typeof e == "object")
          switch (e.$$typeof) {
            case H:
              var t = e;
              return rt(t) + ".Consumer";
            case q:
              var n = e;
              return rt(n._context) + ".Provider";
            case Y:
              return Qt(e, e.render, "ForwardRef");
            case U:
              var o = e.displayName || null;
              return o !== null ? o : X(e.type) || "Memo";
            case V: {
              var s = e, f = s._payload, l = s._init;
              try {
                return X(l(f));
              } catch {
                return null;
              }
            }
          }
        return null;
      }
      var le = Object.prototype.hasOwnProperty, nt = {
        key: !0,
        ref: !0,
        __self: !0,
        __source: !0
      }, at, ot, Ue;
      Ue = {};
      function it(e) {
        if (le.call(e, "ref")) {
          var t = Object.getOwnPropertyDescriptor(e, "ref").get;
          if (t && t.isReactWarning)
            return !1;
        }
        return e.ref !== void 0;
      }
      function st(e) {
        if (le.call(e, "key")) {
          var t = Object.getOwnPropertyDescriptor(e, "key").get;
          if (t && t.isReactWarning)
            return !1;
        }
        return e.key !== void 0;
      }
      function Xt(e, t) {
        var n = function() {
          at || (at = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
        };
        n.isReactWarning = !0, Object.defineProperty(e, "key", {
          get: n,
          configurable: !0
        });
      }
      function Zt(e, t) {
        var n = function() {
          ot || (ot = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
        };
        n.isReactWarning = !0, Object.defineProperty(e, "ref", {
          get: n,
          configurable: !0
        });
      }
      function er(e) {
        if (typeof e.ref == "string" && D.current && e.__self && D.current.stateNode !== e.__self) {
          var t = X(D.current.type);
          Ue[t] || (d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', t, e.ref), Ue[t] = !0);
        }
      }
      var Fe = function(e, t, n, o, s, f, l) {
        var p = {
          // This tag allows us to uniquely identify this as a React Element
          $$typeof: m,
          // Built-in properties that belong on the element
          type: e,
          key: t,
          ref: n,
          props: l,
          // Record the component responsible for creating this element.
          _owner: f
        };
        return p._store = {}, Object.defineProperty(p._store, "validated", {
          configurable: !1,
          enumerable: !1,
          writable: !0,
          value: !1
        }), Object.defineProperty(p, "_self", {
          configurable: !1,
          enumerable: !1,
          writable: !1,
          value: o
        }), Object.defineProperty(p, "_source", {
          configurable: !1,
          enumerable: !1,
          writable: !1,
          value: s
        }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
      };
      function tr(e, t, n) {
        var o, s = {}, f = null, l = null, p = null, g = null;
        if (t != null) {
          it(t) && (l = t.ref, er(t)), st(t) && (be(t.key), f = "" + t.key), p = t.__self === void 0 ? null : t.__self, g = t.__source === void 0 ? null : t.__source;
          for (o in t)
            le.call(t, o) && !nt.hasOwnProperty(o) && (s[o] = t[o]);
        }
        var C = arguments.length - 2;
        if (C === 1)
          s.children = n;
        else if (C > 1) {
          for (var T = Array(C), k = 0; k < C; k++)
            T[k] = arguments[k + 2];
          Object.freeze && Object.freeze(T), s.children = T;
        }
        if (e && e.defaultProps) {
          var A = e.defaultProps;
          for (o in A)
            s[o] === void 0 && (s[o] = A[o]);
        }
        if (f || l) {
          var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
          f && Xt(s, P), l && Zt(s, P);
        }
        return Fe(e, f, l, p, g, D.current, s);
      }
      function rr(e, t) {
        var n = Fe(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
        return n;
      }
      function nr(e, t, n) {
        if (e == null)
          throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
        var o, s = h({}, e.props), f = e.key, l = e.ref, p = e._self, g = e._source, C = e._owner;
        if (t != null) {
          it(t) && (l = t.ref, C = D.current), st(t) && (be(t.key), f = "" + t.key);
          var T;
          e.type && e.type.defaultProps && (T = e.type.defaultProps);
          for (o in t)
            le.call(t, o) && !nt.hasOwnProperty(o) && (t[o] === void 0 && T !== void 0 ? s[o] = T[o] : s[o] = t[o]);
        }
        var k = arguments.length - 2;
        if (k === 1)
          s.children = n;
        else if (k > 1) {
          for (var A = Array(k), P = 0; P < k; P++)
            A[P] = arguments[P + 2];
          s.children = A;
        }
        return Fe(e.type, f, l, p, g, C, s);
      }
      function oe(e) {
        return typeof e == "object" && e !== null && e.$$typeof === m;
      }
      var ut = ".", ar = ":";
      function or(e) {
        var t = /[=:]/g, n = {
          "=": "=0",
          ":": "=2"
        }, o = e.replace(t, function(s) {
          return n[s];
        });
        return "$" + o;
      }
      var ct = !1, ir = /\/+/g;
      function lt(e) {
        return e.replace(ir, "$&/");
      }
      function We(e, t) {
        return typeof e == "object" && e !== null && e.key != null ? (be(e.key), or("" + e.key)) : t.toString(36);
      }
      function Ce(e, t, n, o, s) {
        var f = typeof e;
        (f === "undefined" || f === "boolean") && (e = null);
        var l = !1;
        if (e === null)
          l = !0;
        else
          switch (f) {
            case "string":
            case "number":
              l = !0;
              break;
            case "object":
              switch (e.$$typeof) {
                case m:
                case b:
                  l = !0;
              }
          }
        if (l) {
          var p = e, g = s(p), C = o === "" ? ut + We(p, 0) : o;
          if (_e(g)) {
            var T = "";
            C != null && (T = lt(C) + "/"), Ce(g, t, T, "", function(Zr) {
              return Zr;
            });
          } else
            g != null && (oe(g) && (g.key && (!p || p.key !== g.key) && be(g.key), g = rr(
              g,
              // Keep both the (mapped) and old keys if they differ, just as
              // traverseAllChildren used to do for objects as children
              n + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
              (g.key && (!p || p.key !== g.key) ? (
                // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
                // eslint-disable-next-line react-internal/safe-string-coercion
                lt("" + g.key) + "/"
              ) : "") + C
            )), t.push(g));
          return 1;
        }
        var k, A, P = 0, M = o === "" ? ut : o + ar;
        if (_e(e))
          for (var Ie = 0; Ie < e.length; Ie++)
            k = e[Ie], A = M + We(k, Ie), P += Ce(k, t, n, A, s);
        else {
          var Ge = re(e);
          if (typeof Ge == "function") {
            var Mt = e;
            Ge === Mt.entries && (ct || Q("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), ct = !0);
            for (var Qr = Ge.call(Mt), $t, Xr = 0; !($t = Qr.next()).done; )
              k = $t.value, A = M + We(k, Xr++), P += Ce(k, t, n, A, s);
          } else if (f === "object") {
            var xt = String(e);
            throw new Error("Objects are not valid as a React child (found: " + (xt === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : xt) + "). If you meant to render a collection of children, use an array instead.");
          }
        }
        return P;
      }
      function Ee(e, t, n) {
        if (e == null)
          return e;
        var o = [], s = 0;
        return Ce(e, o, "", "", function(f) {
          return t.call(n, f, s++);
        }), o;
      }
      function sr(e) {
        var t = 0;
        return Ee(e, function() {
          t++;
        }), t;
      }
      function ur(e, t, n) {
        Ee(e, function() {
          t.apply(this, arguments);
        }, n);
      }
      function cr(e) {
        return Ee(e, function(t) {
          return t;
        }) || [];
      }
      function lr(e) {
        if (!oe(e))
          throw new Error("React.Children.only expected to receive a single React element child.");
        return e;
      }
      function fr(e) {
        var t = {
          $$typeof: H,
          // As a workaround to support multiple concurrent renderers, we categorize
          // some renderers as primary and others as secondary. We only expect
          // there to be two concurrent renderers at most: React Native (primary) and
          // Fabric (secondary); React DOM (primary) and React ART (secondary).
          // Secondary renderers store their context values on separate fields.
          _currentValue: e,
          _currentValue2: e,
          // Used to track how many concurrent renderers this context currently
          // supports within in a single renderer. Such as parallel server rendering.
          _threadCount: 0,
          // These are circular
          Provider: null,
          Consumer: null,
          // Add these to use same hidden class in VM as ServerContext
          _defaultValue: null,
          _globalName: null
        };
        t.Provider = {
          $$typeof: q,
          _context: t
        };
        var n = !1, o = !1, s = !1;
        {
          var f = {
            $$typeof: H,
            _context: t
          };
          Object.defineProperties(f, {
            Provider: {
              get: function() {
                return o || (o = !0, d("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), t.Provider;
              },
              set: function(l) {
                t.Provider = l;
              }
            },
            _currentValue: {
              get: function() {
                return t._currentValue;
              },
              set: function(l) {
                t._currentValue = l;
              }
            },
            _currentValue2: {
              get: function() {
                return t._currentValue2;
              },
              set: function(l) {
                t._currentValue2 = l;
              }
            },
            _threadCount: {
              get: function() {
                return t._threadCount;
              },
              set: function(l) {
                t._threadCount = l;
              }
            },
            Consumer: {
              get: function() {
                return n || (n = !0, d("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), t.Consumer;
              }
            },
            displayName: {
              get: function() {
                return t.displayName;
              },
              set: function(l) {
                s || (Q("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", l), s = !0);
              }
            }
          }), t.Consumer = f;
        }
        return t._currentRenderer = null, t._currentRenderer2 = null, t;
      }
      var fe = -1, Le = 0, ft = 1, dr = 2;
      function pr(e) {
        if (e._status === fe) {
          var t = e._result, n = t();
          if (n.then(function(f) {
            if (e._status === Le || e._status === fe) {
              var l = e;
              l._status = ft, l._result = f;
            }
          }, function(f) {
            if (e._status === Le || e._status === fe) {
              var l = e;
              l._status = dr, l._result = f;
            }
          }), e._status === fe) {
            var o = e;
            o._status = Le, o._result = n;
          }
        }
        if (e._status === ft) {
          var s = e._result;
          return s === void 0 && d(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))

Did you accidentally put curly braces around the import?`, s), "default" in s || d(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))`, s), s.default;
        } else
          throw e._result;
      }
      function hr(e) {
        var t = {
          // We use these fields to store the result.
          _status: fe,
          _result: e
        }, n = {
          $$typeof: V,
          _payload: t,
          _init: pr
        };
        {
          var o, s;
          Object.defineProperties(n, {
            defaultProps: {
              configurable: !0,
              get: function() {
                return o;
              },
              set: function(f) {
                d("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), o = f, Object.defineProperty(n, "defaultProps", {
                  enumerable: !0
                });
              }
            },
            propTypes: {
              configurable: !0,
              get: function() {
                return s;
              },
              set: function(f) {
                d("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), s = f, Object.defineProperty(n, "propTypes", {
                  enumerable: !0
                });
              }
            }
          });
        }
        return n;
      }
      function vr(e) {
        e != null && e.$$typeof === U ? d("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? d("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && d("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && d("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
        var t = {
          $$typeof: Y,
          render: e
        };
        {
          var n;
          Object.defineProperty(t, "displayName", {
            enumerable: !1,
            configurable: !0,
            get: function() {
              return n;
            },
            set: function(o) {
              n = o, !e.name && !e.displayName && (e.displayName = o);
            }
          });
        }
        return t;
      }
      var dt;
      dt = Symbol.for("react.module.reference");
      function pt(e) {
        return !!(typeof e == "string" || typeof e == "function" || e === w || e === N || ae || e === E || e === G || e === z || ce || e === ve || ue || xe || me || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === U || e.$$typeof === q || e.$$typeof === H || e.$$typeof === Y || // This needs to include all possible module reference object
        // types supported by any Flight configuration anywhere since
        // we don't know which Flight build this will end up being used
        // with.
        e.$$typeof === dt || e.getModuleId !== void 0));
      }
      function yr(e, t) {
        pt(e) || d("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
        var n = {
          $$typeof: U,
          type: e,
          compare: t === void 0 ? null : t
        };
        {
          var o;
          Object.defineProperty(n, "displayName", {
            enumerable: !1,
            configurable: !0,
            get: function() {
              return o;
            },
            set: function(s) {
              o = s, !e.name && !e.displayName && (e.displayName = s);
            }
          });
        }
        return n;
      }
      function x() {
        var e = ne.current;
        return e === null && d(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
      }
      function gr(e) {
        var t = x();
        if (e._context !== void 0) {
          var n = e._context;
          n.Consumer === e ? d("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : n.Provider === e && d("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
        }
        return t.useContext(e);
      }
      function mr(e) {
        var t = x();
        return t.useState(e);
      }
      function wr(e, t, n) {
        var o = x();
        return o.useReducer(e, t, n);
      }
      function _r(e) {
        var t = x();
        return t.useRef(e);
      }
      function br(e, t) {
        var n = x();
        return n.useEffect(e, t);
      }
      function Cr(e, t) {
        var n = x();
        return n.useInsertionEffect(e, t);
      }
      function Er(e, t) {
        var n = x();
        return n.useLayoutEffect(e, t);
      }
      function Sr(e, t) {
        var n = x();
        return n.useCallback(e, t);
      }
      function Rr(e, t) {
        var n = x();
        return n.useMemo(e, t);
      }
      function Or(e, t, n) {
        var o = x();
        return o.useImperativeHandle(e, t, n);
      }
      function Tr(e, t) {
        {
          var n = x();
          return n.useDebugValue(e, t);
        }
      }
      function kr() {
        var e = x();
        return e.useTransition();
      }
      function Ar(e) {
        var t = x();
        return t.useDeferredValue(e);
      }
      function Ir() {
        var e = x();
        return e.useId();
      }
      function Pr(e, t, n) {
        var o = x();
        return o.useSyncExternalStore(e, t, n);
      }
      var de = 0, ht, vt, yt, gt, mt, wt, _t;
      function bt() {
      }
      bt.__reactDisabledLog = !0;
      function Nr() {
        {
          if (de === 0) {
            ht = console.log, vt = console.info, yt = console.warn, gt = console.error, mt = console.group, wt = console.groupCollapsed, _t = console.groupEnd;
            var e = {
              configurable: !0,
              enumerable: !0,
              value: bt,
              writable: !0
            };
            Object.defineProperties(console, {
              info: e,
              log: e,
              warn: e,
              error: e,
              group: e,
              groupCollapsed: e,
              groupEnd: e
            });
          }
          de++;
        }
      }
      function jr() {
        {
          if (de--, de === 0) {
            var e = {
              configurable: !0,
              enumerable: !0,
              writable: !0
            };
            Object.defineProperties(console, {
              log: h({}, e, {
                value: ht
              }),
              info: h({}, e, {
                value: vt
              }),
              warn: h({}, e, {
                value: yt
              }),
              error: h({}, e, {
                value: gt
              }),
              group: h({}, e, {
                value: mt
              }),
              groupCollapsed: h({}, e, {
                value: wt
              }),
              groupEnd: h({}, e, {
                value: _t
              })
            });
          }
          de < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
        }
      }
      var Ve = W.ReactCurrentDispatcher, Ye;
      function Se(e, t, n) {
        {
          if (Ye === void 0)
            try {
              throw Error();
            } catch (s) {
              var o = s.stack.trim().match(/\n( *(at )?)/);
              Ye = o && o[1] || "";
            }
          return `
` + Ye + e;
        }
      }
      var ze = !1, Re;
      {
        var Mr = typeof WeakMap == "function" ? WeakMap : Map;
        Re = new Mr();
      }
      function Ct(e, t) {
        if (!e || ze)
          return "";
        {
          var n = Re.get(e);
          if (n !== void 0)
            return n;
        }
        var o;
        ze = !0;
        var s = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        var f;
        f = Ve.current, Ve.current = null, Nr();
        try {
          if (t) {
            var l = function() {
              throw Error();
            };
            if (Object.defineProperty(l.prototype, "props", {
              set: function() {
                throw Error();
              }
            }), typeof Reflect == "object" && Reflect.construct) {
              try {
                Reflect.construct(l, []);
              } catch (M) {
                o = M;
              }
              Reflect.construct(e, [], l);
            } else {
              try {
                l.call();
              } catch (M) {
                o = M;
              }
              e.call(l.prototype);
            }
          } else {
            try {
              throw Error();
            } catch (M) {
              o = M;
            }
            e();
          }
        } catch (M) {
          if (M && o && typeof M.stack == "string") {
            for (var p = M.stack.split(`
`), g = o.stack.split(`
`), C = p.length - 1, T = g.length - 1; C >= 1 && T >= 0 && p[C] !== g[T]; )
              T--;
            for (; C >= 1 && T >= 0; C--, T--)
              if (p[C] !== g[T]) {
                if (C !== 1 || T !== 1)
                  do
                    if (C--, T--, T < 0 || p[C] !== g[T]) {
                      var k = `
` + p[C].replace(" at new ", " at ");
                      return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && Re.set(e, k), k;
                    }
                  while (C >= 1 && T >= 0);
                break;
              }
          }
        } finally {
          ze = !1, Ve.current = f, jr(), Error.prepareStackTrace = s;
        }
        var A = e ? e.displayName || e.name : "", P = A ? Se(A) : "";
        return typeof e == "function" && Re.set(e, P), P;
      }
      function $r(e, t, n) {
        return Ct(e, !1);
      }
      function xr(e) {
        var t = e.prototype;
        return !!(t && t.isReactComponent);
      }
      function Oe(e, t, n) {
        if (e == null)
          return "";
        if (typeof e == "function")
          return Ct(e, xr(e));
        if (typeof e == "string")
          return Se(e);
        switch (e) {
          case G:
            return Se("Suspense");
          case z:
            return Se("SuspenseList");
        }
        if (typeof e == "object")
          switch (e.$$typeof) {
            case Y:
              return $r(e.render);
            case U:
              return Oe(e.type, t, n);
            case V: {
              var o = e, s = o._payload, f = o._init;
              try {
                return Oe(f(s), t, n);
              } catch {
              }
            }
          }
        return "";
      }
      var Et = {}, St = W.ReactDebugCurrentFrame;
      function Te(e) {
        if (e) {
          var t = e._owner, n = Oe(e.type, e._source, t ? t.type : null);
          St.setExtraStackFrame(n);
        } else
          St.setExtraStackFrame(null);
      }
      function Dr(e, t, n, o, s) {
        {
          var f = Function.call.bind(le);
          for (var l in e)
            if (f(e, l)) {
              var p = void 0;
              try {
                if (typeof e[l] != "function") {
                  var g = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                  throw g.name = "Invariant Violation", g;
                }
                p = e[l](t, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
              } catch (C) {
                p = C;
              }
              p && !(p instanceof Error) && (Te(s), d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, l, typeof p), Te(null)), p instanceof Error && !(p.message in Et) && (Et[p.message] = !0, Te(s), d("Failed %s type: %s", n, p.message), Te(null));
            }
        }
      }
      function ie(e) {
        if (e) {
          var t = e._owner, n = Oe(e.type, e._source, t ? t.type : null);
          ge(n);
        } else
          ge(null);
      }
      var Be;
      Be = !1;
      function Rt() {
        if (D.current) {
          var e = X(D.current.type);
          if (e)
            return `

Check the render method of \`` + e + "`.";
        }
        return "";
      }
      function Ur(e) {
        if (e !== void 0) {
          var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
          return `

Check your code at ` + t + ":" + n + ".";
        }
        return "";
      }
      function Fr(e) {
        return e != null ? Ur(e.__source) : "";
      }
      var Ot = {};
      function Wr(e) {
        var t = Rt();
        if (!t) {
          var n = typeof e == "string" ? e : e.displayName || e.name;
          n && (t = `

Check the top-level render call using <` + n + ">.");
        }
        return t;
      }
      function Tt(e, t) {
        if (!(!e._store || e._store.validated || e.key != null)) {
          e._store.validated = !0;
          var n = Wr(t);
          if (!Ot[n]) {
            Ot[n] = !0;
            var o = "";
            e && e._owner && e._owner !== D.current && (o = " It was passed a child from " + X(e._owner.type) + "."), ie(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), ie(null);
          }
        }
      }
      function kt(e, t) {
        if (typeof e == "object") {
          if (_e(e))
            for (var n = 0; n < e.length; n++) {
              var o = e[n];
              oe(o) && Tt(o, t);
            }
          else if (oe(e))
            e._store && (e._store.validated = !0);
          else if (e) {
            var s = re(e);
            if (typeof s == "function" && s !== e.entries)
              for (var f = s.call(e), l; !(l = f.next()).done; )
                oe(l.value) && Tt(l.value, t);
          }
        }
      }
      function At(e) {
        {
          var t = e.type;
          if (t == null || typeof t == "string")
            return;
          var n;
          if (typeof t == "function")
            n = t.propTypes;
          else if (typeof t == "object" && (t.$$typeof === Y || // Note: Memo only checks outer props here.
          // Inner props are checked in the reconciler.
          t.$$typeof === U))
            n = t.propTypes;
          else
            return;
          if (n) {
            var o = X(t);
            Dr(n, e.props, "prop", o, e);
          } else if (t.PropTypes !== void 0 && !Be) {
            Be = !0;
            var s = X(t);
            d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
          }
          typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
        }
      }
      function Lr(e) {
        {
          for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
            var o = t[n];
            if (o !== "children" && o !== "key") {
              ie(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), ie(null);
              break;
            }
          }
          e.ref !== null && (ie(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), ie(null));
        }
      }
      function It(e, t, n) {
        var o = pt(e);
        if (!o) {
          var s = "";
          (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
          var f = Fr(t);
          f ? s += f : s += Rt();
          var l;
          e === null ? l = "null" : _e(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (X(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, d("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, s);
        }
        var p = tr.apply(this, arguments);
        if (p == null)
          return p;
        if (o)
          for (var g = 2; g < arguments.length; g++)
            kt(arguments[g], e);
        return e === w ? Lr(p) : At(p), p;
      }
      var Pt = !1;
      function Vr(e) {
        var t = It.bind(null, e);
        return t.type = e, Pt || (Pt = !0, Q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(t, "type", {
          enumerable: !1,
          get: function() {
            return Q("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
              value: e
            }), e;
          }
        }), t;
      }
      function Yr(e, t, n) {
        for (var o = nr.apply(this, arguments), s = 2; s < arguments.length; s++)
          kt(arguments[s], o.type);
        return At(o), o;
      }
      function zr(e, t) {
        var n = K.transition;
        K.transition = {};
        var o = K.transition;
        K.transition._updatedFibers = /* @__PURE__ */ new Set();
        try {
          e();
        } finally {
          if (K.transition = n, n === null && o._updatedFibers) {
            var s = o._updatedFibers.size;
            s > 10 && Q("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), o._updatedFibers.clear();
          }
        }
      }
      var Nt = !1, ke = null;
      function Br(e) {
        if (ke === null)
          try {
            var t = ("require" + Math.random()).slice(0, 7), n = i && i[t];
            ke = n.call(i, "timers").setImmediate;
          } catch {
            ke = function(s) {
              Nt === !1 && (Nt = !0, typeof MessageChannel > "u" && d("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
              var f = new MessageChannel();
              f.port1.onmessage = s, f.port2.postMessage(void 0);
            };
          }
        return ke(e);
      }
      var se = 0, jt = !1;
      function Kr(e) {
        {
          var t = se;
          se++, j.current === null && (j.current = []);
          var n = j.isBatchingLegacy, o;
          try {
            if (j.isBatchingLegacy = !0, o = e(), !n && j.didScheduleLegacyUpdate) {
              var s = j.current;
              s !== null && (j.didScheduleLegacyUpdate = !1, He(s));
            }
          } catch (A) {
            throw Ae(t), A;
          } finally {
            j.isBatchingLegacy = n;
          }
          if (o !== null && typeof o == "object" && typeof o.then == "function") {
            var f = o, l = !1, p = {
              then: function(A, P) {
                l = !0, f.then(function(M) {
                  Ae(t), se === 0 ? Ke(M, A, P) : A(M);
                }, function(M) {
                  Ae(t), P(M);
                });
              }
            };
            return !jt && typeof Promise < "u" && Promise.resolve().then(function() {
            }).then(function() {
              l || (jt = !0, d("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
            }), p;
          } else {
            var g = o;
            if (Ae(t), se === 0) {
              var C = j.current;
              C !== null && (He(C), j.current = null);
              var T = {
                then: function(A, P) {
                  j.current === null ? (j.current = [], Ke(g, A, P)) : A(g);
                }
              };
              return T;
            } else {
              var k = {
                then: function(A, P) {
                  A(g);
                }
              };
              return k;
            }
          }
        }
      }
      function Ae(e) {
        e !== se - 1 && d("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), se = e;
      }
      function Ke(e, t, n) {
        {
          var o = j.current;
          if (o !== null)
            try {
              He(o), Br(function() {
                o.length === 0 ? (j.current = null, t(e)) : Ke(e, t, n);
              });
            } catch (s) {
              n(s);
            }
          else
            t(e);
        }
      }
      var qe = !1;
      function He(e) {
        if (!qe) {
          qe = !0;
          var t = 0;
          try {
            for (; t < e.length; t++) {
              var n = e[t];
              do
                n = n(!0);
              while (n !== null);
            }
            e.length = 0;
          } catch (o) {
            throw e = e.slice(t + 1), o;
          } finally {
            qe = !1;
          }
        }
      }
      var qr = It, Hr = Yr, Gr = Vr, Jr = {
        map: Ee,
        forEach: ur,
        count: sr,
        toArray: cr,
        only: lr
      };
      a.Children = Jr, a.Component = y, a.Fragment = w, a.Profiler = N, a.PureComponent = $, a.StrictMode = E, a.Suspense = G, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W, a.cloneElement = Hr, a.createContext = fr, a.createElement = qr, a.createFactory = Gr, a.createRef = qt, a.forwardRef = vr, a.isValidElement = oe, a.lazy = hr, a.memo = yr, a.startTransition = zr, a.unstable_act = Kr, a.useCallback = Sr, a.useContext = gr, a.useDebugValue = Tr, a.useDeferredValue = Ar, a.useEffect = br, a.useId = Ir, a.useImperativeHandle = Or, a.useInsertionEffect = Cr, a.useLayoutEffect = Er, a.useMemo = Rr, a.useReducer = wr, a.useRef = _r, a.useState = mr, a.useSyncExternalStore = Pr, a.useTransition = kr, a.version = c, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
    }();
  }(he, he.exports)), he.exports;
}
Vt.env.NODE_ENV === "production" ? dn() : pn();
const F = en({
  status: "uninitialized"
}), L = {
  state: F,
  subscribeKey(i, a) {
    return tn(F, i, a);
  },
  subscribe(i) {
    return rn(F, () => i(F));
  },
  _getClient() {
    if (!F._client)
      throw new Error("SIWEController client not set");
    return F._client;
  },
  async getNonce(i) {
    const c = await this._getClient().getNonce(i);
    return this.setNonce(c), c;
  },
  async getSession() {
    try {
      const a = await this._getClient().getSession();
      return a != null && a.address && (a != null && a.chainId) ? this.setSession(a) : this.setSession(void 0), a;
    } catch {
      return;
    }
  },
  createMessage(i) {
    const c = this._getClient().createMessage(i);
    return this.setMessage(c), c;
  },
  async verifyMessage(i) {
    return await this._getClient().verifyMessage(i);
  },
  async getMessageParams() {
    var c;
    const i = this._getClient();
    return await ((c = i.getMessageParams) == null ? void 0 : c.call(i));
  },
  async signIn() {
    const a = await this._getClient().signIn();
    return this.setSession(a), a;
  },
  async signOut() {
    await this._getClient().signOut(), this.setStatus("ready"), this.setSession(void 0), this.setNonce(void 0);
  },
  onSignIn(i) {
    var c;
    const a = this._getClient();
    (c = a.onSignIn) == null || c.call(a, i);
  },
  onSignOut() {
    var a;
    const i = this._getClient();
    (a = i.onSignOut) == null || a.call(i);
  },
  setSIWEClient(i) {
    F._client = nn(i), F.status = "ready", Ze.setIsSiweEnabled(i.options.enabled);
  },
  setNonce(i) {
    F.nonce = i;
  },
  setStatus(i) {
    F.status = i, Z.setSiweStatus(i);
  },
  setMessage(i) {
    F.message = i;
  },
  setSession(i) {
    F.session = i, this.setStatus(i != null && i.address && (i != null && i.chainId) ? "success" : "ready");
  }
}, Lt = {
  FIVE_MINUTES_IN_MS: 3e5
};
class hn {
  constructor(a) {
    const { enabled: c = !0, nonceRefetchIntervalMs: m = Lt.FIVE_MINUTES_IN_MS, sessionRefetchIntervalMs: b = Lt.FIVE_MINUTES_IN_MS, signOutOnAccountChange: w = !0, signOutOnDisconnect: E = !0, signOutOnNetworkChange: N = !0, ...q } = a;
    this.options = {
      enabled: c,
      nonceRefetchIntervalMs: m,
      sessionRefetchIntervalMs: b,
      signOutOnDisconnect: E,
      signOutOnAccountChange: w,
      signOutOnNetworkChange: N
    }, this.methods = q;
  }
  async getNonce(a) {
    const c = await this.methods.getNonce(a);
    if (!c)
      throw new Error("siweControllerClient:getNonce - nonce is undefined");
    return c;
  }
  async getMessageParams() {
    var a, c;
    return await ((c = (a = this.methods).getMessageParams) == null ? void 0 : c.call(a)) || {};
  }
  createMessage(a) {
    const c = this.methods.createMessage(a);
    if (!c)
      throw new Error("siweControllerClient:createMessage - message is undefined");
    return c;
  }
  async verifyMessage(a) {
    return await this.methods.verifyMessage(a);
  }
  async getSession() {
    return await this.methods.getSession();
  }
  async signIn() {
    var U, V;
    if (!L.state._client)
      throw new Error("SIWE client needs to be initialized before calling signIn");
    const a = Z.state.address;
    let c = L.state.nonce;
    if (c || (c = await L.getNonce()), !a)
      throw new Error("An address is required to create a SIWE message.");
    const m = an.getNetworkProp("caipNetwork");
    if (!(m != null && m.id))
      throw new Error("A chainId is required to create a SIWE message.");
    const b = on.caipNetworkIdToNumber(m.id);
    if (!b)
      throw new Error("A chainId is required to create a SIWE message.");
    const w = (U = L.state._client) == null ? void 0 : U.options.signOutOnNetworkChange;
    w && (L.state._client.options.signOutOnNetworkChange = !1), await pe.switchActiveNetwork(m), w && (L.state._client.options.signOutOnNetworkChange = !0);
    const E = await ((V = this.getMessageParams) == null ? void 0 : V.call(this)), N = this.methods.createMessage({
      address: `eip155:${b}:${a}`,
      chainId: b,
      nonce: c,
      version: "1",
      iat: (E == null ? void 0 : E.iat) || (/* @__PURE__ */ new Date()).toISOString(),
      ...E
    });
    sn.getConnectedConnector() === "AUTH" && Je.pushTransactionStack({
      view: null,
      goBack: !1,
      replace: !0,
      onCancel() {
        Je.replace("ConnectingSiwe");
      }
    });
    const H = Qe.state.wcClientId, Y = await Qe.signMessage(N);
    if (!await this.methods.verifyMessage({ message: N, signature: Y, clientId: H }))
      throw new Error("Error verifying SIWE signature");
    const z = await this.methods.getSession();
    if (!z)
      throw new Error("Error verifying SIWE signature");
    return this.methods.onSignIn && this.methods.onSignIn(z), un.navigateAfterNetworkSwitch(), z;
  }
  async signOut() {
    var a, c;
    return (c = (a = this.methods).onSignOut) == null || c.call(a), this.methods.signOut();
  }
  onSignIn(a) {
    var c, m;
    (m = (c = this.methods).onSignIn) == null || m.call(c, a);
  }
}
const $e = {
  ...cn._getApiHeaders(),
  "x-project-id": "24970167f11c121f6eb40b558edb9691"
};
async function vn() {
  try {
    const i = await fetch(`${Me.DEV_W3M_API_URL}/auth/v1/nonce`, {
      method: "GET",
      headers: $e,
      credentials: "include"
    });
    return i.ok ? await i.json() : void 0;
  } catch (i) {
    throw console.error(i), new Error("Failed to get nonce", {
      cause: i
    });
  }
}
async function yn() {
  try {
    const i = await fetch(`${Me.DEV_W3M_API_URL}/auth/v1/me`, {
      method: "GET",
      headers: $e,
      credentials: "include"
    });
    return i.ok ? await i.json() : void 0;
  } catch (i) {
    throw console.error(i), new Error("Failed to get session", {
      cause: i
    });
  }
}
async function gn(i) {
  try {
    const a = await fetch(`${Me.DEV_W3M_API_URL}/auth/v1/authenticate`, {
      method: "POST",
      headers: $e,
      body: JSON.stringify(i),
      credentials: "include"
    });
    return a.ok ? await a.json() : void 0;
  } catch (a) {
    throw console.error(a), new Error("Failed to authenticate", {
      cause: a
    });
  }
}
async function mn() {
  try {
    return await (await fetch(`${Me.DEV_W3M_API_URL}/auth/v1/sign-out`, {
      method: "POST",
      headers: $e,
      credentials: "include"
    })).json();
  } catch (i) {
    throw console.error(i), new Error("Failed to sign out", {
      cause: i
    });
  }
}
const Cn = new hn({
  signOutOnAccountChange: !0,
  signOutOnNetworkChange: !0,
  getMessageParams: async () => ({
    domain: window.location.host,
    uri: window.location.origin,
    statement: "Please sign with your account",
    iat: (/* @__PURE__ */ new Date()).toISOString()
  }),
  createMessage: ({ address: i, ...a }) => ln(a, i),
  getNonce: async () => {
    const { nonce: i } = await vn();
    if (!i)
      throw new Error("Failed to get nonce!");
    return i;
  },
  getSession: async () => {
    const i = await yn();
    if (!i)
      return null;
    const { address: a, chainId: c } = i;
    return { address: a, chainId: c };
  },
  verifyMessage: async ({ message: i, signature: a, cacao: c, clientId: m }) => {
    try {
      const { token: b } = await gn({ message: i, signature: a, clientId: m });
      return !!b;
    } catch {
      return !1;
    }
  },
  signOut: async () => {
    try {
      return await mn(), !0;
    } catch {
      return !1;
    }
  }
}), wn = fn`
  :host {
    display: flex;
    justify-content: center;
    gap: var(--wui-spacing-2xl);
  }

  wui-visual-thumbnail:nth-child(1) {
    z-index: 1;
  }
`;
var _n = function(i, a, c, m) {
  var b = arguments.length, w = b < 3 ? a : m === null ? m = Object.getOwnPropertyDescriptor(a, c) : m, E;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
    w = Reflect.decorate(i, a, c, m);
  else
    for (var N = i.length - 1; N >= 0; N--)
      (E = i[N]) && (w = (b < 3 ? E(w) : b > 3 ? E(a, c, w) : E(a, c)) || w);
  return b > 3 && w && Object.defineProperty(a, c, w), w;
};
let Xe = class extends zt {
  constructor() {
    var a, c;
    super(...arguments), this.dappImageUrl = (a = Ze.state.metadata) == null ? void 0 : a.icons, this.walletImageUrl = (c = Z.state.connectedWalletInfo) == null ? void 0 : c.icon;
  }
  firstUpdated() {
    var c;
    const a = (c = this.shadowRoot) == null ? void 0 : c.querySelectorAll("wui-visual-thumbnail");
    a != null && a[0] && this.createAnimation(a[0], "translate(18px)"), a != null && a[1] && this.createAnimation(a[1], "translate(-18px)");
  }
  render() {
    var a;
    return Bt`
      <wui-visual-thumbnail
        ?borderRadiusFull=${!0}
        .imageSrc=${(a = this.dappImageUrl) == null ? void 0 : a[0]}
      ></wui-visual-thumbnail>
      <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail>
    `;
  }
  createAnimation(a, c) {
    a.animate([{ transform: "translateX(0px)" }, { transform: c }], {
      duration: 1600,
      easing: "cubic-bezier(0.56, 0, 0.48, 1)",
      direction: "alternate",
      iterations: 1 / 0
    });
  }
};
Xe.styles = wn;
Xe = _n([
  Yt("w3m-connecting-siwe")
], Xe);
var et = function(i, a, c, m) {
  var b = arguments.length, w = b < 3 ? a : m === null ? m = Object.getOwnPropertyDescriptor(a, c) : m, E;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
    w = Reflect.decorate(i, a, c, m);
  else
    for (var N = i.length - 1; N >= 0; N--)
      (E = i[N]) && (w = (b < 3 ? E(w) : b > 3 ? E(a, c, w) : E(a, c)) || w);
  return b > 3 && w && Object.defineProperty(a, c, w), w;
};
let je = class extends zt {
  constructor() {
    var a;
    super(...arguments), this.dappName = (a = Ze.state.metadata) == null ? void 0 : a.name, this.isSigning = !1, this.isCancelling = !1;
  }
  render() {
    return this.onRender(), Bt`
      <wui-flex justifyContent="center" .padding=${["2xl", "0", "xxl", "0"]}>
        <w3m-connecting-siwe></w3m-connecting-siwe>
      </wui-flex>
      <wui-flex
        .padding=${["0", "4xl", "l", "4xl"]}
        gap="s"
        justifyContent="space-between"
      >
        <wui-text variant="paragraph-500" align="center" color="fg-100"
          >${this.dappName ?? "Dapp"} needs to connect to your wallet</wui-text
        >
      </wui-flex>
      <wui-flex
        .padding=${["0", "3xl", "l", "3xl"]}
        gap="s"
        justifyContent="space-between"
      >
        <wui-text variant="small-400" align="center" color="fg-200"
          >Sign this message to prove you own this wallet and proceed. Canceling will disconnect
          you.</wui-text
        >
      </wui-flex>
      <wui-flex .padding=${["l", "xl", "xl", "xl"]} gap="s" justifyContent="space-between">
        <wui-button
          size="lg"
          borderRadius="xs"
          fullWidth
          variant="neutral"
          ?loading=${this.isCancelling}
          @click=${this.onCancel.bind(this)}
          data-testid="w3m-connecting-siwe-cancel"
        >
          Cancel
        </wui-button>
        <wui-button
          size="lg"
          borderRadius="xs"
          fullWidth
          variant="main"
          @click=${this.onSign.bind(this)}
          ?loading=${this.isSigning}
          data-testid="w3m-connecting-siwe-sign"
        >
          ${this.isSigning ? "Signing..." : "Sign"}
        </wui-button>
      </wui-flex>
    `;
  }
  onRender() {
    L.state.session && Dt.close();
  }
  async onSign() {
    var a, c, m;
    this.isSigning = !0, Pe.sendEvent({
      event: "CLICK_SIGN_SIWE_MESSAGE",
      type: "track",
      properties: {
        network: ((a = pe.state.caipNetwork) == null ? void 0 : a.id) || "",
        isSmartAccount: Z.state.preferredAccountType === Ne.ACCOUNT_TYPES.SMART_ACCOUNT
      }
    });
    try {
      L.setStatus("loading");
      const b = await L.signIn();
      return L.setStatus("success"), Pe.sendEvent({
        event: "SIWE_AUTH_SUCCESS",
        type: "track",
        properties: {
          network: ((c = pe.state.caipNetwork) == null ? void 0 : c.id) || "",
          isSmartAccount: Z.state.preferredAccountType === Ne.ACCOUNT_TYPES.SMART_ACCOUNT
        }
      }), b;
    } catch (b) {
      const E = Z.state.preferredAccountType === Ne.ACCOUNT_TYPES.SMART_ACCOUNT;
      return E ? Ut.showError("This application might not support Smart Accounts") : Ut.showError(b instanceof Error ? b.message : "Signature declined"), L.setStatus("error"), Pe.sendEvent({
        event: "SIWE_AUTH_ERROR",
        type: "track",
        properties: {
          network: ((m = pe.state.caipNetwork) == null ? void 0 : m.id) || "",
          isSmartAccount: E
        }
      });
    } finally {
      this.isSigning = !1;
    }
  }
  async onCancel() {
    var c;
    this.isCancelling = !0, Z.state.isConnected ? (await Qe.disconnect(), Dt.close()) : Je.push("Connect"), this.isCancelling = !1, Pe.sendEvent({
      event: "CLICK_CANCEL_SIWE",
      type: "track",
      properties: {
        network: ((c = pe.state.caipNetwork) == null ? void 0 : c.id) || "",
        isSmartAccount: Z.state.preferredAccountType === Ne.ACCOUNT_TYPES.SMART_ACCOUNT
      }
    });
  }
};
et([
  Kt()
], je.prototype, "isSigning", void 0);
et([
  Kt()
], je.prototype, "isCancelling", void 0);
je = et([
  Yt("w3m-connecting-siwe-view")
], je);
export {
  L as SIWEController,
  Xe as W3mConnectingSiwe,
  je as W3mConnectingSiweView,
  Cn as appKitAuthConfig,
  mn as appKitAuthSignOut,
  gn as authenticate,
  ln as formatMessage,
  yn as getAppKitAuthSession,
  Tn as getDidAddress,
  kn as getDidChainId,
  vn as getNonce
};
